Commit graph

315 commits

Author SHA1 Message Date
Jorrit Herder
74711a3b14 Check if kernel calls is allowed (from process' call mask) added. Not yet
enforced. If a call is denied, this will be kprinted. Please report any such
errors, so that I can adjust the mask before returning errors instead of
warnings.

Wrote CMOS driver. All CMOS code from FS has been removed. Currently the
driver only supports get time calls. Set time is left out as an exercise
for the book readers ... startup scripts were updated because the CMOS driver
is needed early on. (IS got same treatment.) Don't forget to run MAKEDEV cmos
in /dev/, otherwise the driver cannot be loaded.
2005-08-04 19:23:03 +00:00
Jorrit Herder
e561081545 Miscellaneous clean ups and fixes to the kernel.
Support for FLOPPY in boot image. (Set controller=fd at boot monitor.)
Moved major device numbers to <minix/dmap.h> (maybe rename to dev.h?)
2005-08-04 09:26:36 +00:00
Jorrit Herder
3f28baac83 Disabled comments from FXP driver with #define VERBOSE 0.
Fixed all troubles reported at shutdown.
No more illegal FS calls by dead processes.
2005-08-03 16:58:22 +00:00
Jorrit Herder
89cf745fe2 Single boot driver loaded, while multiple can be included in the boot image.
The user needs to set label=... to choose the driver of his or her choice.
This driver will be mapped onto the controller that is set in controller=...

Minor cleanup of kernel source code (boot image table now is static).
2005-08-03 16:06:35 +00:00
Philip Homburg
c12b74dad5 Random is now a separate driver. 2005-08-03 15:22:41 +00:00
Jorrit Herder
1ae4d41d0d Without /dev/boot ... 2005-08-03 14:17:28 +00:00
Jorrit Herder
375f6f8754 Miscellaneous cleanups. 2005-08-03 11:53:36 +00:00
Philip Homburg
547bf3ac36 Implemented some boundary cases for LISTENQ. 2005-08-03 11:15:39 +00:00
Jorrit Herder
b69ca94efb Fixed 'bug' in log driver that caused kernel messages not to be displayed.
This was caused by a change in the shared driver code. Not log's fault.

Renamed #definitions of driver process numbers, e.g., TTY now is TTY_PROC_NR.
All known (special) processes now have consistent naming scheme. Kernel tasks
don't follow this scheme.
2005-08-03 08:14:08 +00:00
Jorrit Herder
89d86ddb9c Utility to dynamically start system services. 2005-08-02 16:00:07 +00:00
Jorrit Herder
0bd61375ad Miscellaneous small fixes to prettify startup output. 2005-08-02 15:56:24 +00:00
Jorrit Herder
f44725b777 Created new devctl system call to FS. Moved dmap.h header to include/minix/.
Various updates to support dynamically starting servers and suppress output.
2005-08-02 15:29:17 +00:00
Jorrit Herder
1198491af2 *** empty log message *** 2005-07-29 15:33:31 +00:00
Jorrit Herder
d3874a7917 Updated servers according to syslib interface changes. 2005-07-29 15:00:49 +00:00
Jorrit Herder
d62e515660 Small update to SYS_IRQCTL -> setting an interrupt policy now allows the caller
to provide an index (0 .. 31) that is passed in the HARD_INT message when an
interrupt occurs. The NOTIFY_ARG field contains a bitmap with all indexes for
which an interrupt occured.
2005-07-29 12:44:42 +00:00
Philip Homburg
49c25df569 bios_wini driver 2005-07-29 10:21:04 +00:00
Philip Homburg
92d44e8108 Replaced REVIVE and select/notify with alert and DEV_STATUS. 2005-07-27 16:35:16 +00:00
Ben Gras
3292badc37 Added dup_inode to fchdir() call. Still not sure if it is correct now. 2005-07-27 16:04:26 +00:00
Ben Gras
ed6459b304 *** empty log message *** 2005-07-27 14:30:25 +00:00
Ben Gras
b924ce0726 Prettify scheduling queue prints 2005-07-27 14:30:17 +00:00
Ben Gras
08934187c9 FS understanding revives and selects as alerts (new notifies) 2005-07-27 13:08:52 +00:00
Philip Homburg
dd7220f234 Listen/accept. Read select for UDP. 2005-07-27 12:07:12 +00:00
Philip Homburg
3aadb79b1b 3 -> T_GETUSER 2005-07-27 12:03:09 +00:00
Philip Homburg
aa994b48ee Do not accept requests from dead processes. 2005-07-27 12:01:11 +00:00
Ben Gras
2b810f6923 Prettier s_flags printing 2005-07-27 07:00:20 +00:00
Jorrit Herder
a41eb700e8 Minor fixes and improvements for sys_call(). 2005-07-26 13:51:21 +00:00
Ben Gras
10aa135d82 Minor cdprobe message additions; usyslogd logs shorter lines 2005-07-26 13:23:13 +00:00
Jorrit Herder
4bf6edfd14 Framework (and some functionality) for new server ...
Work in progress ...
2005-07-26 13:08:57 +00:00
Jorrit Herder
3d0b9140f2 Updated F4 dump at IS to include send masks.
Removed unused constant from fproc.h
Changed signal behaviour at PM (work in progress)
2005-07-26 12:49:35 +00:00
Ben Gras
ca80161f40 . Junk-filling gap+stack code on exec() if enabled (not enabled now)
. Allow 'boot monitor' variable changes and additions by svrctl call
2005-07-22 18:29:58 +00:00
Ben Gras
6e8f484b3b . added cd-probe logic; tries to find the right root filesystem
if the boot monitor parameter is set. it also sets a boot monitor
  parameter (by talking to the PM) so userland knows it.
. ramdisk copy code made slightly smarter
. various select() prettifications (work in progress)
2005-07-22 18:28:32 +00:00
Jorrit Herder
b9b334c38c Functionality moved from IS to LOG driver. 2005-07-22 11:05:56 +00:00
Jorrit Herder
808202ee30 Removed printing functionality from IS server.
This functionality is now provided by the LOG driver.
2005-07-21 18:31:27 +00:00
Jorrit Herder
f1153541c7 Fixed bug in PM that caused update program not to be scheduled, so that
sync was not periodically run. Chain of timers was accidentially broken.

Kernel sends SIGKSTOP signal on shutdown. FS calls sync to clean up.
2005-07-20 15:27:42 +00:00
Ben Gras
d5d9764dbb Uninitialised field at init 2005-07-20 14:04:19 +00:00
Jorrit Herder
5594b767c0 Renamed src/lib/utils to src/lib/sysutil --- because of new src/lib/util 2005-07-19 13:21:51 +00:00
Jorrit Herder
f2e16763e7 Removed PM signon for INET. Now daemonized in /usr/etc/rc.
SIGTRAP generated in PM (where it belongs / no longer in kernel).
Updated Makefiles: servers are now installed in /usr/sbin.
2005-07-19 12:11:11 +00:00
Jorrit Herder
eba45510a9 New alarm(2) timers mechanism.
Kernel no longer keeps track of user alarms on behalf of the PM.
Instead, the PM maintains its own list of watchdog timers, and
uses one synchronous alarm (at the kernel) to get notifications
for expired user timers.
2005-07-14 15:30:12 +00:00
Jorrit Herder
570eac1f53 Renamed system library functionality.
Updated debug dumps of IS server.
2005-07-14 15:16:12 +00:00
Philip Homburg
c60f3ff846 Select patches for TCP read and write. TCP support for FIONREAD. 2005-07-11 13:02:59 +00:00
Ben Gras
42050e39f8 kernel and servers send diagnostic messages to IS; IS sends them to TTY
and the new log driver if enabled.

new usyslogd is started from /usr/etc/rc. New device created by
MAKEDEV.sh. /var/log created by etc/mtree/minix.tree (on root for
now). Made select() slightly more generic, with less code duplication.
2005-07-08 17:30:01 +00:00
Ben Gras
f0817fbd4c complete, tick-resolution gettimeofday() implementation 2005-07-06 07:08:36 +00:00
Ben Gras
493ab97a8d fixed small operator priority bug; ! has higher precedence than & in
(!flags & FLAGCHECK)
2005-07-05 11:08:15 +00:00
Ben Gras
904cf1f84d A "fix" for bug no. 2 is to check if the process slot has disappeared.
Not a really good solution (as it might not catch situations in which this
is caused by another bug), but the forrest of checks necessary might be worse
than this quick fix - because when looking for the cause, I found some other
cases in which the PM would panic as well. See info in bug 2 for details.

Another fix is to delay notification of PM by SYSTASK of signals delivered
internally until after the reply (e.g. of exec()), because the reply would
be messed up otherwise (receiving the notify instead of reply). This caused
SIGTRAP not to be delivered properly with traced processes.
2005-07-04 15:20:46 +00:00
Ben Gras
08f67dcef7 . Added printing of ppid to PM dump output
. made PM pid 0, own parent (so ppid 0) instead of -1
2005-07-04 09:36:16 +00:00
Ben Gras
9cf24c3233 Calls and functionality for get/setpriority() and fsync(). 2005-07-01 17:58:29 +00:00
Jorrit Herder
c349ef942a Changes scheduling priorities for nice(). 2005-07-01 09:08:41 +00:00
Jorrit Herder
bfa25ba41f Changed debug dumps of kernel process table (F1) 2005-06-30 15:55:43 +00:00
Philip Homburg
3e5276eff7 changed max pid back to 30000 2005-06-30 12:56:34 +00:00
Ben Gras
af27dc0cf7 Added fchdir() system call, with corresponding manpage, Changelog and
system include modifications.
2005-06-29 19:28:26 +00:00
Philip Homburg
d4b02eae4f Disabled assertion 2005-06-29 15:25:21 +00:00
Ben Gras
ca0d035146 Fix by Joren l'Ami <jwlami@cs.vu.nl> to make block devices work beyond
2GB (e.g. for 'large' mkfs).
2005-06-29 11:56:56 +00:00
Ben Gras
906690eb55 Last inet change incomplete 2005-06-29 11:47:40 +00:00
Ben Gras
03e2560d81 Disabled funny broadcast address complaint from inet 2005-06-29 11:42:53 +00:00
Ben Gras
6be8c4d8a3 Import of dpeth 3c501/3c509b/.. ethernet driver by
Giovanni Falzoni <fgalzoni@inwind.it>.
2005-06-29 10:16:46 +00:00
Philip Homburg
0f26898f82 New inet with partial select implementation 2005-06-28 15:19:58 +00:00
Philip Homburg
18458079f8 quick hacks for select 2005-06-28 14:59:00 +00:00
Ben Gras
7697700802 Made src belong to bin in release cp.
Made /usr/include belong to bin in mtree.
Fixed compiler warning in fs/pipe.c.
Added mdb (minix debugger) manual page.
Added ethernet config function in setup script.
2005-06-27 11:59:36 +00:00
Jorrit Herder
b25146d3de Removed SM server. 2005-06-27 08:11:46 +00:00
Jorrit Herder
042c4ac395 Changed Makefiles for mkdep script.
Updated debugging dumps at IS server, and function key control.

NOTE: pm modified with DEBUG() output, to be removed later.
2005-06-24 16:21:21 +00:00
Philip Homburg
0979014807 Renamed some types Uid_t, Gid_t, Mode_t, etc. for perl5.
More space for synctree.
2005-06-23 11:07:31 +00:00
Ben Gras
c60302c1e7 Print re-locking event count if enabled. 2005-06-20 14:52:00 +00:00
Jorrit Herder
ec24a0798c 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.
2005-06-20 14:23:31 +00:00
Ben Gras
c9c6983cc1 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
2005-06-20 09:35:23 +00:00
Ben Gras
45ddea1cdd 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.
2005-06-19 23:16:08 +00:00
Ben Gras
d844d2a547 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?

It looks like this code was in 2.0.4 too.
2005-06-19 22:33:49 +00:00
Ben Gras
5954c7e303 Part of fs timers library, forgot to add this in previous commit. 2005-06-17 13:49:56 +00:00
Ben Gras
9664ba0c4f Started select() implementation.
Added interface to select() for pipes (also named pipes), and select()
stubs for regular files.

Added timer library in FS that select() is the first customer of.


This is unfinished, but committed anyway to get a new release out to
Al and testers.
2005-06-17 13:41:12 +00:00
Jorrit Herder
37a1e3f8e3 Removed mem chunks dump. (No longer available from kernel.) 2005-06-17 09:13:32 +00:00
Jorrit Herder
92f9bd02f8 Parsing of free memory chunks is now done at the process manager. 2005-06-17 09:10:30 +00:00
Jorrit Herder
c2cd510adf 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.
2005-06-07 14:43:35 +00:00
Jorrit Herder
2f74381dcc Fixed 'ps' utility: now get process table addresses with getsysinfo() calls.
To be done: get copies of process tables instead of using /dev/(k)mem.
2005-06-06 13:51:50 +00:00
Ben Gras
e44e9ad261 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.)
2005-06-06 11:40:32 +00:00
Jorrit Herder
c281867f46 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
2005-06-06 09:30:44 +00:00
Jorrit Herder
f2a85e58d9 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.
2005-06-03 13:55:06 +00:00
Ben Gras
4904a5537a process manager must be able to send to rtl driver 2005-06-03 09:02:19 +00:00
Ben Gras
d0b5cf84cb Undid usage of vector-copy function. It's a good idea but there's a bug
there somewhere. I'll debug first, then recommit.
2005-06-02 16:49:33 +00:00
Jorrit Herder
e782e76944 Created new findproc system call to the PM (to replace similar kernel
functionality). Currently working on memory allocation (not yet finished).
2005-06-02 12:43:21 +00:00
Jorrit Herder
f926f1209d Minor commit to remove conflict with update. 2005-06-01 14:34:59 +00:00
Jorrit Herder
6d23f072f3 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.
2005-06-01 14:31:00 +00:00
Ben Gras
25d2f4666c Removed mm files (obsolete; it's pm now) 2005-06-01 09:40:42 +00:00
Ben Gras
bd12703b76 Able to dump lock()/unlock() timing data 2005-06-01 09:40:27 +00:00
Ben Gras
66dab193f3 function key notifications became notifies fix 2005-06-01 09:40:02 +00:00
Ben Gras
447b988154 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
2005-06-01 09:39:45 +00:00
Jorrit Herder
a3d2f35993 Fixed minor bug in PM's child time administration. 2005-06-01 08:55:22 +00:00
Jorrit Herder
0165662cd9 Replaced flagalrm() timers with another technique to check for timeouts.
This allowed removing the p_flagarlm timer from the kernel's process table.
Furthermore, I merged p_syncalrm and p_signalrm into p_alarm_timer to save
even more space. Note that processes can no longer have both a signal and
synchronous alarm timer outstanding as of now.
2005-05-31 14:43:04 +00:00
Jorrit Herder
ea46d51176 Added time.c 2005-05-31 10:57:19 +00:00
Jorrit Herder
322ec9ef8b Moved stime, time, times POSIX calls from FS to PM. Removed child time
accounting from kernel (now in PM).  Large amount of files in this commit
is due to system time problems during development.
2005-05-31 09:50:51 +00:00
Jorrit Herder
9646824fce Fixed PM send() failed warning: don't reply to killed process that did reboot.
:  `VS: Enter Log.  Lines beginning with `CVS:' are removed automatically
2005-05-30 09:29:48 +00:00
Jorrit Herder
852008d669 Kinfo counts lock_notify() and lock_send() calls. 2005-05-27 14:54:40 +00:00
Jorrit Herder
07d582872f Fixed a bug in PM: sending of reply messages didn't check if destination
process is still alive. This caused a panic in some situations, e.g., when
all processes are killed on a shutdown.
2005-05-27 13:10:58 +00:00
Jorrit Herder
c2be104821 Improved NOTIFY system: fixed a minor error, ignore pending notifications
on SENDREC system calls. To be done: resource (buffer pool) management;
make it structurally impossible to run out of buffers.
2005-05-27 12:44:14 +00:00
Jorrit Herder
77c3213948 Optimized scheduling code. Old code is still available withing DEAD_CODE
and NEW_SCHED_Q definitions. Some minor problems are being traced at the
moment. This commit is meant to backup my files.
  --- Jorrit
2005-05-26 13:17:57 +00:00
Jorrit Herder
0899f82ab2 Fixed some minor issues with the NOTIFY call. 2005-05-24 14:35:58 +00:00
Ben Gras
6ea72ca1ee Make use of vectored virtual copy system call 2005-05-24 12:28:09 +00:00
Jorrit Herder
ccd17ecfed New NOTIFY system call! Queued at kernel. Duplicate messages (with same source
and type) are overwritten with newer flags/ arguments. The interface from
within the kernel is lock_notify(). User processes can make a system call with
notify(). NOTIFY fully replaces the old notification mechanism.
2005-05-24 10:06:17 +00:00
Ben Gras
80e38daead freed up use of name 'offset' 2005-05-20 13:27:38 +00:00
Jorrit Herder
307c825515 New NOTIFY trap (IPC call) to send queued notification messages.
The call works. Permission check, restriction of outstanding notifications
to be added. Low level code to make it work from within interrupt handlers
will be added as well.
2005-05-19 14:05:51 +00:00
Jorrit Herder
2ebe535030 *** empty log message *** 2005-05-19 09:38:29 +00:00
Jorrit Herder
1cb880b158 Intermediate update---please await next commit. 2005-05-19 09:36:44 +00:00
Ben Gras
33bc71c3f5 Don't cache /dev/ram blocks 2005-05-13 13:42:07 +00:00
Ben Gras
78fd966125 DONT_SWAP not used 2005-05-13 11:44:16 +00:00
Jorrit Herder
efa9c84c8b *** empty log message *** 2005-05-13 09:00:59 +00:00
Jorrit Herder
95151cb265 Renamed header file. 2005-05-13 08:59:19 +00:00
Jorrit Herder
1ecc6bf3b3 Removed 'system process' magic from PM and FS. 2005-05-13 08:57:08 +00:00
Jorrit Herder
fbe1641bd3 User-space networking!
- RTL8139 driver moved to user-space;
- PCI code moved to user-space;
Fixed IRQ hook dump at IS server.
2005-05-11 09:02:00 +00:00
Jorrit Herder
ab39ce451b Fixed some system call checks;
Added SYS_PHYSVCOPY system call;
Fixed IRQ hooks dump in IS server;
2005-05-10 11:06:24 +00:00
Ben Gras
0e9261ed5a Rename mm (memory manager) to pm (process manager), involved renaming
dir..
2005-05-03 15:35:52 +00:00
Ben Gras
81c1b9d76d . FS: removed half-baked stack trace code
. inet: removed silly error message from inet that ends up in the console
  regularly
. Makefile: added some files to the incomplete clean target
2005-05-03 09:02:47 +00:00
Jorrit Herder
ac0995259d *** empty log message *** 2005-05-02 14:30:04 +00:00
Jorrit Herder
89ac678b9b *** empty log message *** 2005-04-29 15:36:43 +00:00
Ben Gras
ae61a409bf took out debugging printf() cause it makes the install look messy 2005-04-22 15:28:14 +00:00
Ben Gras
b4209a856d bugfix.. r isn't an error in 'return r' 2005-04-22 15:20:05 +00:00
Ben Gras
6019a0a5d0 Fixed ram disk loading for whenever the block sizes match. 2005-04-22 11:09:06 +00:00
Ben Gras
9865aeaa79 Initial revision 2005-04-21 14:53:53 +00:00