Commit graph

37 commits

Author SHA1 Message Date
Ben Gras
3cc092ff06 . new kernel call sysctl for generic unprivileged system operations;
now used for printing diagnostic messages through the kernel message
   buffer. this lets processes print diagnostics without sending messages
   to tty and log directly, simplifying the message protocol a lot and
   reducing difficulties with deadlocks and other situations in which
   diagnostics are blackholed (e.g. grants don't work). this makes
   DIAGNOSTICS(_S), ASYN_DIAGNOSTICS and DIAG_REPL obsolete, although tty
   and log still accept the codes for 'old' binaries. This also simplifies
   diagnostics in several servers and drivers - only tty needs its own
   kputc() now.
 . simplifications in vfs, and some effort to get the vnode references
   right (consistent) even during shutdown. m_mounted_on is now NULL
   for root filesystems (!) (the original and new root), a less awkward
   special case than 'm_mounted_on == m_root_node'. root now has exactly
   one reference, to root, if no files are open, just like all other
   filesystems. m_driver_e is unused.
2009-01-26 17:43:59 +00:00
Ben Gras
c078ec0331 Basic VM and other minor improvements.
Not complete, probably not fully debugged or optimized.
2008-11-19 12:26:10 +00:00
Philip Homburg
a51dbad054 Asynchrnous character device interface. 2008-02-25 11:54:04 +00:00
Philip Homburg
65df875abb Need separate 'prev_next' pointers for kernel and TTY. 2008-02-25 11:53:37 +00:00
Ben Gras
9f2f3dd488 don't call mkdep with an absolute path 2007-02-08 16:26:20 +00:00
Ben Gras
8ea438ae93 Retired DEV_{READ,WRITE,GATHER,SCATTER,IOCTL} (safe versions *_S are to
be used and drivers should never receieve these 'unsafe' variants
any more).
2007-02-07 16:22:19 +00:00
Ben Gras
b01aff70d2 use servers/inet/mq.[ch] to queue messages using mq_queue() in
libdriver.  at_wini now queues messages it can't handle it receives when
waiting for an interrupt. this way it can do receive(ANY) and timeouts
should be working again (were broken for VFS, as with the advent of VFS,
at_wini could get requests from a filesystem while it was waiting for an
interrupt - as a hack, the receive() was changed to receive(HARDWARE)).

Added mq.c to libdriver, and made libdriver an actual library that
drivers link with -L../libdriver -ldriver. (So adding files, if
necessary, is easier next time.)
2007-01-12 13:33:12 +00:00
Philip Homburg
bafc45a309 First cut at 64-bit file offsets in block devices for mkfs/fsck. 2006-11-27 14:21:43 +00:00
Ben Gras
7195fe3325 System statistical and call profiling
support by Rogier Meurs <rogier@meurs.org>.
2006-10-30 15:53:38 +00:00
Philip Homburg
61bbef2f4e More stack for the log driver. 2006-10-20 13:54:14 +00:00
Ben Gras
13d1de5122 Taught log driver to return REP_IO_GRANT on revive events, makes revive
work again.
2006-07-25 11:01:54 +00:00
Philip Homburg
9392742cc4 Use safecopy version to get log messages from TTY. 2006-07-10 12:42:31 +00:00
Ben Gras
60bbcab13f Understand *_S variants: DIAGNOSTICS_S, DEV_{READ,WRITE,IOCTL}_S,
include grant id in DEV_REVIVE messages
2006-06-20 08:55:35 +00:00
Ben Gras
58aee91edf Fix compiler warnings. 2006-03-24 13:53:09 +00:00
Ben Gras
f877da3aec endpoint migration for drivers.
mostly renaming message field names to the new names.

tty stored process numbers in chars in tty and pty structs - now ints.
2006-03-03 10:21:45 +00:00
Ben Gras
ad2bf251a3 Don't print KMESSages, they are sent to tty separately. 2005-10-20 09:29:18 +00:00
Ben Gras
ea75918df1 printf() by kernel and servers now send messages to an array of processes,
OUTPUT_PROCS_ARRAY in <minix/config.h>, in that order, terminated by NONE.
log no longer forwards messages to tty itself. This leads to less funny
loops and more robust debug-message handling. Also the list of
processes receiving messages can easily be changed around or disabled by
editing the array (e.g. disable it by changing the array to { NONE }.).
2005-10-18 10:34:54 +00:00
Ben Gras
0830c99b56 Leave out exit() that was in there to test RS. 2005-10-18 10:04:11 +00:00
Ben Gras
87dbfc7dda Added DEV_PING message type to drivers (but not ethernet drivers) so
RS can monitor them.
2005-10-12 14:31:39 +00:00
Philip Homburg
72c0158393 Accept log output from TTY. 2005-09-30 12:59:12 +00:00
Ben Gras
6a56df46e9 *** empty log message *** 2005-08-30 16:56:46 +00:00
Ben Gras
e5205bdd2c Found 2 debug messages in log driver.. killed. 2005-08-27 12:04:29 +00:00
Jorrit Herder
e156a1c5ed *** empty log message *** 2005-08-25 13:02:15 +00:00
Ben Gras
ae5f1f2286 ata-pci support for at driver.
added a hook in libdriver for HARD_INT messages.
2005-08-25 08:19:11 +00:00
Ben Gras
e2e90b1fdc Remove double-blank lines (Al) 2005-08-22 15:17:42 +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
52965b6f17 Various updates to support dynamically starting drivers.
Output during initialization should be suppressed. Unless an error occurs.
Note that main() can now be main(int argc, char **argv) and arguments can
be passed when bringing up the driver.
2005-08-02 15:30:36 +00:00
Jorrit Herder
aec394a330 Updated drivers according to syslib interface changes. 2005-07-29 15:00:22 +00:00
Ben Gras
62c08df482 Removed debugging statements from log.c; changed PRINTF_PROC in config.h
back to LOG_PROC_NR
2005-07-27 18:49:25 +00:00
Ben Gras
28958cca35 Log device only suspendable now 2005-07-27 14:31:04 +00:00
Ben Gras
a1a7ccbd02 alert()-aware revive/select in log device 2005-07-27 13:11:03 +00:00
Jorrit Herder
a63d324caa Small update to shared driver code: SYS_EVENT (signal) is now known.
Fixed drivers. HARD_STOP message no longer exists.
2005-07-26 12:50:25 +00:00
Ben Gras
d09f170abc Nits here and there. Made log device buffer messages again. 2005-07-22 18:24:17 +00:00
Jorrit Herder
09830fc33e Allowed printing diagnostic messages (either from system processes or the
kernel) to the log driver. The log driver forwards such output to the TTY.

Changed driver_task() not to send a reply if the return value is EDONTREPLY.
2005-07-21 18:29:52 +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
8c024e28a1 Changed Makefiles: drivers are now installed in /usr/sbin.
TTY now gets SYS_EVENT message with sigset (e.g., SIGKMESS, SIGKSTOP).
2005-07-19 12:12:48 +00:00
Ben Gras
640eb73ca2 New log driver; buffers messages and makes them available to userland.
Added some fields in the generic device table to support this driver
using libdriver. Updated other drivers to fill these fields with nops
and NULLs.
2005-07-08 17:23:44 +00:00