Jorrit Herder [Fri, 24 Jun 2005 16:24:40 +0000 (16:24 +0000)]
Cleaned up process table structure: removed p_type, p_pendcount.
Removed stop sequence when MINIX is shut down.
Disabled send mask checks --- to be replaced by proper mechanism.
Fixed bug relating to 'shutdown -x'.
Simplified clock accounting of realtime.
Updated Makefiles for mkdept script.
Ben Gras [Wed, 22 Jun 2005 15:22:34 +0000 (15:22 +0000)]
Workaround for fishy situation that caused checksum on outgoing packets
to be broken in certain cases. (Seemingly when 2 short packets sent
back-to-back.) Buffer alignment seems to fix this ...
Ben Gras [Mon, 20 Jun 2005 14:53:13 +0000 (14:53 +0000)]
Added function read_cpu_flags() that returns current cpu flags as a
long. This is used to check for interrupts being disabled at the time
of a lock() call, if enabled in config.h. The number of times this
happens is then counted in the kinfo structure. These events (recursive
lockings) lead to nasty race conditions.
Jorrit Herder [Mon, 20 Jun 2005 14:23:31 +0000 (14:23 +0000)]
Updated function key mapping because of possible changes to NOTIFY.
The TTY driver now only notifies the IS server about function key event,
but does not tell which keys are pressed. The IS servers queries the TTY
driver to find out about this.
Ben Gras [Mon, 20 Jun 2005 09:35:23 +0000 (09:35 +0000)]
Fixed a few quirks in misc.c
. MAX used where it should've been MIN
. buffer byte too short
. inobvious use of & with && without parantheses
. funny length checking
Ben Gras [Sun, 19 Jun 2005 23:16:08 +0000 (23:16 +0000)]
Fixed bug that caused the PM to brutalize the contents of the 'memory'
variable. Parsing worked, but future requests for the variable (such as
by the sysenv command) returned truncated data. This caused the system
(e.g. setup script) to think the amount of memory was tiny, and caused
the enabling of swapspace, while it is unnecessary.
Ben Gras [Sun, 19 Jun 2005 22:33:49 +0000 (22:33 +0000)]
Fixed nasty bug that would cause FS to loop forever in rw_scattered (while
syncing, for instance) if blocks are unwritable. This could happen if:
. write goes beyond device boundary to a block device
. write is done for a complete block or more; thus the
block is not retrieved first (at which point it would be noticed
it doesn't exist), but the buffer is simply allocated
. at write time, the device i/o doesn't succeed, but rw_scattered
doesn't understand this and loops forever trying to get the block
written.
Currently, if no blocks can be written, the loop aborts, leaving all
buffers intact but potentially dirty. When invalidate() is called on the
device, the buffers will disappear (even if dirty). Same story for if
the buffer is removed due to rmed from lru chain. There's not much we
can do about this, however - we can't keep these blocks around, forever
occupying a buffer in the buffer cache.
The second part of the solution is not to let unwritable buffers be
created in the first place. How to do this, however, without doing a
wasteful read first?
Ben Gras [Fri, 17 Jun 2005 13:45:40 +0000 (13:45 +0000)]
Select test-set imported from the minix contributions, with permission
to modify and distribute from Jose Manuel Gomez, the author
(jmgomez@linuxmail.org).
Jorrit Herder [Fri, 17 Jun 2005 09:09:54 +0000 (09:09 +0000)]
* Fixed bug relating to nested locking in interrupt handlers. The nested lock
caused interrupts to be reenabled (due to unlock), which caused a race. The
problems were especially visible on slower machines.
* Relocated free memory parsing to process manager. This saved quite some
code at the kernel level. Text size was reduced by about 650 bytes.
* Removed locks for updating the realtime in the clock's main loop and the
get_uptime function. Interrupts are no longer reentrant, so realtime is
immediately updated.
Jorrit Herder [Tue, 7 Jun 2005 14:43:35 +0000 (14:43 +0000)]
Removed debug dumps from the PM and FS servers. The dumps are now done by the
IS servers, which obtains a copy of the data through the getsysinfo() system
call. CTRL-F1 now is a special TTY key to shows function key mappings.
Jorrit Herder [Tue, 7 Jun 2005 12:34:25 +0000 (12:34 +0000)]
Kernel cleanup.
Reduced kernel size by 512KB by moving private buffer into cstart() function.
Replaced assertions with erroneous return values. Removed assertions relating
to isuserp(rp), since all processes should become user processes; system
processes are now treated similar to other processes.
Ben Gras [Mon, 6 Jun 2005 11:40:32 +0000 (11:40 +0000)]
small compile fixes; initial select() stubs; release.sh script doesn't
need /tmp any more since 16MB root device; increase to 3.0.5 to make new
CD with working FXP driver. (not tagged 3.0.5 yet as at driver bios-copy
workaround hasn't been done.)
Jorrit Herder [Mon, 6 Jun 2005 09:30:44 +0000 (09:30 +0000)]
Fixed bug relating to FS and MEMORY during startup;
Relocated some syslib functions to utils library;
Changed location of 'Multiuser startup ..." echo in /etc/rc
Jorrit Herder [Fri, 3 Jun 2005 13:55:06 +0000 (13:55 +0000)]
Various updates.
* Removed some variants of the SYS_GETINFO calls from the kernel;
replaced them with new PM and utils libary functionality. Fixed
bugs in utils library that used old get_kenv() variant.
* Implemented a buffer in the kernel to gather random data.
Memory driver periodically checks this for /dev/random.
A better random algorithm can now be implemented in the driver.
Removed SYS_RANDOM; the SYS_GETINFO call is used instead.
* Remove SYS_KMALLOC from the kernel. Memory allocation can now
be done at the process manager with new 'other' library functions.
Ben Gras [Fri, 3 Jun 2005 08:59:54 +0000 (08:59 +0000)]
prettified rtl driver:
. no more kmalloc
. no more umaps + physcopies / abscopies
. the status register is directly readable from the drivers own
address space now, and no physcopy is needed to read it
. map+physcopy call combinations are replaced by vircopy calls
Jorrit Herder [Wed, 1 Jun 2005 14:31:00 +0000 (14:31 +0000)]
Cleaned up src/lib/utils library. Renamed server_ functions to more logical
names. All system processes can now either use panic() or report() from
libutils, or redefine their own function. Assertions are done via the standard
<assert.h> functionality.
Ben Gras [Wed, 1 Jun 2005 09:39:45 +0000 (09:39 +0000)]
exec now uses phys_zero system call to zero bss segments (instead of
using phys_copy to copy zeroes there for every kb), which is a big
optimisation in some cases
fixed a bug that was introduced when function keys became notifies
Ben Gras [Wed, 1 Jun 2005 09:36:07 +0000 (09:36 +0000)]
Added sys_physzero library call for corresponding system call; modified
system-printf() so it returns number of characters printed (for use in
smart formatting)
Ben Gras [Tue, 31 May 2005 15:22:06 +0000 (15:22 +0000)]
Fix for 'the kermit problem' (keyrepeats happening before the keyrepeat
timeout). A fix is to treat the alarm and interrupt cases differently and
only call the interrupt handler when an actual interrupt has been seen. No
apparent adverse effects.