summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2007-11-12 20:58:13 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2007-11-12 20:58:13 +0000
commitcccba38449966e6049a44aada5a37d66709a80ca (patch)
tree01e59c3bc131db49a130305c492110fe6bbb4928
parenta5d5bcd47bf86d538bb87dbd8bc3ed2954f83e20 (diff)
Use isa_intr_establish() to establish the SCI interrupt handler; this makes
sure that interrupt overrides from the MADT are applied. ok marco@, toby@
-rw-r--r--sys/arch/amd64/amd64/acpi_machdep.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/sys/arch/amd64/amd64/acpi_machdep.c b/sys/arch/amd64/amd64/acpi_machdep.c
index 4070bd8fc13..5a17adcb76a 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.6 2007/02/22 07:39:55 jordan Exp $ */
+/* $OpenBSD: acpi_machdep.c,v 1.7 2007/11/12 20:58:12 kettenis Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -25,6 +25,7 @@
#include <machine/bus.h>
#include <machine/biosvar.h>
+#include <machine/isa_machdep.h>
#include <dev/isa/isareg.h>
#include <dev/acpi/acpireg.h>
@@ -32,11 +33,6 @@
#include "ioapic.h"
-#if NIOAPIC > 0
-#include <machine/i82093var.h>
-#include <machine/mpbiosvar.h>
-#endif
-
#define ACPI_BIOS_RSDP_WINDOW_BASE 0xe0000
#define ACPI_BIOS_RSDP_WINDOW_SIZE 0x20000
@@ -157,21 +153,7 @@ void
acpi_attach_machdep(struct acpi_softc *sc)
{
#ifdef ACPI_ENABLE
- struct pic *pic;
- int pin;
- int irq;
-
- pic = &i8259_pic;
- pin = sc->sc_fadt->sci_int;
- irq = sc->sc_fadt->sci_int;
-#if NIOAPIC > 0
- pic = (struct pic *)ioapic_find_bybase(sc->sc_fadt->sci_int);
- if (pic == NULL) {
- printf("error: can't establish ACPI interrupt!\n");
- return;
- }
-#endif
- sc->sc_interrupt = intr_establish(irq, pic, pin, IST_LEVEL, IPL_TTY,
- acpi_interrupt, sc, "acpi");
+ sc->sc_interrupt = isa_intr_establish(NULL, sc->sc_fadt->sci_int,
+ IST_LEVEL, IPL_TTY, acpi_interrupt, sc, "acpi");
#endif
}