#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 of an interrupt source override entry.
- Parameters
-
| [in] | Override | The interrupt source override entry. |
Definition at line 121 of file madt.c.
123{
124
126 {
128 return;
129 }
130
132}
ULONG HalpPicVectorRedirect[16]
static ULONG HalpMadtIgnoredEntries
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 94 of file madt.c.
96{
99
100
102 {
104 return;
105 }
106
110}
#define RTL_FIELD_SIZE(type, field)
HALP_APIC_INFO_TABLE HalpApicInfoTable
#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 49 of file madt.c.
53{
55
57 return;
58
59
61 {
63 return;
64 }
65
66
68 {
70 return;
71 }
72
74 {
76 return;
77 }
78
79
83}
#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 143 of file madt.c.
145{
148
149 TableEnd = (
ULONG_PTR)MadtTable + MadtTable->Header.Length;
151
153 {
155 (
Entry->Length <
sizeof(*Entry)) ||
157 {
159 return;
160 }
161
163 {
165 {
167
168 if (
Entry->Length <
sizeof(*LocalApic))
169 {
171 break;
172 }
173
177 break;
178 }
179
181 {
183
184 if (
Entry->Length <
sizeof(*LocalX2Apic))
185 {
187 break;
188 }
189
193 break;
194 }
195
197 {
199 {
201 break;
202 }
203
205 break;
206 }
207
209 {
211 {
213 break;
214 }
215
217 break;
218 }
219
220
221 default:
222 break;
223 }
224
226 }
227}
@ 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 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 240 of file madt.c.
241{
245
246
248
250 {
252 break;
253 }
254
256 {
257
259 BootProcessor.
LapicId = BootApicId;
261 }
262 else
263 {
264
268 Index *
sizeof(BootProcessor));
269 }
270
273}
FORCEINLINE struct _KPRCB * KeGetCurrentPrcb(VOID)
#define RtlZeroMemory(Destination, Length)
#define RtlMoveMemory(Destination, Source, Length)
Referenced by HalpParseApicTables().
◆ HalpParseApicTables()
Definition at line 276 of file madt.c.
278{
280
282 if (MadtTable && (MadtTable->
Header.
Length >=
sizeof(*MadtTable)))
283 {
286 }
287 else
288 {
290 }
291
293}
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 296 of file madt.c.
297{
298#if DBG
300
303 {
304 DPRINT1(
" Processor %lu: ProcessorId %u, LapicId %u, ProcessorStarted %u, BSPCheck %u, ProcessorPrcb %p\n",
311 }
312
314 {
316 {
317 DPRINT1(
" I/O APIC %lu: Address 0x%08lx, GlobalIrqBase %lu\n",
321 }
322 }
323
325 {
326 DPRINT1(
"MADT missing or malformed: %u, entries ignored: %lu\n",
329 }
330#endif
331}
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
| ULONG HalpPicVectorRedirect[16] |
|
extern |
◆ HalpProcessorIdentity