Page MenuHomeFreeBSD

add support for console resuming, implement it for uart, use on x86
ClosedPublic

Authored by avg on May 24 2018, 12:56 PM.
Tags
None
Referenced Files
F82909991: D15552.diff
Fri, May 3, 9:02 PM
Unknown Object (File)
Thu, May 2, 6:41 AM
Unknown Object (File)
Thu, May 2, 4:05 AM
Unknown Object (File)
Thu, May 2, 4:03 AM
Unknown Object (File)
Wed, May 1, 11:34 PM
Unknown Object (File)
Thu, Apr 11, 9:03 PM
Unknown Object (File)
Thu, Apr 11, 7:05 AM
Unknown Object (File)
Dec 22 2023, 11:45 PM
Subscribers
None

Details

Summary

This change add 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..

Test Plan

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.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 16811
Build 16694: arc lint + arc unit

Event Timeline

This looks good.

sys/x86/acpica/acpi_wakeup.c
304–305

I'd remove these two lines because (a) it's not true (video works and thus supports resuming) and (b) UART may need it, but only rarely. Statements like this go stale too quickly.

This revision is now accepted and ready to land.May 25 2018, 2:21 AM
sys/x86/acpica/acpi_wakeup.c
304–305

What I intended to say was that only uart driver supports the resume method.
I guess that video hardware is always automatically functional after a reset or that BIOS does something to restore its state.

In any case, I agree that that statement does not add much value and can become stale rather soon.

This revision was automatically updated to reflect the committed changes.