4 This file contains a structure definition for the ACPI 1.0 Multiple APIC
5 Description Table (MADT).
7 Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
8 SPDX-License-Identifier: BSD-2-Clause-Patent
12 #include <IndustryStandard/Acpi.h>
18 #define EFI_ACPI_LOCAL_APIC_ADDRESS 0xFEE00000 // TBD
21 // Multiple APIC Flags are defined in AcpiX.0.h
23 #define EFI_ACPI_1_0_MULTIPLE_APIC_FLAGS (EFI_ACPI_1_0_PCAT_COMPAT)
26 // Define the number of each table type.
27 // This is where the table layout is modified.
29 #define EFI_ACPI_PROCESSOR_LOCAL_APIC_COUNT 1
30 #define EFI_ACPI_INTERRUPT_SOURCE_OVERRIDE_COUNT 2
31 #define EFI_ACPI_IO_APIC_COUNT 1
34 // Ensure proper structure formats
39 // ACPI 1.0 MADT structure
42 EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header;
44 #if EFI_ACPI_PROCESSOR_LOCAL_APIC_COUNT > 0
45 EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC_STRUCTURE LocalApic[EFI_ACPI_PROCESSOR_LOCAL_APIC_COUNT];
48 #if EFI_ACPI_INTERRUPT_SOURCE_OVERRIDE_COUNT > 0
49 EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE Iso[EFI_ACPI_INTERRUPT_SOURCE_OVERRIDE_COUNT];
52 #if EFI_ACPI_IO_APIC_COUNT > 0
53 EFI_ACPI_1_0_IO_APIC_STRUCTURE IoApic[EFI_ACPI_IO_APIC_COUNT];
56 } EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE;
61 // Multiple APIC Description Table
63 EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE Madt = {
66 EFI_ACPI_1_0_APIC_SIGNATURE,
67 sizeof (EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE),
68 EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION,
69 0x00, // Checksum will be updated at runtime
71 EFI_ACPI_OEM_TABLE_ID,
72 EFI_ACPI_OEM_REVISION,
74 EFI_ACPI_CREATOR_REVISION
78 // MADT specific fields
80 EFI_ACPI_LOCAL_APIC_ADDRESS,
81 EFI_ACPI_1_0_MULTIPLE_APIC_FLAGS,
85 // Processor Local APIC Structure
89 EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC, // Type
90 sizeof (EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC_STRUCTURE), // Length
92 0x00, // Local APIC ID
93 0x00000001 // Flags - Enabled by default
98 // Interrupt Source Override Structure
104 // IRQ0=>IRQ2 Interrupt Source Override Structure
106 EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE, // Type
107 sizeof (EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE),// Length
109 0x00, // Source - IRQ0
110 0x00000002, // Global System Interrupt - IRQ2
111 0x0000 // Flags - Conforms to specifications of the bus
116 // ISO (SCI Active High) Interrupt Source Override Structure
118 EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE, // Type
119 sizeof (EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE),// Length
121 0x09, // Source - IRQ0
122 0x00000009, // Global System Interrupt - IRQ2
123 0x000D // Flags - Level-tiggered, Active High
132 EFI_ACPI_1_0_IO_APIC, // Type
133 sizeof (EFI_ACPI_1_0_IO_APIC_STRUCTURE), // Length
135 EFI_ACPI_RESERVED_BYTE, // Reserved
136 0xFEC00000, // IO APIC Address (physical)
137 0x00000000 // Global System Interrupt Base
149 // Reference the table being generated to prevent the optimizer from removing the
150 // data structure from the executable