summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitsuru IWASAKI <iwasaki@FreeBSD.org>2001-07-22 19:13:54 +0000
committerMitsuru IWASAKI <iwasaki@FreeBSD.org>2001-07-22 19:13:54 +0000
commit56d8cb57b9ea877c38cd4725f36425b9f7e54a72 (patch)
tree01544b1cf32da46bdc3bc6355f76adadf6800ab7
parentdc5309048886dbf3a42666fecb1fc132f184dd66 (diff)
Notes
-rw-r--r--sys/amd64/acpica/acpi_wakeup.c13
-rw-r--r--sys/dev/acpica/acpi.c8
-rw-r--r--sys/i386/acpica/acpi_wakeup.c13
3 files changed, 20 insertions, 14 deletions
diff --git a/sys/amd64/acpica/acpi_wakeup.c b/sys/amd64/acpica/acpi_wakeup.c
index bd97f77354a0..ad67313469d0 100644
--- a/sys/amd64/acpica/acpi_wakeup.c
+++ b/sys/amd64/acpica/acpi_wakeup.c
@@ -253,13 +253,6 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
#endif
icu_reinit();
- pmap_remove(pm, sc->acpi_wakephys,
- sc->acpi_wakephys + PAGE_SIZE);
- if (opage) {
- pmap_enter(pm, sc->acpi_wakephys, page,
- VM_PROT_READ | VM_PROT_WRITE, 0);
- }
-
if (debug_wakeup) {
acpi_savecpu();
acpi_printcpu();
@@ -267,6 +260,12 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
}
out:
+ pmap_remove(pm, sc->acpi_wakephys, sc->acpi_wakephys + PAGE_SIZE);
+ if (opage) {
+ pmap_enter(pm, sc->acpi_wakephys, page,
+ VM_PROT_READ | VM_PROT_WRITE, 0);
+ }
+
write_eflags(ef);
return (ret);
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 93f58b589a45..8eaaeb26935e 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -1041,6 +1041,8 @@ acpi_SetSleepState(struct acpi_softc *sc, int state)
{
ACPI_STATUS status = AE_OK;
UINT16 Count;
+ UINT8 TypeA;
+ UINT8 TypeB;
FUNCTION_TRACE_U32(__func__, state);
ACPI_ASSERTLOCK;
@@ -1057,6 +1059,12 @@ acpi_SetSleepState(struct acpi_softc *sc, int state)
case ACPI_STATE_S2:
case ACPI_STATE_S3:
case ACPI_STATE_S4:
+ status = AcpiHwObtainSleepTypeRegisterData((UINT8)state, &TypeA, &TypeB);
+ if (status != AE_OK) {
+ device_printf(sc->acpi_dev, "AcpiHwObtainSleepTypeRegisterData failed - %s\n", AcpiFormatException(status));
+ break;
+ }
+
/*
* Inform all devices that we are going to sleep.
*/
diff --git a/sys/i386/acpica/acpi_wakeup.c b/sys/i386/acpica/acpi_wakeup.c
index bd97f77354a0..ad67313469d0 100644
--- a/sys/i386/acpica/acpi_wakeup.c
+++ b/sys/i386/acpica/acpi_wakeup.c
@@ -253,13 +253,6 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
#endif
icu_reinit();
- pmap_remove(pm, sc->acpi_wakephys,
- sc->acpi_wakephys + PAGE_SIZE);
- if (opage) {
- pmap_enter(pm, sc->acpi_wakephys, page,
- VM_PROT_READ | VM_PROT_WRITE, 0);
- }
-
if (debug_wakeup) {
acpi_savecpu();
acpi_printcpu();
@@ -267,6 +260,12 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
}
out:
+ pmap_remove(pm, sc->acpi_wakephys, sc->acpi_wakephys + PAGE_SIZE);
+ if (opage) {
+ pmap_enter(pm, sc->acpi_wakephys, page,
+ VM_PROT_READ | VM_PROT_WRITE, 0);
+ }
+
write_eflags(ef);
return (ret);