opnsense-src/sys
Andriy Gapon ec6faf94c4 add support for console resuming, implement it for uart, use on x86
This change adds a new optional console method cn_resume and a kernel
console interface cnresume.  Consoles that may need to re-initialize
their hardware after suspend (e.g., because firmware does not care to do
it) will implement cn_resume.  Note that it is called in rather early
environment not unlike early boot, so the same restrictions apply.
Platform specific code, for platforms that support hardware suspend,
should call cnresume early after resume, before any console output is
expected.

This change fixes a problem with a system of mine failing to resume when
a serial console is used.  I found that the serial port was in a strange
configuration and an attempt to write to it likely resulted in an
infinite loop.

To avoid adding cn_resume method to every console driver, CONSOLE_DRIVER
macro has been extended to support optional methods.

Reviewed by:	imp, mav
MFC after:	3 weeks
Differential Revision: https://reviews.freebsd.org/D15552
2018-05-29 16:16:24 +00:00
..
amd64 re-synchronize TSC-s on SMP systems after resume, if necessary 2018-05-25 07:33:20 +00:00
arm Yank crufty INTR_FILTER option 2018-05-24 17:06:00 +00:00
arm64 On ThunderX2 we need to be careful to only map the memory the firmware 2018-05-29 13:52:25 +00:00
bsm sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
cam cam nvme: fix array overrun 2018-05-28 03:14:36 +00:00
cddl Fix 32-bit buildworld for i386 after r334320. 2018-05-29 13:43:16 +00:00
compat The schedule_timeout_killable() function should listen for signals 2018-05-28 11:26:40 +00:00
conf Add support for hardware rate limiting to mlx5en(4). 2018-05-29 14:04:57 +00:00
contrib [ath_hal] migrate the shared HAL_RESET_* pieces out into ath_hal. 2018-05-25 01:27:39 +00:00
crypto disable printing value of SKEIN_LOOP during standard out, 2018-05-19 18:27:14 +00:00
ddb Extend show proc with reaper, sigparent, and vmspace information 2018-05-25 13:59:48 +00:00
dev add support for console resuming, implement it for uart, use on x86 2018-05-29 16:16:24 +00:00
dts arm: overlays: Update to new path-based sugar format 2018-05-04 14:38:48 +00:00
fs Fix the sleep event for layout recall. 2018-05-26 23:02:15 +00:00
gdb amd64: Protect the kernel text, data, and BSS by setting the RW/NX bits 2018-03-06 14:28:37 +00:00
geom Introduce the 'n' flag for the geli attach command. 2018-05-09 20:53:38 +00:00
gnu gnu/dts: Update our copy of arm dts from Linux 4.16 2018-04-20 19:37:08 +00:00
i386 Implement atomic_add_64() and atomic_subtract_64() for the i386 target. 2018-05-29 11:59:02 +00:00
isa Revert r330780, it was improperly tested and results in taking a spin 2018-03-11 20:13:15 +00:00
kern add support for console resuming, implement it for uart, use on x86 2018-05-29 16:16:24 +00:00
kgssapi kgssapi: Remove trivial deadcode 2018-02-14 00:12:03 +00:00
libkern Protect bzero call against macro expansion 2018-05-24 23:20:10 +00:00
mips MALTA64EL: disable modules until objcopy is fixed 2018-05-24 23:58:57 +00:00
modules Add support for hardware rate limiting to mlx5en(4). 2018-05-29 14:04:57 +00:00
net rt_getifa_fib: don't use ifa but info->rti_ifa 2018-05-29 07:14:57 +00:00
net80211 Use an accessor function to access ifr_data. 2018-03-30 18:50:13 +00:00
netgraph Catch up two more places to the V_ifnet change to a CK_STAILQ. 2018-05-24 00:06:55 +00:00
netinet Remove empty encap_init() function. 2018-05-29 12:32:08 +00:00
netinet6 Remove empty encap_init() function. 2018-05-29 12:32:08 +00:00
netipsec Temporary disable SPDCACHE statistic accounting until proper fix will be 2018-05-28 09:23:28 +00:00
netpfil UDP: further performance improvements on tx 2018-05-23 21:02:14 +00:00
netsmb Eliminate the overhead of gratuitous repeated reinitialization of cap_rights 2018-05-09 18:47:24 +00:00
nfs UDP: further performance improvements on tx 2018-05-23 21:02:14 +00:00
nfsclient style: Remove remaining deprecated MALLOC/FREE macros 2018-01-25 22:25:13 +00:00
nfsserver sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nlm Use syscall_helper_register() to register syscalls and initialize though 2018-02-10 01:09:22 +00:00
ofed UDP: further performance improvements on tx 2018-05-23 21:02:14 +00:00
opencrypto cryptosoft: Do not exceed crd_len around *crypt_multi 2018-04-19 15:24:21 +00:00
powerpc Make ALT_BREAK_TO_DEBUGGER work with OPAL console 2018-05-28 01:59:48 +00:00
riscv Export a breakpoint() function to userland for riscv. 2018-05-16 16:56:35 +00:00
rpc Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
security Fix "Bad tailq" panic when auditing auditon(A_SETCLASS, ...) 2018-05-28 20:47:39 +00:00
sparc64 Define memmove and make bcopy alt entry point 2018-05-24 21:11:28 +00:00
sys add support for console resuming, implement it for uart, use on x86 2018-05-29 16:16:24 +00:00
teken teken: Fix sequences header which was crossing the 80-col boundary 2018-05-29 08:41:44 +00:00
tests epoch(9): Make epochs non-preemptible by default 2018-05-18 17:29:43 +00:00
tools Add dtb overlays support 2018-03-24 21:30:24 +00:00
ufs ufs: remove cgbno variable where unused 2018-05-19 19:30:42 +00:00
vm Addendum to r334233. In vm_fault_populate(), since the page lock is held, 2018-05-28 16:23:39 +00:00
x86 add support for console resuming, implement it for uart, use on x86 2018-05-29 16:16:24 +00:00
xdr sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
xen xen: remove dead code from gnttab.h 2018-05-25 08:44:00 +00:00
Makefile Move sys/boot to stand. Fix all references to new location 2017-11-14 23:02:19 +00:00