From 0414a2033051c4b457a01935601faa276d37535a Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Wed, 11 May 2011 23:14:02 +0000 Subject: [PATCH] Print some more MADT entries when debug output is enabled. Right now they are informational only, but most of these entries actually need to be handled. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41450 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/arch/x86/ioapic.cpp | 60 +++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/src/system/kernel/arch/x86/ioapic.cpp b/src/system/kernel/arch/x86/ioapic.cpp index 8eab5189ac..fc2d55d9ed 100644 --- a/src/system/kernel/arch/x86/ioapic.cpp +++ b/src/system/kernel/arch/x86/ioapic.cpp @@ -425,6 +425,66 @@ acpi_enumerate_ioapics(acpi_module_info* acpi) lastIOAPIC = ioapic; break; } + +#ifdef TRACE_IOAPIC + case ACPI_MADT_TYPE_LOCAL_APIC: + { + // purely informational + acpi_madt_local_apic* info = (acpi_madt_local_apic*)apicEntry; + dprintf("found local apic with id %u, processor id %u, " + "flags 0x%08lx\n", info->Id, info->ProcessorId, + (uint32)info->LapicFlags); + break; + } + + case ACPI_MADT_TYPE_INTERRUPT_OVERRIDE: + { + // TODO: take these into account + acpi_madt_interrupt_override* info + = (acpi_madt_interrupt_override*)apicEntry; + dprintf("found interrupt override for bus %u, source irq %u, " + "global irq %lu, flags 0x%08lx\n", info->Bus, + info->SourceIrq, (uint32)info->GlobalIrq, + (uint32)info->IntiFlags); + break; + } + + case ACPI_MADT_TYPE_NMI_SOURCE: + { + // TODO: take these into account + acpi_madt_nmi_source* info + = (acpi_madt_nmi_source*)apicEntry; + dprintf("found nmi source global irq %lu, flags 0x%04x\n", + (uint32)info->GlobalIrq, (uint16)info->IntiFlags); + break; + } + + case ACPI_MADT_TYPE_LOCAL_APIC_NMI: + { + // TODO: take these into account, but at apic.cpp + acpi_madt_local_apic_nmi* info + = (acpi_madt_local_apic_nmi*)apicEntry; + dprintf("found local apic nmi source for processor %u, " + "flags 0x%04x, local int %u\n", info->ProcessorId, + (uint16)info->IntiFlags, info->Lint); + break; + } + + case ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE: + { + // TODO: take these into account, but at apic.cpp + acpi_madt_local_apic_override* info + = (acpi_madt_local_apic_override*)apicEntry; + dprintf("found local apic override with address 0x%016llx\n", + (uint64)info->Address); + break; + } + + default: + dprintf("found unhandled subtable of type %u length %u\n", + apicEntry->Type, apicEntry->Length); + break; +#endif } apicEntry