]> Zhao Yanbai Git Server - minix.git/log
minix.git
14 years agoSmall fixes
Tomas Hruby [Tue, 6 Apr 2010 11:29:31 +0000 (11:29 +0000)]
Small fixes

- do_sync_ipc() is private

- fixed typo in a comment

14 years agodo_ipc() rearrangements
Tomas Hruby [Tue, 6 Apr 2010 11:24:26 +0000 (11:24 +0000)]
do_ipc() rearrangements

this patch does not add or change any functionality of do_ipc(), it
only makes things a little cleaner (hopefully).

Until now do_ipc() was responsible for handling all ipc calls. The
catch is that SENDA is fairly different which results in some ugly
code like this typecasting and variables naming which does not make
much sense for SENDA and makes the code hard to read.

result = mini_senda(caller_ptr, (asynmsg_t *)m_ptr, (size_t)src_dst_e);

As it is called directly from assembly, the new do_ipc() takes as
input values of 3 registers in reg_t variables (it used to be 4,
however, bit_map wasn't used so I removed it), does the checks common
to all ipc calls and call the appropriate handler either for
do_sync_ipc() (all except SENDA) or mini_senda() (for SENDA) while
typecasting the reg_t values correctly. As a result, handling SENDA
differences in do_sync_ipc() is no more needed. Also the code that
uses msg_size variable is improved a little bit.

arch_do_syscall() is simplified too.

14 years agoRTS_SYS_LOCK and do_runctl()
Tomas Hruby [Tue, 6 Apr 2010 11:18:04 +0000 (11:18 +0000)]
RTS_SYS_LOCK and do_runctl()

- No need for RTS_SYS_LOCK as there are no tasks anymore.

14 years agodo_vtimer()
Tomas Hruby [Tue, 6 Apr 2010 11:16:14 +0000 (11:16 +0000)]
do_vtimer()

- removed comment which is not true anymore as we don't have any
  tasks. No need to take any special measures.

14 years agoConvert kernel over to bsdmake
Arun Thomas [Thu, 1 Apr 2010 22:22:33 +0000 (22:22 +0000)]
Convert kernel over to bsdmake

14 years agoFixed some incorrect uses of printf-like functions.
Kees van Reeuwijk [Thu, 1 Apr 2010 14:30:36 +0000 (14:30 +0000)]
Fixed some incorrect uses of printf-like functions.

14 years agoFix printfs with too few or too many parms, remove unused vars, fix incorrect flag...
Kees van Reeuwijk [Thu, 1 Apr 2010 13:25:05 +0000 (13:25 +0000)]
Fix printfs with too few or too many parms, remove unused vars, fix incorrect flag tests, other code cleanup.

14 years agoLots of const correctness, other cleanup.
Kees van Reeuwijk [Thu, 1 Apr 2010 12:51:31 +0000 (12:51 +0000)]
Lots of const correctness, other cleanup.

14 years agointroduce the fsckopts sysenv, options passed to fsck by /etc/rc.
Ben Gras [Wed, 31 Mar 2010 15:06:53 +0000 (15:06 +0000)]
introduce the fsckopts sysenv, options passed to fsck by /etc/rc.

setting 'fsckopts=-a' makes it much easier to work on a minix machine
remotely and reboot after a crash.

14 years agoonly print 'PCI: ignoring bad value ...' once per boot.
Ben Gras [Wed, 31 Mar 2010 12:29:30 +0000 (12:29 +0000)]
only print 'PCI: ignoring bad value ...' once per boot.

14 years agoMove kernel signal SIGKNDELAY to system signal SIGSNDELAY and fix broken ptrace.
Cristiano Giuffrida [Wed, 31 Mar 2010 08:55:12 +0000 (08:55 +0000)]
Move kernel signal SIGKNDELAY to system signal SIGSNDELAY and fix broken ptrace.

14 years agoMove allocation of temporary inodes for cloned character special devices from
Thomas Veerman [Tue, 30 Mar 2010 15:00:09 +0000 (15:00 +0000)]
Move allocation of temporary inodes for cloned character special devices from
MFS to PFS.

14 years agoMore use of endpoint_t. Other code cleanup.
Kees van Reeuwijk [Tue, 30 Mar 2010 14:07:15 +0000 (14:07 +0000)]
More use of endpoint_t. Other code cleanup.

14 years agoFixed missing __UNCONST macro definition in previous patch.
Lorenzo Cavallaro [Tue, 30 Mar 2010 13:08:14 +0000 (13:08 +0000)]
Fixed missing __UNCONST macro definition in previous patch.

14 years agocdecl calling convention requires to push arguments on the stack in a
Lorenzo Cavallaro [Tue, 30 Mar 2010 09:36:46 +0000 (09:36 +0000)]
cdecl calling convention requires to push arguments on the stack in a
reverse order to easily support variadic arguments. Thus, instead of
using the proper stdarg.h macros (that nowadays are
compiler-dependent), it may be tempting to directly take the address of
the last argument and considering it as the start of an array. This is
a shortcut that avoid looping to get all the arguments as the CPU
already pushed them on the stack before the call to the function.

Unfortunately, such an assumption is strictly compiler-dependent and
compilers are free to move the last argument on the stack, as a local
variable, and return the address of the location where the argument was
stored, if asked for. This will break things as the rest of the array's
argument are stored elsewhere (typically, a couple of words above the
location where the argument was stored).

This patch fixes the issue by allowing ACK to take the shortcut and
enabling gcc/llvm-gcc to follow the right way.

14 years agoFixed brackets in bitmap macros
Tomas Hruby [Tue, 30 Mar 2010 08:34:33 +0000 (08:34 +0000)]
Fixed brackets in bitmap macros

14 years agodon't print SYSTEM stacktrace on exceptions as it's not scheduled any more.
Ben Gras [Mon, 29 Mar 2010 15:32:19 +0000 (15:32 +0000)]
don't print SYSTEM stacktrace on exceptions as it's not scheduled any more.

14 years agoNOREC_ENTER and NOREC_RETURN checks removed
Tomas Hruby [Mon, 29 Mar 2010 11:43:10 +0000 (11:43 +0000)]
NOREC_ENTER and NOREC_RETURN checks removed

- the reasons for these checks no longer exist

- these check are problematic on SMP

14 years agofix null deref; vmnt->mounted_on is NULL legitimately for root.
Ben Gras [Mon, 29 Mar 2010 11:39:54 +0000 (11:39 +0000)]
fix null deref; vmnt->mounted_on is NULL legitimately for root.

changed check+panic to assert().

added assert().

14 years agoA reliable way for userspace to check if a msg is from kernel
Tomas Hruby [Mon, 29 Mar 2010 11:25:01 +0000 (11:25 +0000)]
A reliable way for userspace to check if a msg is from kernel

- IPC_FLG_MSG_FROM_KERNEL status flag is returned to userspace if the
  receive was satisfied by s message which was sent by the kernel on
  behalf of a process. This perfectly reliale information.

- MF_SENDING_FROM_KERNEL flag added to processes to be able to set
  IPC_FLG_MSG_FROM_KERNEL when finishing receive if the receiver
  wasn't ready to receive immediately.

- PM is changed to use this information to confirm that the scheduling
  messages are indeed from the kernel and not faked by a process.

  PM uses sef_receive_status()

- get_work() is removed from PM to make the changes simpler

14 years agoSlightly faster IPC
Tomas Hruby [Mon, 29 Mar 2010 11:16:37 +0000 (11:16 +0000)]
Slightly faster IPC

- there are cycles wasted in the IPC call due to a fairly compliacted
  way of copying messages from userland to kernel. Sometimes this
  complicated way (generic though) is used even for copying within the
  kernel address space, sometimes it is used for copying in case _no_
  copying is necessary. The goal of this patch is to improve this a
  little bit.

- the places where a copy is from user to kernel use the
  copy_msg_from_user() kernel-kernel copies are turned into
  assignments and BuildNotifyMessage uses the delivery buffers to
  avoid copying.

- copy_msg_from_user() was introduced when removing the system task
  and is about 2/3 faster then using the current mechanism
  (phys_copy). It also avoids the PHYS_COPY_CATCH macro. Assignment is
  also faster and no copy is the fastest ;-) so perhaps there will be
  some hardly noticable performance gain besides the clean up.

14 years agoUserspace scheduling
Tomas Hruby [Mon, 29 Mar 2010 11:07:20 +0000 (11:07 +0000)]
Userspace scheduling

- cotributed by Bjorn Swift

- In this first phase, scheduling is moved from the kernel to the PM
  server. The next steps are to a) moving scheduling to its own server
  and b) include useful information in the "out of quantum" message,
  so that the scheduler can make use of this information.

- The kernel process table now keeps record of who is responsible for
  scheduling each process (p_scheduler). When this pointer is NULL,
  the process will be scheduled by the kernel. If such a process runs
  out of quantum, the kernel will simply renew its quantum an requeue
  it.

- When PM loads, it will take over scheduling of all running
  processes, except system processes, using sys_schedctl().
  Essentially, this only results in taking over init. As children
  inherit a scheduler from their parent, user space programs forked by
  init will inherit PM (for now) as their scheduler.

 - Once a process has been assigned a scheduler, and runs out of
   quantum, its RTS_NO_QUANTUM flag will be set and the process
   dequeued. The kernel will send a message to the scheduler, on the
   process' behalf, informing the scheduler that it has run out of
   quantum. The scheduler can take what ever action it pleases, based
   on its policy, and then reschedule the process using the
   sys_schedule() system call.

- Balance queues does not work as before. While the old in-kernel
  function used to renew the quantum of processes in the highest
  priority run queue, the user-space implementation only acts on
  processes that have been bumped down to a lower priority queue.
  This approach reacts slower to changes than the old one, but saves
  us sending a sys_schedule message for each process every time we
  balance the queues. Currently, when processes are moved up a
  priority queue, their quantum is also renewed, but this can be
  fiddled with.

- do_nice has been removed from kernel. PM answers to get- and
  setpriority calls, updates it's own nice variable as well as the
  max_run_queue. This will be refactored once scheduling is moved to a
  separate server. We will probably have PM update it's local nice
  value and then send a message to whoever is scheduling the process.

- changes to fix an issue in do_fork() where processes could run out
  of quantum but bypassing the code path that handles it correctly.
  The future plan is to remove the policy from do_fork() and implement
  it in userspace too.

14 years agoRemoved NIL_SYS_PROC and NIL_PROC
Tomas Hruby [Sun, 28 Mar 2010 09:54:32 +0000 (09:54 +0000)]
Removed NIL_SYS_PROC and NIL_PROC

- NIL_PROC replaced by simple NULLs

14 years agoLots of const correctness.
Kees van Reeuwijk [Sat, 27 Mar 2010 14:31:00 +0000 (14:31 +0000)]
Lots of const correctness.

14 years agoPreserve the order of IPC messages between two parties.
Cristiano Giuffrida [Sat, 27 Mar 2010 00:09:22 +0000 (00:09 +0000)]
Preserve the order of IPC messages between two parties.

Currently a sequence of messages between a sender A and a receiver B of the
form: A.asynsend(M1, B); A.send(M2, B) may result in the receiver receiving
M1 first and then M2 or viceversa. This patch makes sure that the original
order M1, M2 is always preserved.

Note that the order of a hypotetical sequence A.asynsend(M1, B);
A.asynsend(M2, B) is already guaranteed by the implementation of
asynsend by design. Other senda-based wrappers can define their own
semantics.

14 years agoComment in proc.h
Tomas Hruby [Fri, 26 Mar 2010 13:19:04 +0000 (13:19 +0000)]
Comment in proc.h

- This comment is not correct as the pproc_addr array does not exist.

14 years agoDirection flag
Tomas Hruby [Fri, 26 Mar 2010 12:29:52 +0000 (12:29 +0000)]
Direction flag

- ack assumes that the direction flag in eflags is clear when
  assigning two structures. It is implemented by a call to a built-in
  function which is like memcpy but needs the flag to be clear
  otherwise rubish is copied. This patch fixes the kernel entries.

14 years agocdecl calling convention expects the callee to pop the hidden pointer on
Lorenzo Cavallaro [Wed, 24 Mar 2010 17:25:17 +0000 (17:25 +0000)]
cdecl calling convention expects the callee to pop the hidden pointer on
struct return. For example, GCC and LLVM comply with this (tested on IA32).

ACK doesn't seem to follow this convention and expects the caller to clean up
the stack. Compiling hand-written ACK-compliant assembly code (returning a
struct) with GCC or LLVM used to break things (4-bytes misaligned stack).

The patch fixes this problem.

14 years agoMinor docs/UPDATING fix
Arun Thomas [Wed, 24 Mar 2010 13:41:38 +0000 (13:41 +0000)]
Minor docs/UPDATING fix

14 years agoSort docs/UPDATING entries reverse chronologically
Arun Thomas [Wed, 24 Mar 2010 10:13:19 +0000 (10:13 +0000)]
Sort docs/UPDATING entries reverse chronologically

14 years agoFix crtso building with GCC
Arun Thomas [Wed, 24 Mar 2010 10:11:17 +0000 (10:11 +0000)]
Fix crtso building with GCC

14 years agoMore const correctness.
Kees van Reeuwijk [Tue, 23 Mar 2010 14:25:09 +0000 (14:25 +0000)]
More const correctness.
Removed prototype for unimplemented getpgid() function.
Removed a value return from a void function.

14 years agoFixed prototype in cat
Tomas Hruby [Tue, 23 Mar 2010 13:36:16 +0000 (13:36 +0000)]
Fixed prototype in cat

14 years agoInterrupts hadling while idle
Tomas Hruby [Tue, 23 Mar 2010 13:35:01 +0000 (13:35 +0000)]
Interrupts hadling while idle

- When the cpu halts, the interrupts are enable so the cpu may be
  woken up. When the interrupt handler returns but another interrupt
  is available it is also serviced immediately. This is not a problem
  per-se. It only slightly breaks time accounting as idle accounted is
  for the kernel time in the interrupt handler.

-  As the big kernel lock is lock/unlocked in the smp branch in the
   time acounting functions as they are called exactly at the places
   we need to take the lock) this leads to a deadlock.

- we make sure that once the interrupt handler returns from the nested
  trap, the interrupts are disabled. This means that only one
  interrupt is serviced after idle is interrupted.

- this requires the loop in apic timer calibration to keep reenabling
  the interrupts. I admit it is a little bit hackish (one line),
  however, this code is a stupid corner case at the boot time.
  Hopefully it does not matter too much.

14 years agoIPC status code for receive().
Cristiano Giuffrida [Tue, 23 Mar 2010 00:09:11 +0000 (00:09 +0000)]
IPC status code for receive().

IPC changes:
- receive() is changed to take an additional parameter, which is a pointer to
a status code.
- The status code is filled in by the kernel to provide additional information
to the caller. For now, the kernel only fills in the IPC call used by the
sender.

Syslib changes:
- sef_receive() has been split into sef_receive() (with the original semantics)
and sef_receive_status() which exposes the status code to userland.
- Ideally, every sys process should gradually switch to sef_receive_status()
and use is_ipc_notify() as a dependable way to check for notify.
- SEF has been modified to use is_ipc_notify() and demonstrate how to use the
new status code.

14 years agoPrioritized NOTIFY messages for reliable asynchonrous delivery of system events.
Cristiano Giuffrida [Mon, 22 Mar 2010 23:44:55 +0000 (23:44 +0000)]
Prioritized NOTIFY messages for reliable asynchonrous delivery of system events.

14 years agoPrint stacktrace when a system service fails or when a core dump has to be generated...
Cristiano Giuffrida [Mon, 22 Mar 2010 22:46:29 +0000 (22:46 +0000)]
Print stacktrace when a system service fails or when a core dump has to be generated for a user process.

14 years agoConvert drivers/ and servers/ over to bsdmake
Arun Thomas [Mon, 22 Mar 2010 21:25:22 +0000 (21:25 +0000)]
Convert drivers/ and servers/ over to bsdmake

-Move libdriver to lib/
-Install all boot image services on filesystem to aid restartability

14 years agoMiscellaneous code cleanup.
Kees van Reeuwijk [Mon, 22 Mar 2010 20:43:06 +0000 (20:43 +0000)]
Miscellaneous code cleanup.

14 years agoonly print 1 every 1000 spurious interrupts (per interrupt).
Ben Gras [Mon, 22 Mar 2010 13:55:51 +0000 (13:55 +0000)]
only print 1 every 1000 spurious interrupts (per interrupt).

14 years agoatomicity fix when enabling paging
Tomas Hruby [Mon, 22 Mar 2010 07:42:52 +0000 (07:42 +0000)]
atomicity fix when enabling paging

- before enabling paging VM asks kernel to resize its segments. This
  may cause kernel to segfault if APIC is used and an interrupt
  happens between this and paging enabled. As these are 2 separate
  vmctl calls it is not atomic. This patch fixes this problem. VM does
  not ask kernel to resize the segments in a separate call anymore.
  The new segments limit is part of the "enable paging" call. It
  generalizes this call in such a way that more information can be
  passed as need be or the information may be completely different if
  another architecture requires this.

14 years agoKernel dumps its registers when exception
Tomas Hruby [Sat, 20 Mar 2010 14:59:18 +0000 (14:59 +0000)]
Kernel dumps its registers when exception

- if an exception occurs in kernel and this exception is not handled
  in an sane way and the kernel crashes, it also dumps what was loaded
  in the general purpose registers exactly at the time of the
  exception to help to debug the problem

14 years agothis patch adds access to the debug breakpoints to
Erik van der Kouwe [Fri, 19 Mar 2010 19:15:20 +0000 (19:15 +0000)]
this patch adds access to the debug breakpoints to
the kernel. They are not used atm, but having them in trunk allows them
to be easily used when needed. To set a breakpoint that triggers when
the variable foo is written to (the most common use case), one calls:

breakpoint_set(vir2phys((vir_bytes) &foo), 0,
  BREAKPOINT_FLAG_MODE_GLOBAL |
  BREAKPOINT_FLAG_RW_WRITE |
  BREAKPOINT_FLAG_LEN_4);

It can later be disabled using:

breakpoint_set(vir2phys((vir_bytes) &foo), 0,
  BREAKPOINT_FLAG_MODE_OFF);

There are some limitations:

- There are at most four breakpoints (hardware limit); the index of the
  breakpoint (0-3) is specified as the second parameter of
  breakpoint_set.

- The breakpoint exception in the kernel is not handled and causes a
  panic; it would be reasonably easy to change this by inspecing DR6,
  printing a message, disabling the breakpoint and continuing. However,
  in my experience even just a panic can be very useful.

- Breakpoints can be set only in the part of the address space that is
  in every page table. It is useful for the kernel, but to use this for
  user processes would require saving and restoring the debug registers
  as part of the context switch. Although the CPU provides support for
  local breakpoints (I implemened this as BREAKPOINT_FLAG_LOCAL) they
  only work if task switching is used.

14 years agoSpecify missing return type
Erik van der Kouwe [Fri, 19 Mar 2010 19:07:00 +0000 (19:07 +0000)]
Specify missing return type

14 years agoVM: fix kernel mappings for children of non-paged parents.
Ben Gras [Thu, 18 Mar 2010 17:17:31 +0000 (17:17 +0000)]
VM: fix kernel mappings for children of non-paged parents.

14 years agodocs/UPDATING correction
Tomas Hruby [Thu, 18 Mar 2010 17:00:32 +0000 (17:00 +0000)]
docs/UPDATING correction

14 years agoFixed kernel stack comment
Tomas Hruby [Thu, 18 Mar 2010 16:18:22 +0000 (16:18 +0000)]
Fixed kernel stack comment

14 years agoremove 3 awk files - don't have generated files in svn.
Ben Gras [Thu, 18 Mar 2010 14:15:48 +0000 (14:15 +0000)]
remove 3 awk files - don't have generated files in svn.

14 years agochange messy CREATEPDE macro to clean little function.
Ben Gras [Thu, 18 Mar 2010 13:35:41 +0000 (13:35 +0000)]
change messy CREATEPDE macro to clean little function.

forget about the dirtypde bitmap and WIPEPDE/DONEPDE macros too.

check if mapping happens to already be in place, and if so, don't
reload cr3 (on the account of that mapping, that is).

don't reload cr3 unconditionally.

14 years agoProvide a warning is a kernel call has been denied, to ease system.conf debugging
Erik van der Kouwe [Wed, 17 Mar 2010 18:23:51 +0000 (18:23 +0000)]
Provide a warning is a kernel call has been denied, to ease system.conf debugging

14 years agoLet awk.old install its awk as /usr/bin/awk.old.
Kees van Reeuwijk [Wed, 17 Mar 2010 16:16:52 +0000 (16:16 +0000)]
Let awk.old install its awk as /usr/bin/awk.old.
Add one-true-awk as the new awk that installs to /usr/bin/awk.

14 years agoMoved current awk sources to awk.old.
Kees van Reeuwijk [Wed, 17 Mar 2010 16:11:48 +0000 (16:11 +0000)]
Moved current awk sources to awk.old.

14 years agoAdd a define for NSIG.
Kees van Reeuwijk [Wed, 17 Mar 2010 13:43:34 +0000 (13:43 +0000)]
Add a define for NSIG.

14 years agoNew RS and new signal handling for system processes.
Cristiano Giuffrida [Wed, 17 Mar 2010 01:15:29 +0000 (01:15 +0000)]
New RS and new signal handling for system processes.

UPDATING INFO:
20100317:
        /usr/src/etc/system.conf updated to ignore default kernel calls: copy
        it (or merge it) to /etc/system.conf.
        The hello driver (/dev/hello) added to the distribution:
        # cd /usr/src/commands/scripts && make clean install
        # cd /dev && MAKEDEV hello

KERNEL CHANGES:
- Generic signal handling support. The kernel no longer assumes PM as a signal
manager for every process. The signal manager of a given process can now be
specified in its privilege slot. When a signal has to be delivered, the kernel
performs the lookup and forwards the signal to the appropriate signal manager.
PM is the default signal manager for user processes, RS is the default signal
manager for system processes. To enable ptrace()ing for system processes, it
is sufficient to change the default signal manager to PM. This will temporarily
disable crash recovery, though.
- sys_exit() is now split into sys_exit() (i.e. exit() for system processes,
which generates a self-termination signal), and sys_clear() (i.e. used by PM
to ask the kernel to clear a process slot when a process exits).
- Added a new kernel call (i.e. sys_update()) to swap two process slots and
implement live update.

PM CHANGES:
- Posix signal handling is no longer allowed for system processes. System
signals are split into two fixed categories: termination and non-termination
signals. When a non-termination signaled is processed, PM transforms the signal
into an IPC message and delivers the message to the system process. When a
termination signal is processed, PM terminates the process.
- PM no longer assumes itself as the signal manager for system processes. It now
makes sure that every system signal goes through the kernel before being
actually processes. The kernel will then dispatch the signal to the appropriate
signal manager which may or may not be PM.

SYSLIB CHANGES:
- Simplified SEF init and LU callbacks.
- Added additional predefined SEF callbacks to debug crash recovery and
live update.
- Fixed a temporary ack in the SEF init protocol. SEF init reply is now
completely synchronous.
- Added SEF signal event type to provide a uniform interface for system
processes to deal with signals. A sef_cb_signal_handler() callback is
available for system processes to handle every received signal. A
sef_cb_signal_manager() callback is used by signal managers to process
system signals on behalf of the kernel.
- Fixed a few bugs with memory mapping and DS.

VM CHANGES:
- Page faults and memory requests coming from the kernel are now implemented
using signals.
- Added a new VM call to swap two process slots and implement live update.
- The call is used by RS at update time and in turn invokes the kernel call
sys_update().

RS CHANGES:
- RS has been reworked with a better functional decomposition.
- Better kernel call masks. com.h now defines the set of very basic kernel calls
every system service is allowed to use. This makes system.conf simpler and
easier to maintain. In addition, this guarantees a higher level of isolation
for system libraries that use one or more kernel calls internally (e.g. printf).
- RS is the default signal manager for system processes. By default, RS
intercepts every signal delivered to every system process. This makes crash
recovery possible before bringing PM and friends in the loop.
- RS now supports fast rollback when something goes wrong while initializing
the new version during a live update.
- Live update is now implemented by keeping the two versions side-by-side and
swapping the process slots when the old version is ready to update.
- Crash recovery is now implemented by keeping the two versions side-by-side
and cleaning up the old version only when the recovery process is complete.

DS CHANGES:
- Fixed a bug when the process doing ds_publish() or ds_delete() is not known
by DS.
- Fixed the completely broken support for strings. String publishing is now
implemented in the system library and simply wraps publishing of memory ranges.
Ideally, we should adopt a similar approach for other data types as well.
- Test suite fixed.

DRIVER CHANGES:
- The hello driver has been added to the Minix distribution to demonstrate basic
live update and crash recovery functionalities.
- Other drivers have been adapted to conform the new SEF interface.

14 years agotypo
David van Moolenbroek [Tue, 16 Mar 2010 16:21:28 +0000 (16:21 +0000)]
typo

14 years agoFixed a bug in interrupt handling code when removing a handler in case of
Cristiano Giuffrida [Tue, 16 Mar 2010 10:20:36 +0000 (10:20 +0000)]
Fixed a bug in interrupt handling code when removing a handler in case of
a shared IRQ.

14 years agoMinor correction in UPDATING
Erik van der Kouwe [Tue, 16 Mar 2010 08:16:13 +0000 (08:16 +0000)]
Minor correction in UPDATING

14 years agoConvert man/ over to new make
Arun Thomas [Tue, 16 Mar 2010 00:15:43 +0000 (00:15 +0000)]
Convert man/ over to new make

14 years agoSuppressed some warnings in the WIFSIGNALED macro.
Kees van Reeuwijk [Mon, 15 Mar 2010 18:33:29 +0000 (18:33 +0000)]
Suppressed some warnings in the WIFSIGNALED macro.

14 years agoFix bug item #405: missing # in front of comment
Thomas Veerman [Mon, 15 Mar 2010 10:42:51 +0000 (10:42 +0000)]
Fix bug item #405: missing # in front of comment

14 years ago- Add support for the ucontext system calls (getcontext, setcontext,
Thomas Veerman [Fri, 12 Mar 2010 15:58:41 +0000 (15:58 +0000)]
- Add support for the ucontext system calls (getcontext, setcontext,
  swapcontext, and makecontext).
- Fix VM to not erroneously think the stack segment and data segment have
  collided when a user-space thread invokes brk().
- Add test51 to test ucontext functionality.
- Add man pages for ucontext system calls.

14 years agoLet the commands/simple/tr.c understand about '\t', '\r', and '\n'.
Kees van Reeuwijk [Fri, 12 Mar 2010 09:58:44 +0000 (09:58 +0000)]
Let the commands/simple/tr.c understand about '\t', '\r', and '\n'.

14 years agoAdd an UNUSED annotation, and use it in libsys.
Kees van Reeuwijk [Thu, 11 Mar 2010 14:23:33 +0000 (14:23 +0000)]
Add an UNUSED annotation, and use it in libsys.

14 years agoWork around KVM unreal mode bug by avoiding unreal mode
Erik van der Kouwe [Wed, 10 Mar 2010 15:32:31 +0000 (15:32 +0000)]
Work around KVM unreal mode bug by avoiding unreal mode

14 years agoClean up code in preparation for using gcc warnings.
Kees van Reeuwijk [Wed, 10 Mar 2010 13:19:27 +0000 (13:19 +0000)]
Clean up code in preparation for using gcc warnings.

14 years agore-establish kernel assert()s.
Ben Gras [Wed, 10 Mar 2010 13:00:05 +0000 (13:00 +0000)]
re-establish kernel assert()s.

use the regular <assert.h> assert() instead of vmassert() in
kernel. throw out some #if 0 code. fix a few assert() conditions.
enable by default.

14 years agoAdd prototypes for a bunch of time-related functions. Surprisingly,
Kees van Reeuwijk [Tue, 9 Mar 2010 22:10:58 +0000 (22:10 +0000)]
Add prototypes for a bunch of time-related functions. Surprisingly,
they were in the implementation, but not in the header files.

14 years agoAdd a set of declarations to math.h. Since we don't actually have
Kees van Reeuwijk [Tue, 9 Mar 2010 22:05:20 +0000 (22:05 +0000)]
Add a set of declarations to math.h. Since we don't actually have
implementations for these functions, we lean on GNU builtin functions
for using them, so these declarations are also conditional on using
a GNU compiler.

14 years agofix newsigset/oldsigset references
Dirk Vogt [Tue, 9 Mar 2010 20:46:26 +0000 (20:46 +0000)]
fix newsigset/oldsigset references

14 years agoPrevent the use of an unitialized variable for block size in CRC calculation.
Kees van Reeuwijk [Tue, 9 Mar 2010 16:21:41 +0000 (16:21 +0000)]
Prevent the use of an unitialized variable for block size in CRC calculation.

14 years agoFlex: Fix install(1) invocation in build
Arun Thomas [Tue, 9 Mar 2010 09:43:53 +0000 (09:43 +0000)]
Flex: Fix install(1) invocation in build

14 years agoMove archtypes.h, fpu.h, and stackframe.h
Arun Thomas [Tue, 9 Mar 2010 09:41:14 +0000 (09:41 +0000)]
Move archtypes.h, fpu.h, and stackframe.h

Move archtypes.h to include/ dir, since several servers require it. Move
fpu.h and stackframe.h to arch-specific header directory. Make source
files and makefiles aware of the new header locations.

14 years agoVFS fixes:
David van Moolenbroek [Mon, 8 Mar 2010 22:05:27 +0000 (22:05 +0000)]
VFS fixes:
- do not use uninitialized req_breadwrite results upon failure
- improve ".." ELEAVEMOUNT correctness check

14 years agoAlso run fixincludes in gcc 4.4.3
Kees van Reeuwijk [Mon, 8 Mar 2010 14:51:00 +0000 (14:51 +0000)]
Also run fixincludes in gcc 4.4.3

14 years agofix for wrong arg to va_end() in panic() (thanks tveerman)
Ben Gras [Mon, 8 Mar 2010 14:36:55 +0000 (14:36 +0000)]
fix for wrong arg to va_end() in panic() (thanks tveerman)

14 years agoInclude directory reorg and makefile updates.
Arun Thomas [Mon, 8 Mar 2010 11:04:59 +0000 (11:04 +0000)]
Include directory reorg and makefile updates.

-Convert the include directory over to using bsdmake
 syntax
-Update/add mkfiles
-Modify install(1) so that it can create symlinks
-Update makefiles to use new install(1) options
-Rename /usr/include/ibm to /usr/include/i386
-Create /usr/include/machine symlink to arch header files
-Move vm_i386.h to its new home in the /usr/include/i386
-Update source files to #include the header files at their
 new homes.
-Add new gnu-includes target for building GCC headers

14 years agoFix for FPU broken by r6131
Tomas Hruby [Fri, 5 Mar 2010 22:23:03 +0000 (22:23 +0000)]
Fix for FPU broken by r6131

- cycles accounting must be called earlier, firstly not to clobber the %ebx
  register, secondly to be correctly called in both branches.

14 years agopanic() cleanup.
Ben Gras [Fri, 5 Mar 2010 15:05:11 +0000 (15:05 +0000)]
panic() cleanup.

this change
   - makes panic() variadic, doing full printf() formatting -
     no more NO_NUM, and no more separate printf() statements
     needed to print extra info (or something in hex) before panicing
   - unifies panic() - same panic() name and usage for everyone -
     vm, kernel and rest have different names/syntax currently
     in order to implement their own luxuries, but no longer
   - throws out the 1st argument, to make source less noisy.
     the panic() in syslib retrieves the server name from the kernel
     so it should be clear enough who is panicing; e.g.
         panic("sigaction failed: %d", errno);
     looks like:
         at_wini(73130): panic: sigaction failed: 0
         syslib:panic.c: stacktrace: 0x74dc 0x2025 0x100a
   - throws out report() - printf() is more convenient and powerful
   - harmonizes/fixes the use of panic() - there were a few places
     that used printf-style formatting (didn't work) and newlines
     (messes up the formatting) in panic()
   - throws out a few per-server panic() functions
   - cleans up a tie-in of tty with panic()

merging printf() and panic() statements to be done incrementally.

14 years agoMove cp_grant_id_t to a more central header file, and uses it more
Kees van Reeuwijk [Thu, 4 Mar 2010 16:15:26 +0000 (16:15 +0000)]
Move cp_grant_id_t to a more central header file, and uses it more
extensively.
Fix casts that cast the grand id field of some messages to the wrong
type.

14 years agoNo more E{SRC,DST}DIED errno's, replaced by EDEADSRCDST.
Ben Gras [Wed, 3 Mar 2010 15:47:16 +0000 (15:47 +0000)]
No more E{SRC,DST}DIED errno's, replaced by EDEADSRCDST.

The callers don't care about the difference and had to check 3 error
codes instead of one.

14 years agotop manpage update
Ben Gras [Wed, 3 Mar 2010 15:46:20 +0000 (15:46 +0000)]
top manpage update

14 years agonew feature for top - display chain of blocked processes for every
Ben Gras [Wed, 3 Mar 2010 15:45:43 +0000 (15:45 +0000)]
new feature for top - display chain of blocked processes for every
blocked process.

14 years agono more kprintf - kernel uses libsys printf now, only kputc is special
Ben Gras [Wed, 3 Mar 2010 15:45:01 +0000 (15:45 +0000)]
no more kprintf - kernel uses libsys printf now, only kputc is special
to the kernel.

14 years agoNew P_BLOCKEDON for kernel - a macro that encodes the "who is this
Ben Gras [Wed, 3 Mar 2010 15:32:26 +0000 (15:32 +0000)]
New P_BLOCKEDON for kernel - a macro that encodes the "who is this
process waiting for" logic, which is duplicated a few times in the
kernel. (For a new feature for top.)

Introducing it and throwing out ESRCDIED and EDSTDIED (replaced by
EDEADSRCDST - so we don't have to care which part of the blocking is
failing in system.c) simplifies some code in the kernel and callers that
check for E{DEADSRCDST,ESRCDIED,EDSTDIED}, but don't care about the
difference, a fair bit, and more significantly doesn't duplicate the
'blocked-on' logic.

14 years agoConvert library asm files to GAS syntax
Arun Thomas [Wed, 3 Mar 2010 14:27:30 +0000 (14:27 +0000)]
Convert library asm files to GAS syntax

14 years agoMore correctly use cp_grant_id_t.
Kees van Reeuwijk [Tue, 2 Mar 2010 23:12:13 +0000 (23:12 +0000)]
More correctly use cp_grant_id_t.
More correctly use vir_bytes.
More correctly use endpoint_t.

14 years agoFixed a number of cases where a bits in an integer were tested
Kees van Reeuwijk [Tue, 2 Mar 2010 12:55:39 +0000 (12:55 +0000)]
Fixed a number of cases where a bits in an integer were tested
incorrectly, resulting in real (and nasty) bugs.

14 years agoTypo in VM server
Tomas Hruby [Tue, 2 Mar 2010 10:53:17 +0000 (10:53 +0000)]
Typo in VM server

14 years agoslight tuning of /etc/mk situation when making release.
Ben Gras [Mon, 1 Mar 2010 15:53:57 +0000 (15:53 +0000)]
slight tuning of /etc/mk situation when making release.

  - Make the bootstrap /etc/mk be populated from the newly checked out source
  - Don't chmod 755 all of /etc
  - For the 'real' /etc/mk installing, let the /etc/mk ownership and permission
    come from the mtree file, delete the contents of /etc/mk, then copy the .mk
    files over and set reasonable permissions and ownership. (So that the .mk
    get updated from the real usr/src/ copies, and no other junk if anything,
    after the bootstrap phase, whatever happened there.)

14 years ago#include <minix/ipc.h> in <minix/sef.h>
Erik van der Kouwe [Fri, 26 Feb 2010 10:13:50 +0000 (10:13 +0000)]
#include <minix/ipc.h> in <minix/sef.h>

14 years ago#include <minix/ipc.h> in <minix/sef.h>
Erik van der Kouwe [Fri, 26 Feb 2010 10:12:54 +0000 (10:12 +0000)]
#include <minix/ipc.h> in <minix/sef.h>

14 years agoCopy mkfiles when building world
Arun Thomas [Thu, 25 Feb 2010 22:10:48 +0000 (22:10 +0000)]
Copy mkfiles when building world

14 years ago - new pread(), fnmatch() calls
Ben Gras [Thu, 25 Feb 2010 17:08:08 +0000 (17:08 +0000)]
 - new pread(), fnmatch() calls
 - split sprintf() and snprintf() to solve a linking problem when
   compiling an application

14 years agoReplace Minix tar with pax's tar
Arun Thomas [Wed, 24 Feb 2010 11:58:10 +0000 (11:58 +0000)]
Replace Minix tar with pax's tar

14 years agoImprove makefile logic for building programs/libs
Arun Thomas [Wed, 24 Feb 2010 11:58:05 +0000 (11:58 +0000)]
Improve makefile logic for building programs/libs

14 years agoFixed an array bounds violation.
Kees van Reeuwijk [Wed, 24 Feb 2010 10:39:58 +0000 (10:39 +0000)]
Fixed an array bounds violation.
Let include guards comform to the Minix standard.

14 years agoFix an array-bound violation, add some include guards.
Kees van Reeuwijk [Mon, 22 Feb 2010 17:44:08 +0000 (17:44 +0000)]
Fix an array-bound violation, add some include guards.

14 years agoremove subdirs that aren't built.
Ben Gras [Fri, 19 Feb 2010 16:31:43 +0000 (16:31 +0000)]
remove subdirs that aren't built.

ftp is superseded by other dirs, i86 is not used, httpd* is superseded
by packages, sed is superseded by simple/sed.c.

14 years agoadd swifi to the build/install.
Ben Gras [Fri, 19 Feb 2010 16:16:28 +0000 (16:16 +0000)]
add swifi to the build/install.

14 years agofix some warning in swifi, make it installable
Ben Gras [Fri, 19 Feb 2010 16:15:25 +0000 (16:15 +0000)]
fix some warning in swifi, make it installable