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