diff options
-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); |