Page MenuHomeFreeBSD
Paste P205

(An Untitled Masterwork)
ActivePublic

Authored by bwidawsk on Aug 10 2018, 9:14 PM.
Tags
None
Referenced Files
F3646346:
Aug 10 2018, 9:14 PM
Subscribers
None
/*
* Perhaps merge this into acpi_sleep_machdep
*/
static void
__do_s0ix(struct acpi_softc *sc)
{
ACPI_STATUS status;
/*
* s0ix isn't exactly a sleep state since hardware handles a lot of the
* processor context save and restore. We just need to make sure that we
* are able to be woken up.
*/
MPASS(sc->acpi_wakeaddr != 0ul);
critical_enter();
status = AcpiSetFirmwareWakingVector(sc->acpi_wakephys, 0);
if (ACPI_FAILURE(status)) {
device_printf(sc->acpi_dev,
"Unable to setup wake vector before sleep - %s\n",
AcpiFormatException(status));
critical_exit();
return;
}
acpi_cpu_idle_mwait(0);
if (AcpiSetFirmwareWakingVector(0, 0)) {
device_printf(sc->acpi_dev,
"Unable to restore wake vector after sleep - %s\n",
AcpiFormatException(status));
}
critical_exit();
}

Event Timeline

bwidawsk created this object in space S1 Global.