]>
Commit | Line | Data |
---|---|---|
3cbfba02 DW |
1 | /*++\r |
2 | \r | |
3 | Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r | |
4 | \r | |
7ede8060 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
3cbfba02 DW |
6 | \r |
7 | \r | |
8 | Module Name:\r | |
9 | \r | |
10 | Madt.h\r | |
11 | \r | |
12 | Abstract:\r | |
13 | \r | |
14 | This file describes the contents of the ACPI Multiple APIC Description\r | |
15 | Table (MADT). Some additional ACPI values are defined in Acpi1_0.h and\r | |
16 | Acpi2_0.h.\r | |
17 | To make changes to the MADT, it is necessary to update the count for the\r | |
18 | APIC structure being updated, and to modify table found in Madt.c.\r | |
19 | \r | |
20 | --*/\r | |
21 | \r | |
22 | #ifndef _MADT_H\r | |
23 | #define _MADT_H\r | |
24 | \r | |
25 | //\r | |
26 | // Statements that include other files\r | |
27 | //\r | |
28 | #include "AcpiTablePlatform.h"\r | |
29 | #include <IndustryStandard/Acpi10.h>\r | |
30 | #include <IndustryStandard/Acpi20.h>\r | |
31 | #include <IndustryStandard/Acpi30.h>\r | |
32 | #include "Platform.h"\r | |
33 | \r | |
34 | //\r | |
35 | // MADT Definitions\r | |
36 | //\r | |
37 | #define EFI_ACPI_OEM_MADT_REVISION 0x00000000\r | |
38 | //\r | |
39 | // Multiple APIC Flags are defined in AcpiX.0.h\r | |
40 | //\r | |
41 | #define EFI_ACPI_1_0_MULTIPLE_APIC_FLAGS (EFI_ACPI_1_0_PCAT_COMPAT)\r | |
42 | #define EFI_ACPI_2_0_MULTIPLE_APIC_FLAGS (EFI_ACPI_2_0_PCAT_COMPAT)\r | |
43 | #define EFI_ACPI_3_0_MULTIPLE_APIC_FLAGS (EFI_ACPI_3_0_PCAT_COMPAT)\r | |
44 | #define EFI_ACPI_4_0_MULTIPLE_APIC_FLAGS (EFI_ACPI_4_0_PCAT_COMPAT)\r | |
45 | \r | |
46 | //\r | |
47 | // Define the number of each table type.\r | |
48 | // This is where the table layout is modified.\r | |
49 | //\r | |
50 | #define EFI_ACPI_PROCESSOR_LOCAL_APIC_COUNT MAX_CPU_NUM\r | |
51 | #define EFI_ACPI_LOCAL_APIC_NMI_COUNT MAX_CPU_NUM\r | |
52 | #define EFI_ACPI_IO_APIC_COUNT 1\r | |
53 | #define EFI_ACPI_INTERRUPT_SOURCE_OVERRIDE_COUNT 2\r | |
54 | #define EFI_ACPI_NON_MASKABLE_INTERRUPT_SOURCE_COUNT 0\r | |
55 | #define EFI_ACPI_LOCAL_APIC_ADDRESS_OVERRIDE_COUNT 0\r | |
56 | #define EFI_ACPI_IO_SAPIC_COUNT 0\r | |
57 | #define EFI_ACPI_PROCESSOR_LOCAL_SAPIC_COUNT 0\r | |
58 | #define EFI_ACPI_PLATFORM_INTERRUPT_SOURCES_COUNT 0\r | |
59 | \r | |
60 | //\r | |
61 | // MADT structure\r | |
62 | //\r | |
63 | //\r | |
64 | // Ensure proper structure formats\r | |
65 | //\r | |
66 | #pragma pack(1)\r | |
67 | //\r | |
68 | // ACPI 1.0 Table structure\r | |
69 | //\r | |
70 | typedef struct {\r | |
71 | EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header;\r | |
72 | \r | |
73 | #if EFI_ACPI_PROCESSOR_LOCAL_APIC_COUNT > 0\r | |
74 | EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC_STRUCTURE LocalApic[EFI_ACPI_PROCESSOR_LOCAL_APIC_COUNT];\r | |
75 | #endif\r | |
76 | \r | |
77 | #if EFI_ACPI_IO_APIC_COUNT > 0\r | |
78 | EFI_ACPI_1_0_IO_APIC_STRUCTURE IoApic[EFI_ACPI_IO_APIC_COUNT];\r | |
79 | #endif\r | |
80 | \r | |
81 | #if EFI_ACPI_INTERRUPT_SOURCE_OVERRIDE_COUNT > 0\r | |
82 | EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE Iso[EFI_ACPI_INTERRUPT_SOURCE_OVERRIDE_COUNT];\r | |
83 | #endif\r | |
84 | \r | |
85 | #if EFI_ACPI_NON_MASKABLE_INTERRUPT_SOURCE_COUNT > 0\r | |
86 | EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE NmiSource[EFI_ACPI_NON_MASKABLE_INTERRUPT_SOURCE_COUNT];\r | |
87 | #endif\r | |
88 | \r | |
89 | #if EFI_ACPI_LOCAL_APIC_NMI_COUNT > 0\r | |
90 | EFI_ACPI_1_0_LOCAL_APIC_NMI_STRUCTURE LocalApicNmi[EFI_ACPI_LOCAL_APIC_NMI_COUNT];\r | |
91 | #endif\r | |
92 | \r | |
93 | #if EFI_ACPI_LOCAL_APIC_ADDRESS_OVERRIDE_COUNT > 0\r | |
94 | EFI_ACPI_1_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE LocalApicOverride[EFI_ACPI_LOCAL_APIC_ADDRESS_OVERRIDE_COUNT];\r | |
95 | #endif\r | |
96 | \r | |
97 | } EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE;\r | |
98 | \r | |
99 | //\r | |
100 | // ACPI 2.0 Table structure\r | |
101 | //\r | |
102 | typedef struct {\r | |
103 | EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header;\r | |
104 | \r | |
105 | #if EFI_ACPI_PROCESSOR_LOCAL_APIC_COUNT > 0\r | |
106 | EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC_STRUCTURE LocalApic[EFI_ACPI_PROCESSOR_LOCAL_APIC_COUNT];\r | |
107 | #endif\r | |
108 | \r | |
109 | #if EFI_ACPI_IO_APIC_COUNT > 0\r | |
110 | EFI_ACPI_2_0_IO_APIC_STRUCTURE IoApic[EFI_ACPI_IO_APIC_COUNT];\r | |
111 | #endif\r | |
112 | \r | |
113 | #if EFI_ACPI_INTERRUPT_SOURCE_OVERRIDE_COUNT > 0\r | |
114 | EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE Iso[EFI_ACPI_INTERRUPT_SOURCE_OVERRIDE_COUNT];\r | |
115 | #endif\r | |
116 | \r | |
117 | #if EFI_ACPI_NON_MASKABLE_INTERRUPT_SOURCE_COUNT > 0\r | |
118 | EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE NmiSource[EFI_ACPI_NON_MASKABLE_INTERRUPT_SOURCE_COUNT];\r | |
119 | #endif\r | |
120 | \r | |
121 | #if EFI_ACPI_LOCAL_APIC_NMI_COUNT > 0\r | |
122 | EFI_ACPI_2_0_LOCAL_APIC_NMI_STRUCTURE LocalApicNmi[EFI_ACPI_LOCAL_APIC_NMI_COUNT];\r | |
123 | #endif\r | |
124 | \r | |
125 | #if EFI_ACPI_LOCAL_APIC_ADDRESS_OVERRIDE_COUNT > 0\r | |
126 | EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE LocalApicOverride[EFI_ACPI_LOCAL_APIC_ADDRESS_OVERRIDE_COUNT];\r | |
127 | #endif\r | |
128 | \r | |
129 | #if EFI_ACPI_IO_SAPIC_COUNT > 0\r | |
130 | EFI_ACPI_2_0_IO_SAPIC_STRUCTURE IoSapic[EFI_ACPI_IO_SAPIC_COUNT];\r | |
131 | #endif\r | |
132 | \r | |
133 | #if EFI_ACPI_PROCESSOR_LOCAL_SAPIC_COUNT > 0\r | |
134 | EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE LocalSapic[EFI_ACPI_PROCESSOR_LOCAL_SAPIC_COUNT];\r | |
135 | #endif\r | |
136 | \r | |
137 | #if EFI_ACPI_PLATFORM_INTERRUPT_SOURCES_COUNT > 0\r | |
138 | EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE PlatformInterruptSources[EFI_ACPI_PLATFORM_INTERRUPT_SOURCES_COUNT];\r | |
139 | #endif\r | |
140 | \r | |
141 | } EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE;\r | |
142 | \r | |
143 | //\r | |
144 | // ACPI 3.0 Table structure\r | |
145 | //\r | |
146 | typedef struct {\r | |
147 | EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header;\r | |
148 | \r | |
149 | #if EFI_ACPI_PROCESSOR_LOCAL_APIC_COUNT > 0 // Type 0x00\r | |
150 | EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_STRUCTURE LocalApic[EFI_ACPI_PROCESSOR_LOCAL_APIC_COUNT];\r | |
151 | #endif\r | |
152 | \r | |
153 | #if EFI_ACPI_IO_APIC_COUNT > 0 // Type 0x01\r | |
154 | EFI_ACPI_3_0_IO_APIC_STRUCTURE IoApic[EFI_ACPI_IO_APIC_COUNT];\r | |
155 | #endif\r | |
156 | \r | |
157 | #if EFI_ACPI_INTERRUPT_SOURCE_OVERRIDE_COUNT > 0 // Type 0x02\r | |
158 | EFI_ACPI_3_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE Iso[EFI_ACPI_INTERRUPT_SOURCE_OVERRIDE_COUNT];\r | |
159 | #endif\r | |
160 | \r | |
161 | #if EFI_ACPI_NON_MASKABLE_INTERRUPT_SOURCE_COUNT > 0 // Type 0x03\r | |
162 | EFI_ACPI_3_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE NmiSource[EFI_ACPI_NON_MASKABLE_INTERRUPT_SOURCE_COUNT];\r | |
163 | #endif\r | |
164 | \r | |
165 | #if EFI_ACPI_LOCAL_APIC_NMI_COUNT > 0 // Type 0x04\r | |
166 | EFI_ACPI_3_0_LOCAL_APIC_NMI_STRUCTURE LocalApicNmi[EFI_ACPI_LOCAL_APIC_NMI_COUNT];\r | |
167 | #endif\r | |
168 | \r | |
169 | #if EFI_ACPI_LOCAL_APIC_ADDRESS_OVERRIDE_COUNT > 0 // Type 0x05\r | |
170 | EFI_ACPI_3_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE LocalApicOverride[EFI_ACPI_LOCAL_APIC_ADDRESS_OVERRIDE_COUNT];\r | |
171 | #endif\r | |
172 | \r | |
173 | #if EFI_ACPI_IO_SAPIC_COUNT > 0 // Type 0x06\r | |
174 | EFI_ACPI_3_0_IO_SAPIC_STRUCTURE IoSapic[EFI_ACPI_IO_SAPIC_COUNT];\r | |
175 | #endif\r | |
176 | \r | |
177 | #if EFI_ACPI_PROCESSOR_LOCAL_SAPIC_COUNT > 0 // Type 0x07 : This table changes in madt 2.0\r | |
178 | EFI_ACPI_3_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE LocalSapic[EFI_ACPI_PROCESSOR_LOCAL_SAPIC_COUNT];\r | |
179 | #endif\r | |
180 | \r | |
181 | #if EFI_ACPI_PLATFORM_INTERRUPT_SOURCES_COUNT > 0 // Type 0x08\r | |
182 | EFI_ACPI_3_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE PlatformInterruptSources[EFI_ACPI_PLATFORM_INTERRUPT_SOURCES_COUNT];\r | |
183 | #endif\r | |
184 | \r | |
185 | } EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE;\r | |
186 | \r | |
187 | #pragma pack()\r | |
188 | \r | |
189 | #endif\r |