#include <hal.h>
#include <acpi.h>
#include <smp.h>
#include <debug.h>
Go to the source code of this file.
◆ NDEBUG
◆ HalpMadtAddInterruptOverride()
Records the routing and polarity of an interrupt source override entry.
- Parameters
-
| [in] | Override | The interrupt source override entry. |
Definition at line 122 of file madt.c.
124{
125 ULONG Irq = Override->SourceIrq;
126
127
129 {
131 return;
132 }
133
136
138 {
141 break;
142
145 break;
146
147 default:
149 break;
150 }
151}
#define ACPI_MADT_POLARITY_ACTIVE_HIGH
#define ACPI_MADT_POLARITY_ACTIVE_LOW
#define ACPI_MADT_POLARITY_MASK
ULONG HalpPicVectorRedirect[HALP_ISA_IRQ_COUNT]
static ULONG HalpMadtIgnoredEntries
HALP_APIC_INFO_TABLE HalpApicInfoTable
#define HALP_ISA_IRQ_COUNT
ULONG IsaIrqGsi[HALP_ISA_IRQ_COUNT]
KINTERRUPT_POLARITY IsaIrqPolarity[HALP_ISA_IRQ_COUNT]
@ InterruptPolarityUnknown
Referenced by HalpMadtParseEntries().
◆ HalpMadtAddIoApic()
Records the I/O APIC of an I/O APIC entry.
- Parameters
-
| [in] | IoApic | The I/O APIC entry. |
Definition at line 95 of file madt.c.
97{
100
101
103 {
105 return;
106 }
107
111}
#define RTL_FIELD_SIZE(type, field)
#define RTL_NUMBER_OF_FIELD(type, field)
ULONG IoApicPA[HALP_APIC_INFO_TABLE_IOAPIC_NUMBER]
ULONG IoApicIrqBase[HALP_APIC_INFO_TABLE_IOAPIC_NUMBER]
Referenced by HalpMadtParseEntries().
◆ HalpMadtAddProcessor()
Adds the processor of a local APIC or local x2APIC entry.
- Parameters
-
| [in] | ApicId | Local APIC ID of the processor. |
| [in] | ProcessorId | ACPI processor ID of the processor. |
| [in] | Flags | Local APIC flags of the entry. |
Definition at line 50 of file madt.c.
54{
56
58 return;
59
60
62 {
64 return;
65 }
66
67
69 {
71 return;
72 }
73
75 {
77 return;
78 }
79
80
84}
#define ACPI_MADT_ENABLED
_In_ D3DDDI_VIDEO_PRESENT_TARGET_ID _In_ ULONG _In_ ULONG Flags
PROCESSOR_IDENTITY HalpProcessorIdentity[MAXIMUM_PROCESSORS]
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ typedef _In_ ULONG ApicId
Referenced by HalpMadtParseEntries().
◆ HalpMadtParseEntries()
Walks the interrupt controller entries of the MADT.
- Parameters
-
| [in] | MadtTable | The MADT, with a header already validated. |
Definition at line 162 of file madt.c.
164{
167
168 TableEnd = (
ULONG_PTR)MadtTable + MadtTable->Header.Length;
170
172 {
174 (
Entry->Length <
sizeof(*Entry)) ||
176 {
178 return;
179 }
180
182 {
184 {
186
187 if (
Entry->Length <
sizeof(*LocalApic))
188 {
190 break;
191 }
192
196 break;
197 }
198
200 {
202
203 if (
Entry->Length <
sizeof(*LocalX2Apic))
204 {
206 break;
207 }
208
212 break;
213 }
214
216 {
218 {
220 break;
221 }
222
224 break;
225 }
226
228 {
230 {
232 break;
233 }
234
236 break;
237 }
238
239
240 default:
241 break;
242 }
243
245 }
246}
@ ACPI_MADT_TYPE_LOCAL_X2APIC
@ ACPI_MADT_TYPE_INTERRUPT_OVERRIDE
@ ACPI_MADT_TYPE_LOCAL_APIC
static VOID HalpMadtAddIoApic(_In_ ACPI_MADT_IO_APIC *IoApic)
Records the I/O APIC of an I/O APIC entry.
static VOID HalpMadtAddProcessor(_In_ ULONG ApicId, _In_ ULONG ProcessorId, _In_ ULONG Flags)
Adds the processor of a local APIC or local x2APIC entry.
static BOOLEAN HalpMadtTruncated
static VOID HalpMadtAddInterruptOverride(_In_ ACPI_MADT_INTERRUPT_OVERRIDE *Override)
Records the routing and polarity of an interrupt source override entry.
Referenced by HalpParseApicTables().
◆ HalpMadtPlaceBootProcessor()
| static VOID HalpMadtPlaceBootProcessor |
( |
VOID |
| ) |
|
|
static |
Moves the boot processor to the first entry, since NT processor numbers follow the entry order.
Definition at line 259 of file madt.c.
260{
264
265
267
269 {
271 break;
272 }
273
275 {
276
278 BootProcessor.
LapicId = BootApicId;
280 }
281 else
282 {
283
287 Index *
sizeof(BootProcessor));
288 }
289
292}
FORCEINLINE struct _KPRCB * KeGetCurrentPrcb(VOID)
#define RtlZeroMemory(Destination, Length)
#define RtlMoveMemory(Destination, Source, Length)
Referenced by HalpParseApicTables().
◆ HalpParseApicTables()
Definition at line 295 of file madt.c.
297{
299
301 if (MadtTable && (MadtTable->
Header.
Length >=
sizeof(*MadtTable)))
302 {
305 }
306 else
307 {
309 }
310
312}
PVOID NTAPI HalAcpiGetTable(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN ULONG Signature)
static VOID HalpMadtParseEntries(_In_ ACPI_TABLE_MADT *MadtTable)
Walks the interrupt controller entries of the MADT.
static VOID HalpMadtPlaceBootProcessor(VOID)
Moves the boot processor to the first entry, since NT processor numbers follow the entry order.
Referenced by HalpInitProcessor().
◆ HalpPrintApicTables()
Definition at line 315 of file madt.c.
316{
317#if DBG
319
322 {
323 DPRINT1(
" Processor %lu: ProcessorId %u, LapicId %u, ProcessorStarted %u, BSPCheck %u, ProcessorPrcb %p\n",
330 }
331
333 {
335 {
336 DPRINT1(
" I/O APIC %lu: Address 0x%08lx, GlobalIrqBase %lu\n",
340 }
341 }
342
344 {
345 DPRINT1(
"MADT missing or malformed: %u, entries ignored: %lu\n",
348 }
349#endif
350}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define HALP_APIC_INFO_TABLE_IOAPIC_NUMBER
Referenced by HalpInitPhase0().
◆ HalpApicInfoTable
◆ HalpMadtIgnoredEntries
| ULONG HalpMadtIgnoredEntries |
|
static |
◆ HalpMadtTruncated
◆ HalpPicVectorRedirect
◆ HalpProcessorIdentity