4 * Copyright (C) 2003 Eric Kohl
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #ifndef __I386_HARDWARE_H_
22 #define __I386_HARDWARE_H_
25 #include "../../reactos/registry.h"
28 /* CM_PARTIAL_RESOURCE_DESCRIPTOR.Flags */
29 #define CM_RESOURCE_PORT_MEMORY 0x0000
30 #define CM_RESOURCE_PORT_IO 0x0001
32 #define CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE 0x0000
33 #define CM_RESOURCE_INTERRUPT_LATCHED 0x0001
35 typedef struct _CM_COMPONENT_INFORMATION
41 } __attribute__((packed
)) CM_COMPONENT_INFORMATION
, *PCM_COMPONENT_INFORMATION
;
44 /* CM_COMPONENT_INFORMATION.Flags */
45 #define Failed 0x00000001
46 #define ReadOnly 0x00000002
47 #define Removable 0x00000004
48 #define ConsoleIn 0x00000008
49 #define ConsoleOut 0x00000010
50 #define Input 0x00000020
51 #define Output 0x00000040
53 #define CONFIG_CMD(bus, dev_fn, where) \
54 (0x80000000 | (((ULONG)(bus)) << 16) | (((dev_fn) & 0x1F) << 11) | (((dev_fn) & 0xE0) << 3) | ((where) & ~3))
56 /* PROTOTYPES ***************************************************************/
60 VOID
StallExecutionProcessor(ULONG Microseconds
);
62 VOID
HalpCalibrateStallExecution(VOID
);
64 VOID
SetComponentInformation(FRLDRHKEY ComponentKey
,
70 VOID
DetectAcpiBios(FRLDRHKEY SystemKey
, ULONG
*BusNumber
);
73 VOID
DetectApmBios(FRLDRHKEY SystemKey
, ULONG
*BusNumber
);
76 VOID
DetectCPUs(FRLDRHKEY SystemKey
);
79 VOID
DetectPciBios(FRLDRHKEY SystemKey
, ULONG
*BusNumber
);
82 ULONG
CpuidSupported(VOID
);
83 VOID
GetCpuid(ULONG Level
,
88 ULONGLONG
RDTSC(VOID
);
91 ULONG
PnpBiosSupported(VOID
);
92 ULONG
PnpBiosGetDeviceNodeCount(ULONG
*NodeSize
,
94 ULONG
PnpBiosGetDeviceNode(UCHAR
*NodeId
,
97 #endif /* __I386_HARDWARE_H_ */