diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-10-06 16:37:33 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-10-06 16:37:33 +0000 |
commit | 029f5e117e3defda3609c1187ccc6b0248949c60 (patch) | |
tree | 1384cd49e75c97e6e34a79e86b32ef54f7e4a0b3 /sys/arch | |
parent | 69af6c0f3b3efac3ddcf82f290fbca36990594e9 (diff) |
Correct the condition under which the x_wakeup_vector is cleared.
ok mlarkin
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/acpi_machdep.c | 6 | ||||
-rw-r--r-- | sys/arch/i386/i386/acpi_machdep.c | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/sys/arch/amd64/amd64/acpi_machdep.c b/sys/arch/amd64/amd64/acpi_machdep.c index 6662fd9ad2c..1d6a29833c3 100644 --- a/sys/arch/amd64/amd64/acpi_machdep.c +++ b/sys/arch/amd64/amd64/acpi_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi_machdep.c,v 1.45 2010/08/11 21:22:44 kettenis Exp $ */ +/* $OpenBSD: acpi_machdep.c,v 1.46 2010/10/06 16:37:29 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * @@ -212,7 +212,6 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) /* amd64 does not do lazy pmap_activate */ /* - * * ACPI defines two wakeup vectors. One is used for ACPI 1.0 * implementations - it's in the FACS table as wakeup_vector and * indicates a 32-bit physical address containing real-mode wakeup @@ -221,10 +220,9 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) * The second wakeup vector is in the FACS table as * x_wakeup_vector and indicates a 64-bit physical address * containing protected-mode wakeup code. - * */ sc->sc_facs->wakeup_vector = (u_int32_t)ACPI_TRAMPOLINE; - if (sc->sc_facs->version == 1) + if (sc->sc_facs->length > 32 && sc->sc_facs->version >= 1) sc->sc_facs->x_wakeup_vector = 0; /* Copy the current cpu registers into a safe place for resume. diff --git a/sys/arch/i386/i386/acpi_machdep.c b/sys/arch/i386/i386/acpi_machdep.c index 2cdaf9bcf71..c315100e318 100644 --- a/sys/arch/i386/i386/acpi_machdep.c +++ b/sys/arch/i386/i386/acpi_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi_machdep.c,v 1.39 2010/08/11 21:22:44 kettenis Exp $ */ +/* $OpenBSD: acpi_machdep.c,v 1.40 2010/10/06 16:37:32 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * @@ -230,7 +230,6 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) pmap_activate(curproc); /* - * * ACPI defines two wakeup vectors. One is used for ACPI 1.0 * implementations - it's in the FACS table as wakeup_vector and * indicates a 32-bit physical address containing real-mode wakeup @@ -239,10 +238,9 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) * The second wakeup vector is in the FACS table as * x_wakeup_vector and indicates a 64-bit physical address * containing protected-mode wakeup code. - * */ sc->sc_facs->wakeup_vector = (u_int32_t)ACPI_TRAMPOLINE; - if (sc->sc_facs->version == 1) + if (sc->sc_facs->length > 32 && sc->sc_facs->version >= 1) sc->sc_facs->x_wakeup_vector = 0; /* Copy the current cpu registers into a safe place for resume. |