ReactOS  0.4.14-dev-49-gfb4591c
hardware.c
Go to the documentation of this file.
1 /*
2  * FreeLoader
3  *
4  * Copyright (C) 2003, 2004 Eric Kohl
5  * Copyright (C) 2009 Hervé Poussineau
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21 
22 #include <freeldr.h>
23 
24 #include <debug.h>
25 DBG_DEFAULT_CHANNEL(HWDETECT);
26 
27 #define MILLISEC (10)
28 #define PRECISION (8)
29 
30 #define HZ (100)
31 #define CLOCK_TICK_RATE (1193182)
32 #define LATCH (CLOCK_TICK_RATE / HZ)
33 
34 static unsigned int delay_count = 1;
35 
36 /* Used for BIOS disks pre-enumeration performed when detecting the boot devices in InitializeBootDevices() */
37 extern UCHAR PcBiosDiskCount;
38 
39 /* This function is slightly different in its PC and XBOX versions */
41 
42 PCHAR
43 GetHarddiskIdentifier(UCHAR DriveNumber);
44 
45 /* FUNCTIONS *****************************************************************/
46 
47 static
48 VOID
50 {
51  register volatile unsigned int i;
52  for (i = 0; i < Loops; i++);
53 }
54 
56 {
57  ULONGLONG LoopCount = ((ULONGLONG)delay_count * (ULONGLONG)Microseconds) / 1000ULL;
58  __StallExecutionProcessor((ULONG)LoopCount);
59 }
60 
61 static
62 ULONG
64 {
65  ULONG Count;
66 
67  WRITE_PORT_UCHAR((PUCHAR)0x43, 0x00);
68  Count = READ_PORT_UCHAR((PUCHAR)0x40);
69  Count |= READ_PORT_UCHAR((PUCHAR)0x40) << 8;
70 
71  return Count;
72 }
73 
74 static
75 VOID
77 {
78  ULONG CurCount;
79  ULONG PrevCount = ~0;
80  LONG Delta;
81 
82  CurCount = Read8254Timer();
83 
84  do
85  {
86  PrevCount = CurCount;
87  CurCount = Read8254Timer();
88  Delta = CurCount - PrevCount;
89 
90  /*
91  * This limit for delta seems arbitrary, but it isn't, it's
92  * slightly above the level of error a buggy Mercury/Neptune
93  * chipset timer can cause.
94  */
95  }
96  while (Delta < 300);
97 }
98 
99 VOID
101 {
102  ULONG i;
103  ULONG calib_bit;
104  ULONG CurCount;
105 
106  /* Initialise timer interrupt with MILLISECOND ms interval */
107  WRITE_PORT_UCHAR((PUCHAR)0x43, 0x34); /* binary, mode 2, LSB/MSB, ch 0 */
108  WRITE_PORT_UCHAR((PUCHAR)0x40, LATCH & 0xff); /* LSB */
109  WRITE_PORT_UCHAR((PUCHAR)0x40, LATCH >> 8); /* MSB */
110 
111  /* Stage 1: Coarse calibration */
112 
113  delay_count = 1;
114 
115  do
116  {
117  /* Next delay count to try */
118  delay_count <<= 1;
119 
121 
122  /* Do the delay */
124 
125  CurCount = Read8254Timer();
126  }
127  while (CurCount > LATCH / 2);
128 
129  /* Get bottom value for delay */
130  delay_count >>= 1;
131 
132  /* Stage 2: Fine calibration */
133 
134  /* Which bit are we going to test */
135  calib_bit = delay_count;
136 
137  for (i = 0; i < PRECISION; i++)
138  {
139  /* Next bit to calibrate */
140  calib_bit >>= 1;
141 
142  /* If we have done all bits, stop */
143  if (!calib_bit) break;
144 
145  /* Set the bit in delay_count */
146  delay_count |= calib_bit;
147 
149 
150  /* Do the delay */
152 
153  CurCount = Read8254Timer();
154  /* If a tick has passed, turn the calibrated bit back off */
155  if (CurCount <= LATCH / 2)
156  delay_count &= ~calib_bit;
157  }
158 
159  /* We're finished: Do the finishing touches */
160 
161  /* Calculate delay_count for 1ms */
162  delay_count /= (MILLISEC / 2);
163 }
164 
165 
166 static
167 UCHAR
168 GetFloppyType(UCHAR DriveNumber)
169 {
170  UCHAR Data;
171 
172  WRITE_PORT_UCHAR((PUCHAR)0x70, 0x10);
173  Data = READ_PORT_UCHAR((PUCHAR)0x71);
174 
175  if (DriveNumber == 0)
176  return Data >> 4;
177  else if (DriveNumber == 1)
178  return Data & 0x0F;
179 
180  return 0;
181 }
182 
183 static
184 PVOID
186 {
187  PUSHORT SegPtr = (PUSHORT)0x7A;
188  PUSHORT OfsPtr = (PUSHORT)0x78;
189 
190  return (PVOID)((ULONG_PTR)(((ULONG)(*SegPtr)) << 4) + (ULONG)(*OfsPtr));
191 }
192 
193 static
194 VOID
196 {
197  PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
198  PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor;
199  PCM_FLOPPY_DEVICE_DATA FloppyData;
200  CHAR Identifier[20];
201  PCONFIGURATION_COMPONENT_DATA PeripheralKey;
202  ULONG Size;
203  UCHAR FloppyNumber;
204  UCHAR FloppyType;
205  ULONG MaxDensity[6] = {0, 360, 1200, 720, 1440, 2880};
206  PUCHAR Ptr;
207 
208  for (FloppyNumber = 0; FloppyNumber < 2; FloppyNumber++)
209  {
210  FloppyType = GetFloppyType(FloppyNumber);
211 
212  if ((FloppyType > 5) || (FloppyType == 0))
213  continue;
214 
215  if (!DiskResetController(FloppyNumber))
216  continue;
217 
218  Ptr = GetInt1eTable();
219 
220  /* Set 'Identifier' value */
221  sprintf(Identifier, "FLOPPY%d", FloppyNumber + 1);
222 
223  Size = sizeof(CM_PARTIAL_RESOURCE_LIST) +
224  sizeof(CM_FLOPPY_DEVICE_DATA);
225  PartialResourceList = FrLdrHeapAlloc(Size, TAG_HW_RESOURCE_LIST);
226  if (PartialResourceList == NULL)
227  {
228  ERR("Failed to allocate resource descriptor\n");
229  return;
230  }
231 
232  memset(PartialResourceList, 0, Size);
233  PartialResourceList->Version = 1;
234  PartialResourceList->Revision = 1;
235  PartialResourceList->Count = 1;
236 
237  PartialDescriptor = &PartialResourceList->PartialDescriptors[0];
238  PartialDescriptor->Type = CmResourceTypeDeviceSpecific;
239  PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
240  PartialDescriptor->u.DeviceSpecificData.DataSize = sizeof(CM_FLOPPY_DEVICE_DATA);
241 
242  FloppyData = (PVOID)(((ULONG_PTR)PartialResourceList) + sizeof(CM_PARTIAL_RESOURCE_LIST));
243  FloppyData->Version = 2;
244  FloppyData->Revision = 0;
245  FloppyData->MaxDensity = MaxDensity[FloppyType];
246  FloppyData->MountDensity = 0;
247  RtlCopyMemory(&FloppyData->StepRateHeadUnloadTime, Ptr, 11);
248  FloppyData->MaximumTrackValue = (FloppyType == 1) ? 39 : 79;
249  FloppyData->DataTransferRate = 0;
250 
251  FldrCreateComponentKey(ControllerKey,
253  FloppyDiskPeripheral,
254  Input | Output,
255  FloppyNumber,
256  0xFFFFFFFF,
257  Identifier,
258  PartialResourceList,
259  Size,
260  &PeripheralKey);
261  }
262 }
263 
264 static
267 {
268  PCONFIGURATION_COMPONENT_DATA ControllerKey;
269  PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
270  PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor;
271  ULONG Size;
272  ULONG FloppyCount;
273 
274  FloppyCount = MachGetFloppyCount();
275  TRACE("Floppy count: %u\n", FloppyCount);
276 
277  /* Always create a BIOS disk controller, no matter if we have floppy drives or not */
278  Size = sizeof(CM_PARTIAL_RESOURCE_LIST) +
279  2 * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR);
280  PartialResourceList = FrLdrHeapAlloc(Size, TAG_HW_RESOURCE_LIST);
281  if (PartialResourceList == NULL)
282  {
283  ERR("Failed to allocate resource descriptor\n");
284  return NULL;
285  }
286  memset(PartialResourceList, 0, Size);
287 
288  /* Initialize resource descriptor */
289  PartialResourceList->Version = 1;
290  PartialResourceList->Revision = 1;
291  PartialResourceList->Count = 3;
292 
293  /* Set IO Port */
294  PartialDescriptor = &PartialResourceList->PartialDescriptors[0];
295  PartialDescriptor->Type = CmResourceTypePort;
297  PartialDescriptor->Flags = CM_RESOURCE_PORT_IO;
298  PartialDescriptor->u.Port.Start.LowPart = 0x03F0;
299  PartialDescriptor->u.Port.Start.HighPart = 0x0;
300  PartialDescriptor->u.Port.Length = 8;
301 
302  /* Set Interrupt */
303  PartialDescriptor = &PartialResourceList->PartialDescriptors[1];
304  PartialDescriptor->Type = CmResourceTypeInterrupt;
305  PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
306  PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED;
307  PartialDescriptor->u.Interrupt.Level = 6;
308  PartialDescriptor->u.Interrupt.Vector = 6;
309  PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF;
310 
311  /* Set DMA channel */
312  PartialDescriptor = &PartialResourceList->PartialDescriptors[2];
313  PartialDescriptor->Type = CmResourceTypeDma;
314  PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
315  PartialDescriptor->Flags = 0;
316  PartialDescriptor->u.Dma.Channel = 2;
317  PartialDescriptor->u.Dma.Port = 0;
318 
319  /* Create floppy disk controller */
320  FldrCreateComponentKey(BusKey,
323  Output | Input,
324  0x0,
325  0xFFFFFFFF,
326  NULL,
327  PartialResourceList,
328  Size,
329  &ControllerKey);
330  TRACE("Created key: DiskController\\0\n");
331 
332  if (FloppyCount)
333  DetectBiosFloppyPeripheral(ControllerKey);
334 
335  return ControllerKey;
336 }
337 
338 VOID
341 {
342  PCONFIGURATION_COMPONENT_DATA ControllerKey, DiskKey;
343  PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
344  PCM_INT13_DRIVE_PARAMETER Int13Drives;
345  GEOMETRY Geometry;
346  UCHAR DiskCount, DriveNumber;
347  USHORT i;
348  ULONG Size;
349 
350  /* The pre-enumeration of the BIOS disks was already done in InitializeBootDevices() */
351  DiskCount = PcBiosDiskCount;
352 
353  /* Use the floppy disk controller as our controller */
354  ControllerKey = DetectBiosFloppyController(BusKey);
355  if (!ControllerKey)
356  {
357  ERR("Failed to detect BIOS disk controller\n");
358  return;
359  }
360 
361  /* Allocate resource descriptor */
362  Size = sizeof(CM_PARTIAL_RESOURCE_LIST) +
363  sizeof(CM_INT13_DRIVE_PARAMETER) * DiskCount;
364  PartialResourceList = FrLdrHeapAlloc(Size, TAG_HW_RESOURCE_LIST);
365  if (PartialResourceList == NULL)
366  {
367  ERR("Failed to allocate resource descriptor\n");
368  return;
369  }
370 
371  /* Initialize resource descriptor */
372  memset(PartialResourceList, 0, Size);
373  PartialResourceList->Version = 1;
374  PartialResourceList->Revision = 1;
375  PartialResourceList->Count = 1;
376  PartialResourceList->PartialDescriptors[0].Type = CmResourceTypeDeviceSpecific;
377  PartialResourceList->PartialDescriptors[0].ShareDisposition = 0;
378  PartialResourceList->PartialDescriptors[0].Flags = 0;
379  PartialResourceList->PartialDescriptors[0].u.DeviceSpecificData.DataSize =
380  sizeof(CM_INT13_DRIVE_PARAMETER) * DiskCount;
381 
382  /* Get harddisk Int13 geometry data */
383  Int13Drives = (PVOID)(((ULONG_PTR)PartialResourceList) + sizeof(CM_PARTIAL_RESOURCE_LIST));
384  for (i = 0; i < DiskCount; i++)
385  {
386  DriveNumber = 0x80 + i;
387 
388  if (MachDiskGetDriveGeometry(DriveNumber, &Geometry))
389  {
390  Int13Drives[i].DriveSelect = DriveNumber;
391  Int13Drives[i].MaxCylinders = Geometry.Cylinders - 1;
392  Int13Drives[i].SectorsPerTrack = (USHORT)Geometry.Sectors;
393  Int13Drives[i].MaxHeads = (USHORT)Geometry.Heads - 1;
394  Int13Drives[i].NumberDrives = DiskCount;
395 
396  TRACE("Disk %x: %u Cylinders %u Heads %u Sectors %u Bytes\n",
397  DriveNumber,
398  Geometry.Cylinders - 1,
399  Geometry.Heads - 1,
400  Geometry.Sectors,
401  Geometry.BytesPerSector);
402  }
403  }
404 
405  /* Update the 'System' key's configuration data with BIOS INT13h information */
406  FldrSetConfigurationData(SystemKey, PartialResourceList, Size);
407 
408  /* Create and fill subkey for each harddisk */
409  for (i = 0; i < DiskCount; i++)
410  {
411  PCHAR Identifier;
412 
413  DriveNumber = 0x80 + i;
414 
415  /* Get disk values */
416  PartialResourceList = GetHarddiskConfigurationData(DriveNumber, &Size);
417  Identifier = GetHarddiskIdentifier(DriveNumber);
418 
419  /* Create disk key */
420  FldrCreateComponentKey(ControllerKey,
422  DiskPeripheral,
423  Output | Input,
424  0x0,
425  0xFFFFFFFF,
426  Identifier,
427  PartialResourceList,
428  Size,
429  &DiskKey);
430  }
431 }
432 
433 VOID
435 {
436  INT CpuInformation[4] = {-1};
437  ULONG NumberOfIds;
438 
439  /* Check if the processor first supports ID 1 */
440  __cpuid(CpuInformation, 0);
441 
442  NumberOfIds = CpuInformation[0];
443 
444  if (NumberOfIds == 0)
445  {
447  __FILE__,
448  __LINE__,
449  "ReactOS requires the CPUID instruction to return "
450  "more than one supported ID.\n\n");
451  }
452 
453  /* NumberOfIds will be greater than 1 if the processor is new enough */
454  if (NumberOfIds == 1)
455  {
456  INT ProcessorFamily;
457 
458  /* Get information */
459  __cpuid(CpuInformation, 1);
460 
461  ProcessorFamily = (CpuInformation[0] >> 8) & 0xF;
462 
463  /* If it's Family 4 or lower, bugcheck */
464  if (ProcessorFamily < 5)
465  {
467  __FILE__,
468  __LINE__,
469  "Processor is too old (family %u < 5)\n"
470  "ReactOS requires a Pentium-level processor or newer.",
471  ProcessorFamily);
472  }
473  }
474 }
475 
476 /* EOF */
struct _CM_PARTIAL_RESOURCE_LIST CM_PARTIAL_RESOURCE_LIST
signed char * PCHAR
Definition: retypes.h:7
BOOLEAN DiskResetController(UCHAR DriveNumber)
Definition: pcdisk.c:140
#define CmResourceTypeDeviceSpecific
Definition: hwresource.cpp:127
struct _CM_INT13_DRIVE_PARAMETER CM_INT13_DRIVE_PARAMETER
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
static VOID __StallExecutionProcessor(ULONG Loops)
Definition: hardware.c:49
GLint x0
Definition: linetemp.h:95
VOID FrLdrCheckCpuCompatibility(VOID)
Definition: hardware.c:434
DBG_DEFAULT_CHANNEL(HWDETECT)
ULONG Cylinders
Definition: disk.h:26
unsigned char * PUCHAR
Definition: retypes.h:3
char CHAR
Definition: xmlstorage.h:175
UCHAR NTAPI READ_PORT_UCHAR(PUCHAR Address)
Definition: mach.c:528
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
VOID HalpCalibrateStallExecution(VOID)
Definition: hardware.c:100
Definition: arc.h:84
#define MachGetFloppyCount()
Definition: machine.h:124
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@371::@374 Interrupt
UCHAR PcBiosDiskCount
Definition: hwdisk.c:43
int32_t INT
Definition: typedefs.h:56
#define CmResourceTypePort
Definition: hwresource.cpp:123
uint32_t ULONG_PTR
Definition: typedefs.h:63
#define sprintf(buf, format,...)
Definition: sprintf.c:55
static VOID WaitFor8254Wraparound(VOID)
Definition: hardware.c:76
GET_HARDDISK_CONFIG_DATA GetHarddiskConfigurationData
Definition: hardware.c:40
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
long LONG
Definition: pedump.c:60
VOID StallExecutionProcessor(ULONG Microseconds)
Definition: hardware.c:55
smooth NULL
Definition: ftsmooth.c:416
union _CM_PARTIAL_RESOURCE_DESCRIPTOR::@371 u
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@371::@373 Port
static PVOID GetInt1eTable(VOID)
Definition: hardware.c:185
_In_ LPGUID _In_ PVOID Data
Definition: classpnp.h:778
static VOID DetectBiosFloppyPeripheral(PCONFIGURATION_COMPONENT_DATA ControllerKey)
Definition: hardware.c:195
#define PRECISION
Definition: hardware.c:28
void * PVOID
Definition: retypes.h:9
PCM_PARTIAL_RESOURCE_LIST(* GET_HARDDISK_CONFIG_DATA)(UCHAR DriveNumber, ULONG *pSize)
Definition: hardware.h:37
#define MachDiskGetDriveGeometry(Drive, Geom)
Definition: machine.h:128
#define ULL(a, b)
Definition: format_msg.c:27
ULONG Sectors
Definition: disk.h:28
#define TRACE(s)
Definition: solgame.cpp:4
FORCEINLINE PVOID FrLdrHeapAlloc(SIZE_T MemorySize, ULONG Tag)
Definition: mm.h:163
#define MILLISEC
Definition: hardware.c:27
VOID DetectBiosDisks(PCONFIGURATION_COMPONENT_DATA SystemKey, PCONFIGURATION_COMPONENT_DATA BusKey)
Definition: hardware.c:339
uint64_t ULONGLONG
Definition: typedefs.h:65
static UCHAR GetFloppyType(UCHAR DriveNumber)
Definition: hardware.c:168
static unsigned int delay_count
Definition: hardware.c:34
PCHAR GetHarddiskIdentifier(UCHAR DriveNumber)
Definition: hwdisk.c:249
static PCONFIGURATION_COMPONENT_DATA DetectBiosFloppyController(PCONFIGURATION_COMPONENT_DATA BusKey)
Definition: hardware.c:266
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@371::@380 DeviceSpecificData
unsigned char UCHAR
Definition: xmlstorage.h:181
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1]
Definition: hwresource.cpp:119
Definition: arc.h:85
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
VOID NTAPI FldrCreateComponentKey(IN PCONFIGURATION_COMPONENT_DATA SystemNode, IN CONFIGURATION_CLASS Class, IN CONFIGURATION_TYPE Type, IN IDENTIFIER_FLAG Flags, IN ULONG Key, IN ULONG Affinity, IN PCHAR IdentifierString, IN PCM_PARTIAL_RESOURCE_LIST ResourceList, IN ULONG Size, OUT PCONFIGURATION_COMPONENT_DATA *ComponentKey)
Definition: archwsup.c:147
#define ERR(fmt,...)
Definition: debug.h:109
ULONG BytesPerSector
Definition: disk.h:29
UCHAR StepRateHeadUnloadTime
Definition: cmtypes.h:487
PPC_QUAL void __cpuid(int CPUInfo[], const int InfoType)
Definition: intrin_ppc.h:682
struct _CM_FLOPPY_DEVICE_DATA CM_FLOPPY_DEVICE_DATA
VOID FrLdrBugCheckWithMessage(ULONG BugCode, PCHAR File, ULONG Line, PSTR Format,...)
Definition: entry.c:23
#define CM_RESOURCE_PORT_IO
Definition: cmtypes.h:109
unsigned short USHORT
Definition: pedump.c:61
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@371::@377 Dma
static ULONG Delta
Definition: xboxvideo.c:32
Definition: disk.h:24
static ULONG Read8254Timer(VOID)
Definition: hardware.c:63
#define CmResourceTypeInterrupt
Definition: hwresource.cpp:124
#define LATCH
Definition: hardware.c:32
#define CM_RESOURCE_INTERRUPT_LATCHED
Definition: cmtypes.h:144
unsigned int ULONG
Definition: retypes.h:1
void WRITE_PORT_UCHAR(PUCHAR Address, UCHAR Value)
Definition: mach.c:532
#define ULONG_PTR
Definition: config.h:101
#define memset(x, y, z)
Definition: compat.h:39
VOID NTAPI FldrSetConfigurationData(IN PCONFIGURATION_COMPONENT_DATA ComponentData, IN PCM_PARTIAL_RESOURCE_LIST ResourceList, IN ULONG Size)
Definition: archwsup.c:78
unsigned short * PUSHORT
Definition: retypes.h:2
#define TAG_HW_RESOURCE_LIST
Definition: hardware.h:26
#define CmResourceTypeDma
Definition: hwresource.cpp:126
ULONG Heads
Definition: disk.h:27