diff options
author | jhb <jhb@FreeBSD.org> | 2002-09-06 16:08:08 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2002-09-06 16:08:08 +0000 |
commit | 004940f13ef54fa25fc39d097e8242ac28570d4c (patch) | |
tree | f4798d4462556180771bb44580193364aace1600 /sys/dev | |
parent | 241e77818a258855d9439094d8ba982b10f39f64 (diff) | |
download | FreeBSD-src-004940f13ef54fa25fc39d097e8242ac28570d4c.zip FreeBSD-src-004940f13ef54fa25fc39d097e8242ac28570d4c.tar.gz |
Add a helper routine acpi_SetIntrModel() to call the _PIC method to set
the interrupt model in use so that ACPI can properly route interrupts for
machines using APIC's or SAPIC's.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/acpica/acpi.c | 16 | ||||
-rw-r--r-- | sys/dev/acpica/acpivar.h | 8 |
2 files changed, 24 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 97294201..b4df2a7 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -1256,6 +1256,22 @@ acpi_AppendBufferResource(ACPI_BUFFER *buf, ACPI_RESOURCE *res) return(AE_OK); } +/* + * Set interrupt model. + */ +ACPI_STATUS +acpi_SetIntrModel(int model) +{ + ACPI_OBJECT_LIST ArgList; + ACPI_OBJECT Arg; + + Arg.Type = ACPI_TYPE_INTEGER; + Arg.Integer.Value = model; + ArgList.Count = 1; + ArgList.Pointer = &Arg; + return (AcpiEvaluateObject(ACPI_ROOT_OBJECT, "_PIC", &ArgList, NULL)); +} + #define ACPI_MINIMUM_AWAKETIME 5 static void diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index 8a14208..9fff61f 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -119,6 +119,13 @@ extern struct mtx acpi_mutex; #define ACPI_FAN 0x00200000 /* + * Constants for different interrupt models used with acpi_SetIntrModel(). + */ +#define ACPI_INTR_PIC 0 +#define ACPI_INTR_APIC 1 +#define ACPI_INTR_SAPIC 2 + +/* * This is a cheap and nasty way to get around the horrid counted list * argument format that AcpiEvalateObject uses. */ @@ -260,6 +267,7 @@ extern ACPI_STATUS acpi_ForeachPackageObject(ACPI_OBJECT *obj, void *arg); extern ACPI_STATUS acpi_FindIndexedResource(ACPI_BUFFER *buf, int index, ACPI_RESOURCE **resp); extern ACPI_STATUS acpi_AppendBufferResource(ACPI_BUFFER *buf, ACPI_RESOURCE *res); +extern ACPI_STATUS acpi_SetIntrModel(int model); extern ACPI_STATUS acpi_SetSleepState(struct acpi_softc *sc, int state); extern ACPI_STATUS acpi_Enable(struct acpi_softc *sc); |