diff options
author | 2009-11-24 17:39:59 +0000 | |
---|---|---|
committer | 2009-11-24 17:39:59 +0000 | |
commit | 9ea8b2c42c65a8461f255c1de586024edc7b1dec (patch) | |
tree | 424e5a1d1cab4f7205d4c19d8347facc82ae40b9 /sys | |
parent | Poke CR3 one last time before resuming. Suggested by deraadt@. (diff) | |
download | wireguard-openbsd-9ea8b2c42c65a8461f255c1de586024edc7b1dec.tar.xz wireguard-openbsd-9ea8b2c42c65a8461f255c1de586024edc7b1dec.zip |
Save FPU state before suspend.
ok deraadt@, kettenis@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/amd64/acpi_machdep.c | 3 | ||||
-rw-r--r-- | sys/arch/i386/i386/acpi_machdep.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/acpi_machdep.c b/sys/arch/amd64/amd64/acpi_machdep.c index 3ec76aebf79..2f040d950d6 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.25 2009/11/23 16:21:54 pirofti Exp $ */ +/* $OpenBSD: acpi_machdep.c,v 1.26 2009/11/24 17:39:59 mlarkin Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * @@ -225,6 +225,7 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) /* Copy the current cpu registers into a safe place for resume. */ if (acpi_savecpu()) { + fpusave_cpu(curcpu(), 1); wbinvd(); acpi_enter_sleep_state(sc, state); panic("%s: acpi_enter_sleep_state failed", DEVNAME(sc)); diff --git a/sys/arch/i386/i386/acpi_machdep.c b/sys/arch/i386/i386/acpi_machdep.c index 1e782f359a4..464fc9413b0 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.24 2009/11/23 16:21:54 pirofti Exp $ */ +/* $OpenBSD: acpi_machdep.c,v 1.25 2009/11/24 17:39:59 mlarkin Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * @@ -243,6 +243,7 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) /* Copy the current cpu registers into a safe place for resume. */ if (acpi_savecpu()) { + npxsave_cpu(curcpu(), 1); wbinvd(); acpi_enter_sleep_state(sc, state); panic("%s: acpi_enter_sleep_state failed", DEVNAME(sc)); |