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
Unknown Object (File)
Sun, Dec 22, 7:13 PM
Unknown Object (File)
Sun, Dec 22, 7:13 PM
Unknown Object (File)
Nov 14 2024, 3:17 PM
Unknown Object (File)
Nov 2 2024, 3:06 AM
Unknown Object (File)
Nov 2 2024, 3:03 AM
Unknown Object (File)
Oct 28 2024, 3:27 PM
Unknown Object (File)
Oct 28 2024, 3:27 PM
Unknown Object (File)
Oct 28 2024, 3:27 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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

This looks good.

sys/x86/acpica/acpi_wakeup.c
304–305 ↗(On Diff #42926)

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 ↗(On Diff #42926)

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.