ReactOS  0.4.14-dev-49-gfb4591c
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  * FILE: hal/halx86/generic/usage.c
5  * PURPOSE: HAL Resource Report Routines
6  * PROGRAMMERS: Stefan Ginsberg (stefan.ginsberg@reactos.org)
7  */
8 
9 /* INCLUDES *******************************************************************/
10 
11 #include <hal.h>
12 #define NDEBUG
13 #include <debug.h>
14 
15 INIT_FUNCTION
16 VOID
17 NTAPI
20  OUT PULONG Scale,
22 );
23 
24 INIT_FUNCTION
25 VOID
26 NTAPI
28  IN ULONG Entry,
29  IN PCM_PARTIAL_RESOURCE_DESCRIPTOR RawDescriptor,
30  IN PCM_PARTIAL_RESOURCE_DESCRIPTOR TranslatedDescriptor
31 );
32 
33 INIT_FUNCTION
34 VOID
35 NTAPI
38  IN PADDRESS_USAGE CurrentAddress,
39  IN ULONG Element,
40  IN PCM_PARTIAL_RESOURCE_DESCRIPTOR RawDescriptor,
41  IN PCM_PARTIAL_RESOURCE_DESCRIPTOR TranslatedDescriptor
42 );
43 
44 #if defined(ALLOC_PRAGMA) && !defined(_MINIHAL_)
45 #pragma alloc_text(INIT, HalpBuildPartialFromAddress)
46 #pragma alloc_text(INIT, HalpBuildPartialFromIdt)
47 #pragma alloc_text(INIT, HalpEnableInterruptHandler)
48 #pragma alloc_text(INIT, HalpGetNMICrashFlag)
49 #pragma alloc_text(INIT, HalpGetResourceSortValue)
50 #pragma alloc_text(INIT, HalpRegisterVector)
51 #pragma alloc_text(INIT, HalpReportResourceUsage)
52 #endif
53 
54 /* GLOBALS ********************************************************************/
55 
62 
64 {
65  {0x3F8, 4},
66  {0x2F8, 3},
67  {0x3E8, 4},
68  {0x2E8, 3},
69  {0, 0}
70 };
71 
73 {
75  {
76  {0x2F8, 0x8}, /* COM 1 */
77  {0,0},
78  }
79 };
80 
82 {
84  {
85  {0x00, 0x20}, /* DMA 1 */
86  {0xC0, 0x20}, /* DMA 2 */
87  {0x80, 0x10}, /* DMA EPAR */
88  {0x20, 0x2}, /* PIC 1 */
89  {0xA0, 0x2}, /* PIC 2 */
90  {0x40, 0x4}, /* PIT 1 */
91  {0x48, 0x4}, /* PIT 2 */
92  {0x92, 0x1}, /* System Control Port A */
93  {0x70, 0x2}, /* CMOS */
94  {0xF0, 0x10}, /* x87 Coprocessor */
95  {0xCF8, 0x8}, /* PCI 0 */
96  {0,0},
97  }
98 };
99 
100 /* FUNCTIONS ******************************************************************/
101 
102 #ifndef _MINIHAL_
103 INIT_FUNCTION
104 VOID
105 NTAPI
107  OUT PULONG Scale,
109 {
110  /* Sorting depends on resource type */
111  switch (Descriptor->Type)
112  {
114 
115  /* Interrupt goes by level */
116  *Scale = 0;
117  *Value = RtlConvertUlongToLargeInteger(Descriptor->u.Interrupt.Level);
118  break;
119 
120  case CmResourceTypePort:
121 
122  /* Port goes by port address */
123  *Scale = 1;
124  *Value = Descriptor->u.Port.Start;
125  break;
126 
128 
129  /* Memory goes by base address */
130  *Scale = 2;
131  *Value = Descriptor->u.Memory.Start;
132  break;
133 
134  default:
135 
136  /* Anything else */
137  *Scale = 4;
139  break;
140  }
141 }
142 
143 INIT_FUNCTION
144 VOID
145 NTAPI
147  IN PCM_PARTIAL_RESOURCE_DESCRIPTOR RawDescriptor,
148  IN PCM_PARTIAL_RESOURCE_DESCRIPTOR TranslatedDescriptor)
149 {
150  /* Exclusive interrupt entry */
151  RawDescriptor->Type = CmResourceTypeInterrupt;
152  RawDescriptor->ShareDisposition = CmResourceShareDriverExclusive;
153 
154  /* Check the interrupt type */
156  {
157  /* Latched */
158  RawDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED;
159  }
160  else
161  {
162  /* Level */
163  RawDescriptor->Flags = CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE;
164  }
165 
166  /* Get vector and level from IDT usage */
167  RawDescriptor->u.Interrupt.Vector = HalpIDTUsage[Entry].BusReleativeVector;
168  RawDescriptor->u.Interrupt.Level = HalpIDTUsage[Entry].BusReleativeVector;
169 
170  /* Affinity is all the CPUs */
171  RawDescriptor->u.Interrupt.Affinity = HalpActiveProcessors;
172 
173  /* The translated copy is identical */
174  RtlCopyMemory(TranslatedDescriptor, RawDescriptor, sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR));
175 
176  /* But the vector and IRQL must be set correctly */
177  TranslatedDescriptor->u.Interrupt.Vector = Entry;
178  TranslatedDescriptor->u.Interrupt.Level = HalpIDTUsage[Entry].Irql;
179 }
180 
181 INIT_FUNCTION
182 VOID
183 NTAPI
185  IN PADDRESS_USAGE CurrentAddress,
186  IN ULONG Element,
187  IN PCM_PARTIAL_RESOURCE_DESCRIPTOR RawDescriptor,
188  IN PCM_PARTIAL_RESOURCE_DESCRIPTOR TranslatedDescriptor)
189 {
191 
192  /* Set the type and make it exclusive */
193  RawDescriptor->Type = CurrentAddress->Type;
194  RawDescriptor->ShareDisposition = CmResourceShareDriverExclusive;
195 
196  /* Check what this is */
197  if (RawDescriptor->Type == CmResourceTypePort)
198  {
199  /* Write out port data */
200  AddressSpace = 1;
201  RawDescriptor->Flags = CM_RESOURCE_PORT_IO;
202  RawDescriptor->u.Port.Start.HighPart = 0;
203  RawDescriptor->u.Port.Start.LowPart = CurrentAddress->Element[Element].Start;
204  RawDescriptor->u.Port.Length = CurrentAddress->Element[Element].Length;
205 
206  /* Determine if 16-bit port addresses are allowed */
207  RawDescriptor->Flags |= HalpIs16BitPortDecodeSupported();
208  }
209  else
210  {
211  /* Write out memory data */
212  AddressSpace = 0;
213  RawDescriptor->Flags = (CurrentAddress->Flags & IDT_READ_ONLY) ?
216  RawDescriptor->u.Memory.Start.HighPart = 0;
217  RawDescriptor->u.Memory.Start.LowPart = CurrentAddress->Element[Element].Start;
218  RawDescriptor->u.Memory.Length = CurrentAddress->Element[Element].Length;
219  }
220 
221  /* Make an identical copy to begin with */
222  RtlCopyMemory(TranslatedDescriptor, RawDescriptor, sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR));
223 
224  /* Check what this is */
225  if (RawDescriptor->Type == CmResourceTypePort)
226  {
227  /* Translate the port */
229  0,
230  RawDescriptor->u.Port.Start,
231  &AddressSpace,
232  &TranslatedDescriptor->u.Port.Start);
233 
234  /* If it turns out this is memory once translated, flag it */
235  if (AddressSpace == 0) TranslatedDescriptor->Flags = CM_RESOURCE_PORT_MEMORY;
236 
237  }
238  else
239  {
240  /* Translate the memory */
242  0,
243  RawDescriptor->u.Memory.Start,
244  &AddressSpace,
245  &TranslatedDescriptor->u.Memory.Start);
246  }
247 }
248 
249 INIT_FUNCTION
250 VOID
251 NTAPI
253  IN INTERFACE_TYPE InterfaceType)
254 {
255  PCM_RESOURCE_LIST RawList, TranslatedList;
256  PCM_FULL_RESOURCE_DESCRIPTOR RawFull, TranslatedFull;
257  PCM_PARTIAL_RESOURCE_DESCRIPTOR CurrentRaw, CurrentTranslated, SortedRaw, SortedTranslated;
258  CM_PARTIAL_RESOURCE_DESCRIPTOR RawPartial, TranslatedPartial;
259  PCM_PARTIAL_RESOURCE_LIST RawPartialList = NULL, TranslatedPartialList = NULL;
261  ULONG i, j, k, ListSize, Count, Port, Element, CurrentScale, SortScale, ReportType, FlagMatch;
262  ADDRESS_USAGE *CurrentAddress;
263  LARGE_INTEGER CurrentSortValue, SortValue;
264  DbgPrint("%wZ Detected\n", HalName);
265 
266  /* Check if KD is using a COM port */
267  if (KdComPortInUse)
268  {
269  /* Enter it into the I/O space */
273 
274  /* Use the debug port table if we have one */
276 
277  /* Check if we're using ACPI */
278  if (!HalpGetInfoFromACPI)
279  {
280  /* No, so use our local table */
281  for (i = 0, Port = HalpComPortIrqMapping[i][0];
282  Port;
283  i++, Port = HalpComPortIrqMapping[i][0])
284  {
285  /* Is this the port we want? */
286  if (Port == (ULONG_PTR)KdComPortInUse)
287  {
288  /* Register it */
293  HIGH_LEVEL);
294  }
295  }
296  }
297  }
298 
299  /* On non-ACPI systems, we need to build an address map */
301 
302  /* Allocate the master raw and translated lists */
304  TranslatedList = ExAllocatePoolWithTag(NonPagedPool, PAGE_SIZE * 2, TAG_HAL);
305  if (!(RawList) || !(TranslatedList))
306  {
307  /* Bugcheck the system */
308  KeBugCheckEx(HAL_MEMORY_ALLOCATION,
309  4 * PAGE_SIZE,
310  1,
311  (ULONG_PTR)__FILE__,
312  __LINE__);
313  }
314 
315  /* Zero out the lists */
316  RtlZeroMemory(RawList, PAGE_SIZE * 2);
317  RtlZeroMemory(TranslatedList, PAGE_SIZE * 2);
318 
319  /* Set the interface type to begin with */
321 
322  /* Loop all IDT entries that are not IRQs */
323  for (i = 0; i < PRIMARY_VECTOR_BASE; i++)
324  {
325  /* Check if the IDT isn't owned */
327  {
328  /* Then register it for internal usage */
331  }
332  }
333 
334  /* Our full raw descriptors start here */
335  RawFull = RawList->List;
336 
337  /* Keep track of the current partial raw and translated descriptors */
338  CurrentRaw = (PCM_PARTIAL_RESOURCE_DESCRIPTOR)RawList->List;
339  CurrentTranslated = (PCM_PARTIAL_RESOURCE_DESCRIPTOR)TranslatedList->List;
340 
341  /* Do two passes */
342  for (ReportType = 0; ReportType < 2; ReportType++)
343  {
344  /* Pass 0 is for device usage */
345  if (ReportType == 0)
346  {
347  FlagMatch = IDT_DEVICE & ~IDT_REGISTERED;
348  Interface = InterfaceType;
349  }
350  else
351  {
352  /* Past 1 is for internal HAL usage */
353  FlagMatch = IDT_INTERNAL & ~IDT_REGISTERED;
355  }
356 
357  /* Reset loop variables */
358  i = Element = 0;
359 
360  /* Start looping our address uage list and interrupts */
361  CurrentAddress = HalpAddressUsageList;
362  while (TRUE)
363  {
364  /* Check for valid vector number */
365  if (i <= MAXIMUM_IDTVECTOR)
366  {
367  /* Check if this entry should be parsed */
368  if ((HalpIDTUsageFlags[i].Flags & FlagMatch))
369  {
370  /* Parse it */
371  HalpBuildPartialFromIdt(i, &RawPartial, &TranslatedPartial);
372  i++;
373  }
374  else
375  {
376  /* Skip this entry */
377  i++;
378  continue;
379  }
380  }
381  else
382  {
383  /* This is an address instead */
384  if (!CurrentAddress) break;
385 
386  /* Check if the address should be reported */
387  if (!(CurrentAddress->Flags & FlagMatch) ||
388  !(CurrentAddress->Element[Element].Length))
389  {
390  /* Nope, skip it */
391  Element = 0;
392  CurrentAddress = CurrentAddress->Next;
393  continue;
394  }
395 
396  /* Otherwise, parse the entry */
398  CurrentAddress,
399  Element,
400  &RawPartial,
401  &TranslatedPartial);
402  Element++;
403  }
404 
405  /* Check for interface change */
406  if (RawFull->InterfaceType != Interface)
407  {
408  /* We need to add another full descriptor */
409  RawList->Count++;
410  TranslatedList->Count++;
411 
412  /* The full descriptor follows wherever we were */
413  RawFull = (PCM_FULL_RESOURCE_DESCRIPTOR)CurrentRaw;
414  TranslatedFull = (PCM_FULL_RESOURCE_DESCRIPTOR)CurrentTranslated;
415 
416  /* And it is of this new interface type */
417  RawFull->InterfaceType = Interface;
418  TranslatedFull->InterfaceType = Interface;
419 
420  /* And its partial descriptors begin here */
421  RawPartialList = &RawFull->PartialResourceList;
422  TranslatedPartialList = &TranslatedFull->PartialResourceList;
423 
424  /* And our next full descriptor should follow here */
425  CurrentRaw = RawFull->PartialResourceList.PartialDescriptors;
426  CurrentTranslated = TranslatedFull->PartialResourceList.PartialDescriptors;
427  }
428 
429  /* We have written a new partial descriptor */
430  RawPartialList->Count++;
431  TranslatedPartialList->Count++;
432 
433  /* Copy our local descriptors into the actual list */
434  RtlCopyMemory(CurrentRaw, &RawPartial, sizeof(RawPartial));
435  RtlCopyMemory(CurrentTranslated, &TranslatedPartial, sizeof(TranslatedPartial));
436 
437  /* Move to the next partial descriptor */
438  CurrentRaw++;
439  CurrentTranslated++;
440  }
441  }
442 
443  /* Get the final list of the size for the kernel call later */
444  ListSize = (ULONG)((ULONG_PTR)CurrentRaw - (ULONG_PTR)RawList);
445 
446  /* Now reset back to the first full descriptor */
447  RawFull = RawList->List;
448  TranslatedFull = TranslatedList->List;
449 
450  /* And loop all the full descriptors */
451  for (i = 0; i < RawList->Count; i++)
452  {
453  /* Get the first partial descriptor in this list */
454  CurrentRaw = RawFull->PartialResourceList.PartialDescriptors;
455  CurrentTranslated = TranslatedFull->PartialResourceList.PartialDescriptors;
456 
457  /* Get the count of partials in this list */
458  Count = RawFull->PartialResourceList.Count;
459 
460  /* Loop all the partials in this list */
461  for (j = 0; j < Count; j++)
462  {
463  /* Get the sort value at this point */
464  HalpGetResourceSortValue(CurrentRaw, &CurrentScale, &CurrentSortValue);
465 
466  /* Save the current sort pointer */
467  SortedRaw = CurrentRaw;
468  SortedTranslated = CurrentTranslated;
469 
470  /* Loop all descriptors starting from this one */
471  for (k = j; k < Count; k++)
472  {
473  /* Get the sort value at the sort point */
474  HalpGetResourceSortValue(SortedRaw, &SortScale, &SortValue);
475 
476  /* Check if a swap needs to occur */
477  if ((SortScale < CurrentScale) ||
478  ((SortScale == CurrentScale) &&
479  (SortValue.QuadPart <= CurrentSortValue.QuadPart)))
480  {
481  /* Swap raw partial with the sort location partial */
482  RtlCopyMemory(&RawPartial, CurrentRaw, sizeof(RawPartial));
483  RtlCopyMemory(CurrentRaw, SortedRaw, sizeof(RawPartial));
484  RtlCopyMemory(SortedRaw, &RawPartial, sizeof(RawPartial));
485 
486  /* Swap translated partial in the same way */
487  RtlCopyMemory(&TranslatedPartial, CurrentTranslated, sizeof(TranslatedPartial));
488  RtlCopyMemory(CurrentTranslated, SortedTranslated, sizeof(TranslatedPartial));
489  RtlCopyMemory(SortedTranslated, &TranslatedPartial, sizeof(TranslatedPartial));
490 
491  /* Update the sort value at this point */
492  HalpGetResourceSortValue(CurrentRaw, &CurrentScale, &CurrentSortValue);
493  }
494 
495  /* The sort location has been updated */
496  SortedRaw++;
497  SortedTranslated++;
498  }
499 
500  /* Move to the next partial */
501  CurrentRaw++;
502  CurrentTranslated++;
503  }
504 
505  /* Move to the next full descriptor */
506  RawFull = (PCM_FULL_RESOURCE_DESCRIPTOR)CurrentRaw;
507  TranslatedFull = (PCM_FULL_RESOURCE_DESCRIPTOR)CurrentTranslated;
508  }
509 
510  /* Mark this is an ACPI system, if it is */
511  HalpMarkAcpiHal();
512 
513  /* Tell the kernel about all this */
515  RawList,
516  TranslatedList,
517  ListSize);
518 
519  /* Free our lists */
520  ExFreePool(RawList);
521  ExFreePool(TranslatedList);
522 
523  /* Get the machine's serial number */
525 }
526 #endif
527 
528 INIT_FUNCTION
529 VOID
530 NTAPI
532  IN ULONG BusVector,
533  IN ULONG SystemVector,
534  IN KIRQL Irql)
535 {
536  /* Save the vector flags */
537  HalpIDTUsageFlags[SystemVector].Flags = Flags;
538 
539  /* Save the vector data */
540  HalpIDTUsage[SystemVector].Irql = Irql;
541  HalpIDTUsage[SystemVector].BusReleativeVector = (UCHAR)BusVector;
542 }
543 
544 #ifndef _MINIHAL_
545 INIT_FUNCTION
546 VOID
547 NTAPI
549  IN ULONG BusVector,
550  IN ULONG SystemVector,
551  IN KIRQL Irql,
552  IN PVOID Handler,
554 {
555  /* Set the IDT_LATCHED flag for latched interrupts */
556  if (Mode == Latched) Flags |= IDT_LATCHED;
557 
558  /* Register the vector */
559  HalpRegisterVector(Flags, BusVector, SystemVector, Irql);
560 
561  /* Connect the interrupt */
562  KeRegisterInterruptHandler(SystemVector, Handler);
563 
564  /* Enable the interrupt */
565  HalEnableSystemInterrupt(SystemVector, Irql, Mode);
566 }
567 
568 INIT_FUNCTION
569 VOID
570 NTAPI
572 {
574  UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\CrashControl");
577  HANDLE Handle;
579  KEY_VALUE_PARTIAL_INFORMATION KeyValueInformation;
580 
581  /* Set default */
582  HalpNMIDumpFlag = 0;
583 
584  /* Initialize attributes */
586  &KeyName,
588  NULL,
589  NULL);
590 
591  /* Open crash key */
592  Status = ZwOpenKey(&Handle, KEY_READ, &ObjectAttributes);
593  if (NT_SUCCESS(Status))
594  {
595  /* Query key value */
596  RtlInitUnicodeString(&ValueName, L"NMICrashDump");
597  Status = ZwQueryValueKey(Handle,
598  &ValueName,
600  &KeyValueInformation,
601  sizeof(KeyValueInformation),
602  &ResultLength);
603  if (NT_SUCCESS(Status))
604  {
605  /* Check for valid data */
607  {
608  /* Read the flag */
609  HalpNMIDumpFlag = KeyValueInformation.Data[0];
610  }
611  }
612 
613  /* We're done */
614  ZwClose(Handle);
615  }
616 }
617 #endif
618 
619 /* EOF */
620 
IN CINT OUT PVOID IN ULONG OUT PULONG ResultLength
Definition: conport.c:47
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
LONG HalpActiveProcessors
Definition: processor.c:17
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING KeyName
Definition: ndis.h:4711
CPPORT Port[4]
Definition: headless.c:34
#define IN
Definition: typedefs.h:38
BOOLEAN NTAPI HalEnableSystemInterrupt(IN ULONG Vector, IN KIRQL Irql, IN KINTERRUPT_MODE InterruptMode)
Definition: pic.c:295
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR * PCM_PARTIAL_RESOURCE_DESCRIPTOR
#define TRUE
Definition: types.h:120
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
INIT_FUNCTION NTSTATUS NTAPI HalpMarkAcpiHal(VOID)
Definition: misc.c:64
enum _INTERFACE_TYPE INTERFACE_TYPE
INIT_FUNCTION 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:184
PADDRESS_USAGE HalpAddressUsageList
Definition: usage.c:59
struct _Entry Entry
Definition: kefuncs.h:640
_In_ ULONG Mode
Definition: hubbusif.h:303
#define DbgPrint
Definition: loader.c:25
INIT_FUNCTION VOID NTAPI HalpBuildAddressMap(VOID)
Definition: halacpi.c:944
struct _HalAddressUsage::@1490 Element[]
CM_FULL_RESOURCE_DESCRIPTOR List[1]
Definition: hwresource.cpp:165
#define KEY_READ
Definition: nt_native.h:1023
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG AddressSpace
Definition: iofuncs.h:2268
IDTUsage HalpIDTUsage[256]
Definition: usage.c:20
unsigned char * PUCHAR
Definition: retypes.h:3
VOID NTAPI HalpRegisterVector(IN UCHAR Flags, IN ULONG BusVector, IN ULONG SystemVector, IN KIRQL Irql)
Definition: usage.c:34
INIT_FUNCTION VOID NTAPI HalpBuildPartialFromIdt(IN ULONG Entry, IN PCM_PARTIAL_RESOURCE_DESCRIPTOR RawDescriptor, IN PCM_PARTIAL_RESOURCE_DESCRIPTOR TranslatedDescriptor)
Definition: usage.c:146
LONG NTSTATUS
Definition: precomp.h:26
#define PRIMARY_VECTOR_BASE
Definition: halp.h:16
INIT_FUNCTION BOOLEAN NTAPI HalpGetDebugPortTable(VOID)
Definition: halacpi.c:952
IDTUsageFlags HalpIDTUsageFlags[256]
Definition: usage.c:19
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
_Out_ PKIRQL Irql
Definition: csq.h:179
#define CM_RESOURCE_MEMORY_READ_WRITE
Definition: cmtypes.h:120
#define CmResourceTypePort
Definition: hwresource.cpp:123
UCHAR BusReleativeVector
Definition: halp.h:32
uint32_t ULONG_PTR
Definition: typedefs.h:63
UCHAR KIRQL
Definition: env_spec_w32.h:591
CM_PARTIAL_RESOURCE_LIST PartialResourceList
Definition: hwresource.cpp:160
_In_ PUNICODE_STRING ValueName
Definition: cmfuncs.h:264
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
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
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
BOOLEAN HalpGetInfoFromACPI
Definition: usage.c:56
INIT_FUNCTION ULONG NTAPI HalpIs16BitPortDecodeSupported(VOID)
Definition: halacpi.c:961
struct _LARGE_INTEGER::@2201 u
PWCHAR HalName
Definition: halacpi.c:45
struct _CM_FULL_RESOURCE_DESCRIPTOR * PCM_FULL_RESOURCE_DESCRIPTOR
#define CM_RESOURCE_MEMORY_READ_ONLY
Definition: cmtypes.h:121
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
enum _KINTERRUPT_MODE KINTERRUPT_MODE
UCHAR Flags
Definition: halp.h:26
BOOLEAN HalpNMIDumpFlag
Definition: usage.c:57
#define MAXIMUM_IDTVECTOR
Definition: asm.h:277
ADDRESS_USAGE HalpComIoSpace
Definition: usage.c:72
#define PtrToUlong(u)
Definition: config.h:107
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
_In_ HANDLE Handle
Definition: extypes.h:390
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:359
NTSYSAPI ULONGLONG WINAPI RtlConvertUlongToLargeInteger(ULONG)
Definition: largeint.c:47
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
PUCHAR KdComPortInUse
Definition: usage.c:17
#define IDT_REGISTERED
Definition: halp.h:19
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
INIT_FUNCTION VOID NTAPI HalpGetResourceSortValue(IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor, OUT PULONG Scale, OUT PLARGE_INTEGER Value)
Definition: usage.c:106
KIRQL Irql
Definition: halp.h:31
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
unsigned char UCHAR
Definition: xmlstorage.h:181
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1]
Definition: hwresource.cpp:119
#define IDT_INTERNAL
Definition: halp.h:21
static const WCHAR L[]
Definition: oid.c:1250
#define TAG_HAL
Definition: hal.h:55
#define PAGE_SIZE
Definition: env_spec_w32.h:49
UCHAR Flags
Definition: halp.h:540
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical 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:662
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
Status
Definition: gdiplustypes.h:24
#define CM_RESOURCE_PORT_MEMORY
Definition: cmtypes.h:108
FORCEINLINE VOID KeRegisterInterruptHandler(IN ULONG Vector, IN PVOID Handler)
Definition: ke.h:242
NTSTATUS NTAPI IoReportHalResourceUsage(PUNICODE_STRING HalDescription, PCM_RESOURCE_LIST RawList, PCM_RESOURCE_LIST TranslatedList, ULONG ListSize)
Definition: iorsrce.c:1070
#define HIGH_LEVEL
Definition: env_spec_w32.h:703
USHORT HalpComPortIrqMapping[5][2]
Definition: usage.c:63
#define CM_RESOURCE_PORT_IO
Definition: cmtypes.h:109
unsigned short USHORT
Definition: pedump.c:61
ADDRESS_USAGE HalpDefaultIoSpace
Definition: usage.c:81
INIT_FUNCTION VOID NTAPI HalpGetNMICrashFlag(VOID)
Definition: usage.c:571
unsigned int * PULONG
Definition: retypes.h:1
#define CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE
Definition: cmtypes.h:143
#define CmResourceTypeInterrupt
Definition: hwresource.cpp:124
#define IDT_LATCHED
Definition: halp.h:20
Definition: halp.h:29
#define OUT
Definition: typedefs.h:39
#define CM_RESOURCE_INTERRUPT_LATCHED
Definition: cmtypes.h:144
unsigned int ULONG
Definition: retypes.h:1
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
#define ULONG_PTR
Definition: config.h:101
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
#define IDT_READ_ONLY
Definition: halp.h:64
#define IDT_DEVICE
Definition: halp.h:22
struct _HalAddressUsage * Next
Definition: halp.h:538
#define CmResourceTypeMemory
Definition: hwresource.cpp:125
int k
Definition: mpi.c:3369
VOID NTAPI HalpReportResourceUsage(IN PUNICODE_STRING HalName, IN INTERFACE_TYPE InterfaceType)
Definition: usage.c:26
INIT_FUNCTION VOID NTAPI HalpReportSerialNumber(VOID)
Definition: misc.c:33
base of all file and directory entries
Definition: entries.h:82
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:107
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
LONGLONG QuadPart
Definition: typedefs.h:112
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14
_In_ PSTORAGE_PROPERTY_ID _Outptr_ PSTORAGE_DESCRIPTOR_HEADER * Descriptor
Definition: classpnp.h:966