ReactOS 0.4.15-dev-8146-gdc0ed6d
usage.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS HAL
3 * LICENSE: GPL - See COPYING in the top level directory
4 * PURPOSE: HAL Resource Report Routines
5 * PROGRAMMERS: Stefan Ginsberg (stefan.ginsberg@reactos.org)
6 */
7
8/* INCLUDES *******************************************************************/
9
10#include <hal.h>
11
12#define NDEBUG
13#include <debug.h>
14
15/* GLOBALS ********************************************************************/
16
23
25{
26 {0x3F8, 4},
27 {0x2F8, 3},
28 {0x3E8, 4},
29 {0x2E8, 3},
30 {0, 0}
31};
32
34{
36 {
37 {0x2F8, 0x8}, /* COM 1 */
38 {0,0},
39 }
40};
41
43{
45 {
46#if defined(SARCH_PC98)
47 /* PIC 1 */
48 {0x00, 1},
49 {0x02, 1},
50 /* PIC 2 */
51 {0x08, 1},
52 {0x0A, 1},
53 /* DMA */
54 {0x01, 1},
55 {0x03, 1},
56 {0x05, 1},
57 {0x07, 1},
58 {0x09, 1},
59 {0x0B, 1},
60 {0x0D, 1},
61 {0x0F, 1},
62 {0x11, 1},
63 {0x13, 1},
64 {0x15, 1},
65 {0x17, 1},
66 {0x19, 1},
67 {0x1B, 1},
68 {0x1D, 1},
69 {0x1F, 1},
70 {0x21, 1},
71 {0x23, 1},
72 {0x25, 1},
73 {0x27, 1},
74 {0x29, 1},
75 {0x2B, 1},
76 {0x2D, 1},
77 {0xE05, 1},
78 {0xE07, 1},
79 {0xE09, 1},
80 {0xE0B, 1},
81 /* RTC */
82 {0x20, 1},
83 {0x22, 1},
84 {0x128, 1},
85 /* System Control */
86 {0x33, 1},
87 {0x37, 1},
88 /* PIT */
89 {0x71, 1},
90 {0x73, 1},
91 {0x75, 1},
92 {0x77, 1},
93 {0x3FD9,1},
94 {0x3FDB,1},
95 {0x3FDD,1},
96 {0x3FDF,1},
97 /* x87 Coprocessor */
98 {0xF8, 8},
99#else
100 {0x00, 0x20}, /* DMA 1 */
101 {0xC0, 0x20}, /* DMA 2 */
102 {0x80, 0x10}, /* DMA EPAR */
103 {0x20, 0x2}, /* PIC 1 */
104 {0xA0, 0x2}, /* PIC 2 */
105 {0x40, 0x4}, /* PIT 1 */
106 {0x48, 0x4}, /* PIT 2 */
107 {0x92, 0x1}, /* System Control Port A */
108 {0x70, 0x2}, /* CMOS */
109 {0xF0, 0x10}, /* x87 Coprocessor */
110#endif
111 {0xCF8, 0x8}, /* PCI 0 */
112 {0,0},
113 }
114};
115
116/* FUNCTIONS ******************************************************************/
117
118#ifndef _MINIHAL_
119CODE_SEG("INIT")
120VOID
121NTAPI
123 OUT PULONG Scale,
125{
126 /* Sorting depends on resource type */
127 switch (Descriptor->Type)
128 {
130
131 /* Interrupt goes by level */
132 *Scale = 0;
133 *Value = RtlConvertUlongToLargeInteger(Descriptor->u.Interrupt.Level);
134 break;
135
137
138 /* Port goes by port address */
139 *Scale = 1;
140 *Value = Descriptor->u.Port.Start;
141 break;
142
144
145 /* Memory goes by base address */
146 *Scale = 2;
147 *Value = Descriptor->u.Memory.Start;
148 break;
149
150 default:
151
152 /* Anything else */
153 *Scale = 4;
155 break;
156 }
157}
158
159CODE_SEG("INIT")
160VOID
161NTAPI
164 IN PCM_PARTIAL_RESOURCE_DESCRIPTOR TranslatedDescriptor)
165{
166 /* Exclusive interrupt entry */
167 RawDescriptor->Type = CmResourceTypeInterrupt;
168 RawDescriptor->ShareDisposition = CmResourceShareDriverExclusive;
169
170 /* Check the interrupt type */
172 {
173 /* Latched */
174 RawDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED;
175 }
176 else
177 {
178 /* Level */
179 RawDescriptor->Flags = CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE;
180 }
181
182 /* Get vector and level from IDT usage */
183 RawDescriptor->u.Interrupt.Vector = HalpIDTUsage[Entry].BusReleativeVector;
184 RawDescriptor->u.Interrupt.Level = HalpIDTUsage[Entry].BusReleativeVector;
185
186 /* Affinity is all the CPUs */
187 RawDescriptor->u.Interrupt.Affinity = HalpActiveProcessors;
188
189 /* The translated copy is identical */
190 RtlCopyMemory(TranslatedDescriptor, RawDescriptor, sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR));
191
192 /* But the vector and IRQL must be set correctly */
193 TranslatedDescriptor->u.Interrupt.Vector = Entry;
194 TranslatedDescriptor->u.Interrupt.Level = HalpIDTUsage[Entry].Irql;
195}
196
197CODE_SEG("INIT")
198VOID
199NTAPI
201 IN PADDRESS_USAGE CurrentAddress,
202 IN ULONG Element,
204 IN PCM_PARTIAL_RESOURCE_DESCRIPTOR TranslatedDescriptor)
205{
207
208 /* Set the type and make it exclusive */
209 RawDescriptor->Type = CurrentAddress->Type;
210 RawDescriptor->ShareDisposition = CmResourceShareDriverExclusive;
211
212 /* Check what this is */
213 if (RawDescriptor->Type == CmResourceTypePort)
214 {
215 /* Write out port data */
216 AddressSpace = 1;
217 RawDescriptor->Flags = CM_RESOURCE_PORT_IO;
218 RawDescriptor->u.Port.Start.HighPart = 0;
219 RawDescriptor->u.Port.Start.LowPart = CurrentAddress->Element[Element].Start;
220 RawDescriptor->u.Port.Length = CurrentAddress->Element[Element].Length;
221
222 /* Determine if 16-bit port addresses are allowed */
223 RawDescriptor->Flags |= HalpIs16BitPortDecodeSupported();
224 }
225 else
226 {
227 /* Write out memory data */
228 AddressSpace = 0;
229 RawDescriptor->Flags = (CurrentAddress->Flags & IDT_READ_ONLY) ?
232 RawDescriptor->u.Memory.Start.HighPart = 0;
233 RawDescriptor->u.Memory.Start.LowPart = CurrentAddress->Element[Element].Start;
234 RawDescriptor->u.Memory.Length = CurrentAddress->Element[Element].Length;
235 }
236
237 /* Make an identical copy to begin with */
238 RtlCopyMemory(TranslatedDescriptor, RawDescriptor, sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR));
239
240 /* Check what this is */
241 if (RawDescriptor->Type == CmResourceTypePort)
242 {
243 /* Translate the port */
245 0,
246 RawDescriptor->u.Port.Start,
248 &TranslatedDescriptor->u.Port.Start);
249
250 /* If it turns out this is memory once translated, flag it */
251 if (AddressSpace == 0) TranslatedDescriptor->Flags = CM_RESOURCE_PORT_MEMORY;
252
253 }
254 else
255 {
256 /* Translate the memory */
258 0,
259 RawDescriptor->u.Memory.Start,
261 &TranslatedDescriptor->u.Memory.Start);
262 }
263}
264
265CODE_SEG("INIT")
266VOID
267NTAPI
270{
271 PCM_RESOURCE_LIST RawList, TranslatedList;
272 PCM_FULL_RESOURCE_DESCRIPTOR RawFull, TranslatedFull;
273 PCM_PARTIAL_RESOURCE_DESCRIPTOR CurrentRaw, CurrentTranslated, SortedRaw, SortedTranslated;
274 CM_PARTIAL_RESOURCE_DESCRIPTOR RawPartial, TranslatedPartial;
275 PCM_PARTIAL_RESOURCE_LIST RawPartialList = NULL, TranslatedPartialList = NULL;
277 ULONG i, j, k, ListSize, Count, Port, Element, CurrentScale, SortScale, ReportType, FlagMatch;
278 ADDRESS_USAGE *CurrentAddress;
279 LARGE_INTEGER CurrentSortValue, SortValue;
280 DbgPrint("%wZ Detected\n", HalName);
281
282 /* Check if KD is using a COM port */
283 if (KdComPortInUse)
284 {
285 /* Enter it into the I/O space */
289
290#if defined(SARCH_XBOX)
291 /*
292 * Do not claim interrupt resources for the KD COM port.
293 * The actual COM port lacks SERIRQ, IRQ 4 is hardwired to the NIC.
294 */
296#else
297 /* Use the debug port table if we have one */
299
300 /* Check if we're using ACPI */
302 {
303 /* No, so use our local table */
304 for (i = 0, Port = HalpComPortIrqMapping[i][0];
305 Port;
306 i++, Port = HalpComPortIrqMapping[i][0])
307 {
308 /* Is this the port we want? */
310 {
311 /* Register it */
316 HIGH_LEVEL);
317 }
318 }
319 }
320#endif
321 }
322
323 /* On non-ACPI systems, we need to build an address map */
325
326 /* Allocate the master raw and translated lists */
328 TranslatedList = ExAllocatePoolWithTag(NonPagedPool, PAGE_SIZE * 2, TAG_HAL);
329 if (!(RawList) || !(TranslatedList))
330 {
331 /* Bugcheck the system */
332 KeBugCheckEx(HAL_MEMORY_ALLOCATION,
333 4 * PAGE_SIZE,
334 1,
335 (ULONG_PTR)__FILE__,
336 __LINE__);
337 }
338
339 /* Zero out the lists */
340 RtlZeroMemory(RawList, PAGE_SIZE * 2);
341 RtlZeroMemory(TranslatedList, PAGE_SIZE * 2);
342
343 /* Set the interface type to begin with */
345
346 /* Loop all IDT entries that are not IRQs */
347 for (i = 0; i < PRIMARY_VECTOR_BASE; i++)
348 {
349 /* Check if the IDT isn't owned */
351 {
352 /* Then register it for internal usage */
355 }
356 }
357
358 /* Our full raw descriptors start here */
359 RawFull = RawList->List;
360
361 /* Keep track of the current partial raw and translated descriptors */
362 CurrentRaw = (PCM_PARTIAL_RESOURCE_DESCRIPTOR)RawList->List;
363 CurrentTranslated = (PCM_PARTIAL_RESOURCE_DESCRIPTOR)TranslatedList->List;
364
365 /* Do two passes */
366 for (ReportType = 0; ReportType < 2; ReportType++)
367 {
368 /* Pass 0 is for device usage */
369 if (ReportType == 0)
370 {
371 FlagMatch = IDT_DEVICE & ~IDT_REGISTERED;
373 }
374 else
375 {
376 /* Past 1 is for internal HAL usage */
377 FlagMatch = IDT_INTERNAL & ~IDT_REGISTERED;
379 }
380
381 /* Reset loop variables */
382 i = Element = 0;
383
384 /* Start looping our address uage list and interrupts */
385 CurrentAddress = HalpAddressUsageList;
386 while (TRUE)
387 {
388 /* Check for valid vector number */
389 if (i <= MAXIMUM_IDTVECTOR)
390 {
391 /* Check if this entry should be parsed */
392 if ((HalpIDTUsageFlags[i].Flags & FlagMatch))
393 {
394 /* Parse it */
395 HalpBuildPartialFromIdt(i, &RawPartial, &TranslatedPartial);
396 i++;
397 }
398 else
399 {
400 /* Skip this entry */
401 i++;
402 continue;
403 }
404 }
405 else
406 {
407 /* This is an address instead */
408 if (!CurrentAddress) break;
409
410 /* Check if the address should be reported */
411 if (!(CurrentAddress->Flags & FlagMatch) ||
412 !(CurrentAddress->Element[Element].Length))
413 {
414 /* Nope, skip it */
415 Element = 0;
416 CurrentAddress = CurrentAddress->Next;
417 continue;
418 }
419
420 /* Otherwise, parse the entry */
422 CurrentAddress,
423 Element,
424 &RawPartial,
425 &TranslatedPartial);
426 Element++;
427 }
428
429 /* Check for interface change */
430 if (RawFull->InterfaceType != Interface)
431 {
432 /* We need to add another full descriptor */
433 RawList->Count++;
434 TranslatedList->Count++;
435
436 /* The full descriptor follows wherever we were */
437 RawFull = (PCM_FULL_RESOURCE_DESCRIPTOR)CurrentRaw;
438 TranslatedFull = (PCM_FULL_RESOURCE_DESCRIPTOR)CurrentTranslated;
439
440 /* And it is of this new interface type */
441 RawFull->InterfaceType = Interface;
442 TranslatedFull->InterfaceType = Interface;
443
444 /* And its partial descriptors begin here */
445 RawPartialList = &RawFull->PartialResourceList;
446 TranslatedPartialList = &TranslatedFull->PartialResourceList;
447
448 /* And our next full descriptor should follow here */
449 CurrentRaw = RawFull->PartialResourceList.PartialDescriptors;
450 CurrentTranslated = TranslatedFull->PartialResourceList.PartialDescriptors;
451 }
452
453 /* We have written a new partial descriptor */
454 RawPartialList->Count++;
455 TranslatedPartialList->Count++;
456
457 /* Copy our local descriptors into the actual list */
458 RtlCopyMemory(CurrentRaw, &RawPartial, sizeof(RawPartial));
459 RtlCopyMemory(CurrentTranslated, &TranslatedPartial, sizeof(TranslatedPartial));
460
461 /* Move to the next partial descriptor */
462 CurrentRaw++;
463 CurrentTranslated++;
464 }
465 }
466
467 /* Get the final list of the size for the kernel call later */
468 ListSize = (ULONG)((ULONG_PTR)CurrentRaw - (ULONG_PTR)RawList);
469
470 /* Now reset back to the first full descriptor */
471 RawFull = RawList->List;
472 TranslatedFull = TranslatedList->List;
473
474 /* And loop all the full descriptors */
475 for (i = 0; i < RawList->Count; i++)
476 {
477 /* Get the first partial descriptor in this list */
478 CurrentRaw = RawFull->PartialResourceList.PartialDescriptors;
479 CurrentTranslated = TranslatedFull->PartialResourceList.PartialDescriptors;
480
481 /* Get the count of partials in this list */
483
484 /* Loop all the partials in this list */
485 for (j = 0; j < Count; j++)
486 {
487 /* Get the sort value at this point */
488 HalpGetResourceSortValue(CurrentRaw, &CurrentScale, &CurrentSortValue);
489
490 /* Save the current sort pointer */
491 SortedRaw = CurrentRaw;
492 SortedTranslated = CurrentTranslated;
493
494 /* Loop all descriptors starting from this one */
495 for (k = j; k < Count; k++)
496 {
497 /* Get the sort value at the sort point */
498 HalpGetResourceSortValue(SortedRaw, &SortScale, &SortValue);
499
500 /* Check if a swap needs to occur */
501 if ((SortScale < CurrentScale) ||
502 ((SortScale == CurrentScale) &&
503 (SortValue.QuadPart <= CurrentSortValue.QuadPart)))
504 {
505 /* Swap raw partial with the sort location partial */
506 RtlCopyMemory(&RawPartial, CurrentRaw, sizeof(RawPartial));
507 RtlCopyMemory(CurrentRaw, SortedRaw, sizeof(RawPartial));
508 RtlCopyMemory(SortedRaw, &RawPartial, sizeof(RawPartial));
509
510 /* Swap translated partial in the same way */
511 RtlCopyMemory(&TranslatedPartial, CurrentTranslated, sizeof(TranslatedPartial));
512 RtlCopyMemory(CurrentTranslated, SortedTranslated, sizeof(TranslatedPartial));
513 RtlCopyMemory(SortedTranslated, &TranslatedPartial, sizeof(TranslatedPartial));
514
515 /* Update the sort value at this point */
516 HalpGetResourceSortValue(CurrentRaw, &CurrentScale, &CurrentSortValue);
517 }
518
519 /* The sort location has been updated */
520 SortedRaw++;
521 SortedTranslated++;
522 }
523
524 /* Move to the next partial */
525 CurrentRaw++;
526 CurrentTranslated++;
527 }
528
529 /* Move to the next full descriptor */
530 RawFull = (PCM_FULL_RESOURCE_DESCRIPTOR)CurrentRaw;
531 TranslatedFull = (PCM_FULL_RESOURCE_DESCRIPTOR)CurrentTranslated;
532 }
533
534 /* Mark this is an ACPI system, if it is */
536
537 /* Tell the kernel about all this */
539 RawList,
540 TranslatedList,
541 ListSize);
542
543 /* Free our lists */
544 ExFreePool(RawList);
545 ExFreePool(TranslatedList);
546
547 /* Get the machine's serial number */
549}
550#endif /* !_MINIHAL_ */
551
552CODE_SEG("INIT")
553VOID
554NTAPI
556 IN ULONG BusVector,
557 IN ULONG SystemVector,
558 IN KIRQL Irql)
559{
560 /* Save the vector flags */
561 HalpIDTUsageFlags[SystemVector].Flags = Flags;
562
563 /* Save the vector data */
564 HalpIDTUsage[SystemVector].Irql = Irql;
565 HalpIDTUsage[SystemVector].BusReleativeVector = (UCHAR)BusVector;
566}
567
568#ifndef _MINIHAL_
569CODE_SEG("INIT")
570VOID
571NTAPI
573 IN ULONG BusVector,
574 IN ULONG SystemVector,
575 IN KIRQL Irql,
578{
579 /* Set the IDT_LATCHED flag for latched interrupts */
580 if (Mode == Latched) Flags |= IDT_LATCHED;
581
582 /* Register the vector */
583 HalpRegisterVector(Flags, BusVector, SystemVector, Irql);
584
585 /* Connect the interrupt */
586 KeRegisterInterruptHandler(SystemVector, Handler);
587
588 /* Enable the interrupt */
589 HalEnableSystemInterrupt(SystemVector, Irql, Mode);
590}
591
592CODE_SEG("INIT")
593VOID
594NTAPI
596{
598 UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\CrashControl");
603 KEY_VALUE_PARTIAL_INFORMATION KeyValueInformation;
604
605 /* Set default */
606 HalpNMIDumpFlag = 0;
607
608 /* Initialize attributes */
610 &KeyName,
612 NULL,
613 NULL);
614
615 /* Open crash key */
616 Status = ZwOpenKey(&Handle, KEY_READ, &ObjectAttributes);
617 if (NT_SUCCESS(Status))
618 {
619 /* Query key value */
620 RtlInitUnicodeString(&ValueName, L"NMICrashDump");
621 Status = ZwQueryValueKey(Handle,
622 &ValueName,
624 &KeyValueInformation,
625 sizeof(KeyValueInformation),
626 &ResultLength);
627 if (NT_SUCCESS(Status))
628 {
629 /* Check for valid data */
631 {
632 /* Read the flag */
633 HalpNMIDumpFlag = KeyValueInformation.Data[0];
634 }
635 }
636
637 /* We're done */
639 }
640}
641#endif /* !_MINIHAL_ */
642
643/* EOF */
#define CODE_SEG(...)
unsigned char BOOLEAN
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER Handler
Definition: acpixf.h:672
LONG NTSTATUS
Definition: precomp.h:26
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
_Out_ PKIRQL Irql
Definition: csq.h:179
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define ULONG_PTR
Definition: config.h:101
#define PtrToUlong(u)
Definition: config.h:107
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define HIGH_LEVEL
Definition: env_spec_w32.h:703
#define PAGE_SIZE
Definition: env_spec_w32.h:49
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
#define NonPagedPool
Definition: env_spec_w32.h:307
ULONG Handle
Definition: gdb_input.c:15
Status
Definition: gdiplustypes.h:25
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
Definition: glfuncs.h:248
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 GLint GLint j
Definition: glfuncs.h:250
BOOLEAN NTAPI HalTranslateBusAddress(IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber, IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress)
Definition: bus.c:140
BOOLEAN NTAPI HalEnableSystemInterrupt(IN ULONG Vector, IN KIRQL Irql, IN KINTERRUPT_MODE InterruptMode)
Definition: pic.c:295
KAFFINITY HalpActiveProcessors
Definition: processor.c:17
VOID NTAPI HalpRegisterVector(IN UCHAR Flags, IN ULONG BusVector, IN ULONG SystemVector, IN KIRQL Irql)
Definition: usage.c:34
PUCHAR KdComPortInUse
Definition: usage.c:17
VOID NTAPI HalpReportResourceUsage(IN PUNICODE_STRING HalName, IN INTERFACE_TYPE InterfaceType)
Definition: usage.c:26
IDTUsageFlags HalpIDTUsageFlags[256]
Definition: usage.c:19
IDTUsage HalpIDTUsage[256]
Definition: usage.c:20
VOID NTAPI HalpEnableInterruptHandler(IN UCHAR Flags, IN ULONG BusVector, IN ULONG SystemVector, IN KIRQL Irql, IN PVOID Handler, IN KINTERRUPT_MODE Mode)
Definition: usage.c:49
#define DbgPrint
Definition: hal.h:12
NTSTATUS NTAPI HalpMarkAcpiHal(VOID)
Definition: misc.c:57
VOID NTAPI HalpReportSerialNumber(VOID)
Definition: misc.c:26
BOOLEAN HalpGetInfoFromACPI
Definition: usage.c:17
VOID NTAPI HalpBuildPartialFromIdt(IN ULONG Entry, IN PCM_PARTIAL_RESOURCE_DESCRIPTOR RawDescriptor, IN PCM_PARTIAL_RESOURCE_DESCRIPTOR TranslatedDescriptor)
Definition: usage.c:162
BOOLEAN HalpNMIDumpFlag
Definition: usage.c:18
VOID NTAPI HalpBuildPartialFromAddress(IN INTERFACE_TYPE Interface, IN PADDRESS_USAGE CurrentAddress, IN ULONG Element, IN PCM_PARTIAL_RESOURCE_DESCRIPTOR RawDescriptor, IN PCM_PARTIAL_RESOURCE_DESCRIPTOR TranslatedDescriptor)
Definition: usage.c:200
ADDRESS_USAGE HalpComIoSpace
Definition: usage.c:33
VOID NTAPI HalpGetResourceSortValue(IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor, OUT PULONG Scale, OUT PLARGE_INTEGER Value)
Definition: usage.c:122
PADDRESS_USAGE HalpAddressUsageList
Definition: usage.c:20
USHORT HalpComPortIrqMapping[5][2]
Definition: usage.c:24
ADDRESS_USAGE HalpDefaultIoSpace
Definition: usage.c:42
VOID NTAPI HalpGetNMICrashFlag(VOID)
Definition: usage.c:595
#define TAG_HAL
Definition: hal.h:61
ULONG NTAPI HalpIs16BitPortDecodeSupported(VOID)
Definition: halacpi.c:961
VOID NTAPI HalpBuildAddressMap(VOID)
Definition: halacpi.c:944
PWCHAR HalName
Definition: halacpi.c:45
BOOLEAN NTAPI HalpGetDebugPortTable(VOID)
Definition: halacpi.c:952
#define IDT_LATCHED
Definition: halp.h:20
#define PRIMARY_VECTOR_BASE
Definition: halp.h:16
#define IDT_REGISTERED
Definition: halp.h:19
#define IDT_INTERNAL
Definition: halp.h:21
#define IDT_DEVICE
Definition: halp.h:22
#define IDT_READ_ONLY
Definition: halp.h:60
CPPORT Port[4]
Definition: headless.c:35
_In_ ULONG Mode
Definition: hubbusif.h:303
struct _CM_FULL_RESOURCE_DESCRIPTOR * PCM_FULL_RESOURCE_DESCRIPTOR
#define CmResourceTypeMemory
Definition: hwresource.cpp:125
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR * PCM_PARTIAL_RESOURCE_DESCRIPTOR
@ InterfaceTypeUndefined
Definition: hwresource.cpp:136
@ Internal
Definition: hwresource.cpp:137
enum _INTERFACE_TYPE INTERFACE_TYPE
#define CmResourceTypePort
Definition: hwresource.cpp:123
#define CmResourceTypeInterrupt
Definition: hwresource.cpp:124
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
NTSYSAPI ULONGLONG WINAPI RtlConvertUlongToLargeInteger(ULONG)
Definition: largeint.c:47
NTSTATUS NTAPI IoReportHalResourceUsage(_In_ PUNICODE_STRING HalName, _In_ PCM_RESOURCE_LIST RawResourceList, _In_ PCM_RESOURCE_LIST TranslatedResourceList, _In_ ULONG ResourceListSize)
Reports hardware resources of the HAL in the \Registry\Machine\Hardware\ResourceMap tree.
Definition: iorsrce.c:1321
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
int k
Definition: mpi.c:3369
#define MAXIMUM_IDTVECTOR
Definition: asm.h:280
#define CM_RESOURCE_PORT_MEMORY
Definition: cmtypes.h:108
#define CM_RESOURCE_PORT_IO
Definition: cmtypes.h:109
#define CM_RESOURCE_MEMORY_READ_ONLY
Definition: cmtypes.h:121
#define CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE
Definition: cmtypes.h:143
#define CM_RESOURCE_MEMORY_READ_WRITE
Definition: cmtypes.h:120
#define CM_RESOURCE_INTERRUPT_LATCHED
Definition: cmtypes.h:144
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
int Count
Definition: noreturn.cpp:7
@ KeyValuePartialInformation
Definition: nt_native.h:1182
#define KEY_READ
Definition: nt_native.h:1023
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
FORCEINLINE VOID KeRegisterInterruptHandler(IN ULONG Vector, IN PVOID Handler)
Definition: ke.h:301
#define L(x)
Definition: ntvdm.h:50
unsigned short USHORT
Definition: pedump.c:61
VOID NTAPI KeBugCheckEx(_In_ ULONG BugCheckCode, _In_ ULONG_PTR BugCheckParameter1, _In_ ULONG_PTR BugCheckParameter2, _In_ ULONG_PTR BugCheckParameter3, _In_ ULONG_PTR BugCheckParameter4)
Definition: rtlcompat.c:108
@ Latched
Definition: miniport.h:81
enum _KINTERRUPT_MODE KINTERRUPT_MODE
base of all file and directory entries
Definition: entries.h:83
Definition: halp.h:30
UCHAR BusReleativeVector
Definition: halp.h:32
KIRQL Irql
Definition: halp.h:31
CM_PARTIAL_RESOURCE_LIST PartialResourceList
Definition: hwresource.cpp:160
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1]
Definition: hwresource.cpp:119
CM_FULL_RESOURCE_DESCRIPTOR List[1]
Definition: hwresource.cpp:165
struct _HalAddressUsage::@1528 Element[]
struct _HalAddressUsage * Next
Definition: halp.h:192
UCHAR Flags
Definition: halp.h:194
UCHAR Flags
Definition: halp.h:26
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
LONGLONG QuadPart
Definition: typedefs.h:114
struct _LARGE_INTEGER::@2301 u
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Definition: wdfdevice.h:2699
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID InterfaceType
Definition: wdffdo.h:463
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
Definition: wdfregistry.h:243
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
_Must_inspect_result_ _In_ WDFIORESLIST _In_ PIO_RESOURCE_DESCRIPTOR Descriptor
Definition: wdfresource.h:342
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
@ CmResourceShareDriverExclusive
Definition: cmtypes.h:242
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG AddressSpace
Definition: iofuncs.h:2274
unsigned char UCHAR
Definition: xmlstorage.h:181