Commit graph

35 commits

Author SHA1 Message Date
David van Moolenbroek 492d663444 TTY fixes:
- reenable code to restore screen/cursor at shutdown
- add proper signal checking logic
- lock to first console during shutdown
2009-12-21 23:19:01 +00:00
Ben Gras 89bf7bae27 - tty: only report unrecognized scancodes once; forget about
remembering the origin and cursor position as that feature didn't
   really work properly anyway
 - tty: map in video and font memory using a vm call, access it from C,
   thereby eliminating pesky weird segment calls and assembly to access it,
   and unbreaks loadfont (Roman Ignatov)
 - bios_wini: fix bios_wini by allocating a <1MB buffers for it
 - memory: preallocate ramdisk, makes it a bit faster (and doesn't
   fail halfway if you allocate a huge one)
 - floppy: use <1MB buffer
 - ramdisk proto: because of the 2x1 page reservations, binaries
   got a little fatter and didn't fit on the ramdisk any more.
   increase it.
2009-09-21 14:25:54 +00:00
Ben Gras dd56aa321f to let tty run with its own page table (instead of with the kernel identity
map table), make it map in video memory.

sadly, this breaks tty in non-paged mode.

happily, this simplifies the code by throwing out the messing
around with segments, and throws out vidcopy.s.
2009-05-12 12:43:18 +00:00
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 36909196cf make bootinfo valid immediately 2009-01-14 08:56:20 +00:00
Ben Gras f4d0d635fd - hz dynamic
- new map /dev/video implementation
 - ser_putc into library
2008-12-08 16:40:29 +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 00ef93d6a2 Use nonblocking sends to reply, fixed reply message for DIAGNOSTICS(_S) 2008-02-22 16:03:00 +00:00
Philip Homburg 1d4afb3599 Compile-time option to duplicate console output to the first serial line 2007-08-07 11:27:03 +00:00
Philip Homburg bb659b1ad6 Disabled ser_putc for reporting debug internal to tty over the serial line.
Disabled return statement for serial debug input in the kernel.
2007-04-23 14:59:32 +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 cbfcdcc4c2 Use grant address type in loadfont ioctl. 2006-07-21 14:39:48 +00:00
Philip Homburg f6d1f6fdf6 Switch to vc 0 and softscrolling when /dev/video is opened and switch back
at the close. This should prevent problems with X on (emulated) Cirrus
cards.
2006-07-19 11:50:18 +00:00
Philip Homburg ee09d50403 Changed to use sys_readbios to get screen parameters. Added safecopy version
to get log messages.
2006-07-10 12:37:39 +00:00
Ben Gras 1c8b206a5d . Safe I/O, ioctl() and DIAGNOSTICS variants conversion - safe copies,
include grant id in DEV_REVIVE messages.
. Removal of TTY_FLAGS field (and so O_NONBLOCK support).
. Fixed CANCEL behaviour and return code on blocking I/O,
  previously handled by O_NONBLOCK
. Totally removed REVIVE replies, previously still possible on
  blocking ioctls (REVIVE directly called) and ptys (missing TTY_REVIVE
  check), removes deadlock bug with FS
. Removed obsolete *COMPAT options and associated code
2006-06-20 09:02:54 +00:00
Philip Homburg e9aabcf2f8 Disabled building rescue driver (no longer needed). Moved allocmem from
library to the memory driver. Always put output from within TTY directly on
the console. Removed second include of driver.h from tty.c. Made tty_inrepcode
bigger. First step to move PM and FS calls that are not regular (API)
system calls out of callnr.h (renumbered them, and removed them from the
table.c files). Imported the Minix-vmd uname implementation. This provides
a more stable ABI than the current implementation. Added a bit of security
checking. Unfortunately not nearly enough to get a secure system. Fixed a
bug related to the sizes of the programs in the image (in PM patch_mem_chunks).
2006-05-19 12:19:37 +00:00
Ben Gras 9f6b2666e1 Compiler warnings fix 2006-03-24 14:16:13 +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
Philip Homburg 5556281540 Added /dev/video for mapping video memory. 2005-11-09 15:45:48 +00:00
Philip Homburg 0b5a135a67 Raw keyboard and AUX support. Needs cleaning up. 2005-10-24 13:57:19 +00:00
Philip Homburg 9f8f2484dd Forward debug output that originates within TTY first to the log device. 2005-09-30 13:01:34 +00:00
Ben Gras e3709af1b8 Andy's code fixes 2005-09-11 17:09:11 +00:00
Ben Gras e2e90b1fdc Remove double-blank lines (Al) 2005-08-22 15:17:42 +00:00
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 aec394a330 Updated drivers according to syslib interface changes. 2005-07-29 15:00:22 +00:00
Jorrit Herder fe0dcb5c00 AT driver is not modified (debugging only);
TTY: select and revive with new notify and FS call back;
kernel: removed old notify code; removed ugly prepare_shutdown timer
kputc: don't send to FS if PRINTF_PROC fails
2005-07-27 14:32:16 +00:00
Jorrit Herder 279250889f Renamed some system library functionality. 2005-07-14 15:15:18 +00:00
Ben Gras 471e0448c3 Changed timer library function args.
Added select() support for tty fd's (not ptys yet).
2005-06-17 13:37:41 +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
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
Ben Gras cd72f80639 Disabled clearing screen in tty driver, started console printing after an
initial 1-line scroll at last line. If clearing screen in trailer of boot
monitor is disabled, all previous boot monitor and console messages are
preserved on rebooting.

All that's needed now is a scrollback buffer to see all old messages..
(Even from the boot monitor, bios, previous boots...)
2005-05-30 15:09:51 +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
Jorrit Herder 89ac678b9b *** empty log message *** 2005-04-29 15:36:43 +00:00
Ben Gras 9865aeaa79 Initial revision 2005-04-21 14:53:53 +00:00