diff options
author | Mike Larkin <mlarkin@cvs.openbsd.org> | 2009-05-31 03:42:39 +0000 |
---|---|---|
committer | Mike Larkin <mlarkin@cvs.openbsd.org> | 2009-05-31 03:42:39 +0000 |
commit | 297b096656825aacce5f999281d653706ed2726e (patch) | |
tree | bac56dd7625dbd9747df10844a9a8d58e8526ae7 /sys/arch/amd64 | |
parent | cb3428c4025c47a4ccfbeb7a18a8707757db4ef9 (diff) |
Reinitialize lapic on ACPI resume.
ok marco@
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r-- | sys/arch/amd64/amd64/acpi_machdep.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/arch/amd64/amd64/acpi_machdep.c b/sys/arch/amd64/amd64/acpi_machdep.c index f6a5f98e30f..075b9e2f249 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.16 2009/02/19 21:02:05 marco Exp $ */ +/* $OpenBSD: acpi_machdep.c,v 1.17 2009/05/31 03:42:38 mlarkin Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * @@ -33,12 +33,21 @@ #include <dev/acpi/acpidev.h> #include "ioapic.h" +#include "lapic.h" + +#if NLAPIC > 0 +#include <machine/apicvar.h> +#include <machine/i82489reg.h> +#include <machine/i82489var.h> +#endif extern u_char acpi_real_mode_resume[], acpi_resume_end[]; extern u_int32_t acpi_pdirpa; extern paddr_t tramp_pdirpa; int acpi_savecpu(void); +void ioapic_enable(void); +void lapic_enable(void); #define ACPI_BIOS_RSDP_WINDOW_BASE 0xe0000 #define ACPI_BIOS_RSDP_WINDOW_SIZE 0x20000 @@ -233,6 +242,13 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) * last call instruction - after the call to acpi_savecpu. */ +#if NLAPIC > 0 + lapic_enable(); + lapic_calibrate_timer(&cpu_info_primary); +#endif +#if NIOAPIC > 0 + ioapic_enable(); +#endif initrtclock(); enable_intr(); #endif /* ACPI_SLEEP_ENABLED */ |