summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormlarkin <mlarkin@openbsd.org>2009-06-07 16:58:28 +0000
committermlarkin <mlarkin@openbsd.org>2009-06-07 16:58:28 +0000
commitcc06fe1f578e3c291e68eeb3bc78852ae23b8144 (patch)
treeaaf08868e3d05819e7a7657098973d2d6b000d15
parentDo not look at the avail_{start,end} members from vm_physmem[] anymore. (diff)
downloadwireguard-openbsd-cc06fe1f578e3c291e68eeb3bc78852ae23b8144.tar.xz
wireguard-openbsd-cc06fe1f578e3c291e68eeb3bc78852ae23b8144.zip
We weren't including isa.h and therefore missing the NISA #define. This
caused the PIC to not be initialized on resume, which caused much badness - things attached to the ISA bus weren't getting any interupts (for example, keyboards). Also move around some of the lapic reinit code to handle some clock initialization bits we weren't doing before. Worked out by deraadt and myself. ok deraadt@
-rw-r--r--sys/arch/i386/i386/acpi_machdep.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/arch/i386/i386/acpi_machdep.c b/sys/arch/i386/i386/acpi_machdep.c
index 81259433c69..9f3bc4480ce 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.21 2009/06/06 00:21:53 mlarkin Exp $ */
+/* $OpenBSD: acpi_machdep.c,v 1.22 2009/06/07 16:58:28 mlarkin Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -38,6 +38,7 @@
#include <dev/acpi/acpidev.h>
#include "apm.h"
+#include "isa.h"
#include "ioapic.h"
#include "lapic.h"
@@ -254,16 +255,20 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
* returning to the location immediately following the
* last call instruction - after the call to acpi_savecpu.
*/
-
- npxinit(&cpu_info_primary);
+
#if NISA > 0
isa_defaultirq();
#endif
intr_calculatemasks();
+
#if NLAPIC > 0
lapic_enable();
lapic_initclocks();
+ lapic_set_lvt();
#endif
+
+ npxinit(&cpu_info_primary);
+
#if NIOAPIC > 0
ioapic_enable();
#endif