1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-27 16:39:08 +00:00
freebsd/sys
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
..
amd64 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
arm Add FPGA manager driver for Intel Arria 10. 2017-03-03 14:19:37 +00:00
arm64
boot loader.efi: reduce the size of the staging area if necessary 2017-03-02 07:25:50 +00:00
bsm
cam Reject userland CCBs that have CAM_UNLOCKED set. 2017-03-03 20:51:57 +00:00
cddl Fix null pointer dereference in zfs_freebsd_setacl(). 2017-03-02 23:23:28 +00:00
compat Hide Linux socketcall constants under corresponding #ifdef since 2017-03-04 06:54:05 +00:00
conf Merge ^/head r314420 through r314481. 2017-03-01 08:22:51 +00:00
contrib Merge ACPICA 20170303. 2017-03-03 18:56:15 +00:00
crypto
ddb Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
dev Implement ec_putc() (emergency kernel [syscons] console putc()) and use 2017-03-04 08:47:31 +00:00
fs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
gdb
geom The kern.geom.part.auto_resize should be tunable. 2017-02-28 20:51:20 +00:00
gnu Import latest vendor DTS files for Intel Arria 10. 2017-03-03 14:17:07 +00:00
i386 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
isa Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
kern Fix grammar in some comments in subr_sleepqueue.c 2017-03-03 21:03:28 +00:00
kgssapi
libkern strstr.c was inadvertently blasted with a copy of isa_nmi.c. Revert 2017-03-01 02:07:51 +00:00
mips Fix build: include machine/bus.h before uart.h 2017-03-02 17:09:14 +00:00
modules Fix "make depend" with nvme.ko: add opt_cam.h to SRCS 2017-03-04 08:46:57 +00:00
net Make gtaskqueue compatible with drm-next such that they can be used with the 2017-03-01 18:37:35 +00:00
net80211 net80211: fix ieee80211_htrateset setup, return EINVAL for an unsupported 2017-03-03 01:06:27 +00:00
netgraph
netinet Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
netinet6 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
netipsec
netnatm
netpfil Fix matching table entry value. Use real table value instead of its index 2017-03-03 20:22:42 +00:00
netsmb
nfs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nfsclient Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nfsserver Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nlm
ofed Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
opencrypto
powerpc Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
riscv
rpc Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
security
sparc64 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
sys Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 2017-03-02 20:49:40 +00:00
teken
tests
tools Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ufs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
vm Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
x86 MCA: add AMD Error Thresholding support 2017-03-03 22:42:43 +00:00
xdr
xen
Makefile