From a10ba14eead676aa6bc491aa10cc96121603b955 Mon Sep 17 00:00:00 2001 From: mlarkin Date: Thu, 29 Jul 2010 00:29:49 +0000 Subject: [PATCH] Zero out the firmware waking vector on successful resume from ACPI sleep. ok deraadt@ --- sys/arch/amd64/amd64/acpi_machdep.c | 5 ++++- sys/arch/i386/i386/acpi_machdep.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/arch/amd64/amd64/acpi_machdep.c b/sys/arch/amd64/amd64/acpi_machdep.c index 726b2d45f62..09e0f4f445e 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.42 2010/07/27 16:53:11 deraadt Exp $ */ +/* $OpenBSD: acpi_machdep.c,v 1.43 2010/07/29 00:29:49 mlarkin Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * @@ -243,6 +243,9 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) /* Resume path continues here */ + /* Reset the vector */ + sc->sc_facs->wakeup_vector = 0; + #if NISA > 0 i8259_default_setup(); #endif diff --git a/sys/arch/i386/i386/acpi_machdep.c b/sys/arch/i386/i386/acpi_machdep.c index 69d1b599fc2..27d5934509e 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.36 2010/07/27 16:53:10 deraadt Exp $ */ +/* $OpenBSD: acpi_machdep.c,v 1.37 2010/07/29 00:29:49 mlarkin Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * @@ -261,6 +261,9 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) /* Resume path continues here */ + /* Reset the vector */ + sc->sc_facs->wakeup_vector = 0; + #if NISA > 0 isa_defaultirq(); #endif -- 2.20.1