From d4c300d8f1fc61bcc3f5d0ca305b6327d5e9381b Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Thu, 16 Oct 2008 21:12:33 +0000 Subject: [PATCH] Prepare usage of the ACPI module. Actual code for getting PCI interrupt routing not yet done though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28187 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/arch/x86/arch_int.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/system/kernel/arch/x86/arch_int.c b/src/system/kernel/arch/x86/arch_int.c index dcdd0bed7b..324eca08fc 100644 --- a/src/system/kernel/arch/x86/arch_int.c +++ b/src/system/kernel/arch/x86/arch_int.c @@ -28,6 +28,7 @@ #include "interrupts.h" +#include #include #include #include @@ -515,6 +516,7 @@ ioapic_init(kernel_args *args) uint32 version; uint64 targetAPIC; void *settings; + acpi_module_info *acpi; static interrupt_controller ioapicController = { "82093AA IOAPIC", @@ -556,6 +558,10 @@ ioapic_init(kernel_args *args) // TODO: remove when the PCI IRQ routing through ACPI is available below return; + if (get_module(B_ACPI_MODULE_NAME, (module_info **)&acpi) != B_OK) { + dprintf("acpi module not available, not configuring ioapic\n"); + return; + } // map in the ioapic sIOAPIC = (ioapic *)args->arch_args.ioapic; @@ -618,6 +624,7 @@ ioapic_init(kernel_args *args) // routing. // prefer the ioapic over the normal pic + put_module(B_ACPI_MODULE_NAME); dprintf("using ioapic for interrupt routing\n"); sCurrentPIC = &ioapicController; gUsingIOAPIC = true;