From f55ffb1a8ef89a3ca49325b860da4fd7cc278cb9 Mon Sep 17 00:00:00 2001 From: Fredrik Holmqvist Date: Sat, 23 Oct 2010 15:49:17 +0000 Subject: [PATCH] Completed structures for MADT APIC structures. I may now have a Frankenheimer. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39073 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/kernel/arch/x86/arch_acpi.h | 48 +++++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/headers/private/kernel/arch/x86/arch_acpi.h b/headers/private/kernel/arch/x86/arch_acpi.h index ee2fc7e4ce..da0a07c1c4 100644 --- a/headers/private/kernel/arch/x86/arch_acpi.h +++ b/headers/private/kernel/arch/x86/arch_acpi.h @@ -51,7 +51,7 @@ enum { ACPI_MADT_LOCAL_APIC_ADDRESS_OVERRIDE = 5, ACPI_MADT_IO_SAPIC = 6, ACPI_MADT_LOCAL_SAPIC = 7, - ACPI_MADT_PLATFORM_INTERRUPT_SOURCES = 8, + ACPI_MADT_PLATFORM_INTERRUPT_SOURCE = 8, ACPI_MADT_PROCESSOR_LOCAL_X2_APIC_NMI = 9, ACPI_MADT_LOCAL_X2_APIC_NMI = 0XA }; @@ -102,7 +102,7 @@ typedef struct acpi_local_apic_nmi { uint8 type; /* 4 = local APIC NMI */ uint8 length; /* 6 bytes */ uint8 acpi_processor_id; /* Processor ID corresponding to processor - ID in acpi_local_apic. 0xFF signals + ID in acpi_local_apic. 0xFF means it applies to all processors */ uint16 flags; /* Same as MPS INTI flags. See Table 5-25 in ACPI Spec 4.0a or similar */ @@ -133,7 +133,7 @@ typedef struct acpi_io_sapic { typedef struct acpi_local_sapic { uint8 type; /* 7 = processor local SAPIC */ - uint8 length; /* x bytes */ + uint8 length; /* n bytes */ uint8 acpi_processor_id; uint8 local_sapic_id; uint8 local_sapic_eid; @@ -148,6 +148,48 @@ typedef struct acpi_local_sapic { string. Null-terminated */ } _PACKED acpi_local_sapic; +typedef struct acpi_platform_interrupt_source { + uint8 type; /* 8 = platform interrupt source */ + uint8 length; /* 16 bytes */ + uint16 flags; /* Same as MPS INTI flags. See Table 5-25 in + ACPI Spec 4.0a or similar */ + uint8 interrupt_type; /* 1 PMI, 2 INIT, 3 Corrected Platform + Error Interrupt */ + uint8 processor_id; /* processor ID of destination */ + uint8 processor_eid; /* processor EID of destination */ + uint8 io_sapic_vector; /* value that must be used to program the + vector field of the I/O SAPIC redirection + entry for entries with PMI type. */ + uint32 interrupt; /* global system interrupt this + platform interrupt will trigger */ + uint32 platform_int_flags; /* Platform Interrupt Source Flags. See + Table 5-32 of ACPI Spec 4.0a for desc */ +} _PACKED acpi_platform_interrupt_source; + +typedef struct acpi_local_x2_apic { + uint8 type; /* 9 = processor local x2APIC */ + uint8 length; /* 16 bytes */ + uint16 reserved; /* reserved (must be zero) */ + uint32 x2apic_id; /* processor's local x2APIC ID */ + uint32 flags; /* 1 = enabled. */ + uint32 processor_uid_nr; /* Matches _UID of a processor when it is a + number */ +} _PACKED acpi_local_x2_apic; + +typedef struct acpi_local_x2_apic_nmi { + uint8 type; /* 0xA = local x2APIC NMI */ + uint8 length; /* 12 bytes */ + uint16 flags; /* Same as MPS INTI flags. See Table 5-25 in + ACPI Spec 4.0a or similar */ + uint32 acpi_processor_uid; /* UID corresponding to ID in processor + device object. 0xFFFFFFFF means + it applies to all processors */ + uint8 local_interrupt; /* Local x2APIC interrupt input LINTn to + which NMI is connected */ + uint8 reserved1; /* reserved (must be set to zero) */ + uint8 reserved2; /* reserved (must be set to zero) */ + uint8 reserved3; /* reserved (must be set to zero) */ +} _PACKED acpi_local_x2_apic_nmi; #endif /* _KERNEL_ARCH_x86_ARCH_ACPI_H */