57{
61
63 if (!MadtTable)
64 {
66 return;
67 }
68
70 {
72 return;
73 }
74
76
77#if 1
78
79
81
82
83#else
84
86 {
88 }
89 else
90 {
91#if 1
92 DPRINT01(
"ACPI_MADT_MULTIPLE_APIC support is UNIMPLEMENTED\n");
93 return;
94#else
96#endif
97 }
98
99#endif
100
102
105 DPRINT00(
" MadtTable %p, subtables %p - %p\n", MadtTable, AcpiHeader, (
PVOID)TableEnd);
106
107 while ((
ULONG_PTR)(AcpiHeader + 1) <= TableEnd)
108 {
109 if (AcpiHeader->
Length <
sizeof(*AcpiHeader))
110 {
111 DPRINT01(
"Length is too short: %p, %u\n", AcpiHeader, AcpiHeader->
Length);
112 return;
113 }
114
116 {
117 DPRINT01(
"Length mismatch: %p, %u, %p\n",
119 return;
120 }
121
122 switch (AcpiHeader->
Type)
123 {
125 {
127
128 if (AcpiHeader->
Length !=
sizeof(*LocalApic))
129 {
130 DPRINT01(
"Type/Length mismatch: %p, %u\n", AcpiHeader, AcpiHeader->
Length);
131 return;
132 }
133
134 DPRINT00(
" Local Apic, Processor %lu: ProcessorId %u, Id %u, LapicFlags %08X\n",
137
139 {
141 break;
142 }
143
145 {
146 DPRINT00(
" Skipped: array is full\n");
147
148 break;
149 }
150
151
155
157
158 break;
159 }
161 {
163
164 if (AcpiHeader->
Length !=
sizeof(*IoApic))
165 {
166 DPRINT01(
"Type/Length mismatch: %p, %u\n", AcpiHeader, AcpiHeader->
Length);
167 return;
168 }
169
170 DPRINT00(
" Io Apic: Id %u, Address %08X, GlobalIrqBase %08X\n",
172
173
175 {
176 DPRINT01(
"Id duplication: %p, %u\n", IoApic, IoApic->
Id);
177 return;
178 }
179
180
183
185
186 break;
187 }
189 {
192
193 if (AcpiHeader->
Length !=
sizeof(*InterruptOverride))
194 {
195 DPRINT01(
"Type/Length mismatch: %p, %u\n", AcpiHeader, AcpiHeader->
Length);
196 return;
197 }
198
199 DPRINT00(
" Interrupt Override: Bus %u, SourceIrq %u, GlobalIrq %08X, IntiFlags %04X / UNIMPLEMENTED\n",
202
203 if (InterruptOverride->
Bus != 0)
204 {
205 DPRINT01(
"Invalid Bus: %p, %u\n", InterruptOverride, InterruptOverride->
Bus);
206 return;
207 }
208
209#if 1
210
211#else
213 {
214 DPRINT01(
"Invalid SourceIrq: %p, %u\n",
215 InterruptOverride, InterruptOverride->
SourceIrq);
216 return;
217 }
218
219
221
222#endif
223
224 break;
225 }
226 default:
227 {
228 DPRINT01(
" UNIMPLEMENTED: Type %u, Length %u\n",
230 return;
231 }
232 }
233
235 }
236
238 {
239 DPRINT01(
"Length mismatch: %p, %p, %p\n", MadtTable, AcpiHeader, (
PVOID)TableEnd);
240 return;
241 }
242}
@ ACPI_MADT_TYPE_INTERRUPT_OVERRIDE
@ ACPI_MADT_TYPE_LOCAL_APIC
#define ACPI_MADT_PCAT_COMPAT
#define ACPI_MADT_DUAL_PIC
ULONG HalpPicVectorRedirect[]
PVOID NTAPI HalAcpiGetTable(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN ULONG Signature)
HALP_APIC_INFO_TABLE HalpApicInfoTable
static PROCESSOR_IDENTITY HalpStaticProcessorIdentity[MAXIMUM_PROCESSORS]
const PPROCESSOR_IDENTITY HalpProcessorIdentity
#define LAPIC_FLAG_ENABLED
#define LAPIC_FLAG_ONLINE_CAPABLE
#define HALP_APIC_MODE_LEGACY
ULONG IoApicPA[HALP_APIC_INFO_TABLE_IOAPIC_NUMBER]
ULONG IoApicIrqBase[HALP_APIC_INFO_TABLE_IOAPIC_NUMBER]