opnsense-src/sys/dev/syscons
Bruce Evans 53f40ddc8e Implement ec_putc() (emergency kernel [syscons] console putc()) and use
it in emergency in sc_cnputc().

Locking fixes in sc_cnputc() previously turned off normal output in
near-deadlock conditions and added deferred output which might never
be completed.  Emergency output goes to the frame buffer using
sufficiently atomic non-blocking writes if the console is in text
mode (in graphics mode, nothing is done, modulo races setting the
graphics mode bit).  Screen updates overwrite the emergency output
if the emergency condition clears enough to reach them.

ec_putc() also works for "early" console output in normal x86 text
mode as soon as this mode is initialized (if ever).  This uses a
hard-coded x86 frame buffer address before cninit() and a hopefully
MI address after cninit().  But non-x86 is more likely to not support
text mode, when ec_putc() will be null.  ec_putc() has no dependencies
of syscons before cninit(), and only has them later to track syscons'
mode changes.  This commit doesn't attach ec_putc() for early use.

To test emergency use, put a breakpoint in central syscons output code
like sc_puts() and do some user output.  The system used to race or
deadlock in ddb output soon after entry to ddb.  The locking fixes
deferred the output until after leaving ddb, so ddb was unusable and
you had to try typing c[ontinue] blindly until it exited, or better use
a serial console in parallel.  Now the output goes to a window in the
middle 2/3 of the screen.  Scrolling is circular and there is no cursor,
but otherwise ec_putc() provides full dumb terminal functionality and
very fast output that hides artificates from dumb overwrites.
2017-03-04 08:47:31 +00:00
..
apm
blank
daemon Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
dragon Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
fade
fire Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
green
logo Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
plasma Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
rain Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
snake
star Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
warp Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
scgfbrndr.c
schistory.c
scmouse.c Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
scterm-teken.c Colorize syscons kernel console output according to a table indexed 2017-03-04 06:19:12 +00:00
scterm.c
scvesactl.c
scvgarndr.c sys: Make use of our rounddown() macro when sys/param.h is available. 2016-04-30 14:41:18 +00:00
scvidctl.c Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
scvtb.c
syscons.c Implement ec_putc() (emergency kernel [syscons] console putc()) and use 2017-03-04 08:47:31 +00:00
syscons.h Colorize syscons kernel console output according to a table indexed 2017-03-04 06:19:12 +00:00
sysmouse.c [evdev] Adds evdev support to sysmouse(4) driver 2016-12-10 18:07:16 +00:00