76a9bb5fedaf8e5f2afb4169ba6647efcdf42a5b
[reactos.git] / boot / freeldr / freeldr / include / arch / pc / hardware.h
1 /*
2 * FreeLoader
3 *
4 * Copyright (C) 2003 Eric Kohl
5 *
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.
10 *
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.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21 #pragma once
22
23 #define CONFIG_CMD(bus, dev_fn, where) \
24 (0x80000000 | (((ULONG)(bus)) << 16) | (((dev_fn) & 0x1F) << 11) | (((dev_fn) & 0xE0) << 3) | ((where) & ~3))
25
26 #define TAG_HW_RESOURCE_LIST 'lRwH'
27 #define TAG_HW_DISK_CONTEXT 'cDwH'
28
29 /* PROTOTYPES ***************************************************************/
30
31 /* hardware.c */
32 VOID StallExecutionProcessor(ULONG Microseconds);
33 VOID HalpCalibrateStallExecution(VOID);
34
35 typedef
36 PCM_PARTIAL_RESOURCE_LIST
37 (*GET_HARDDISK_CONFIG_DATA)(UCHAR DriveNumber, ULONG* pSize);
38
39 extern GET_HARDDISK_CONFIG_DATA GetHarddiskConfigurationData;
40
41 VOID
42 DetectBiosDisks(PCONFIGURATION_COMPONENT_DATA SystemKey,
43 PCONFIGURATION_COMPONENT_DATA BusKey);
44
45 /* hwacpi.c */
46 VOID DetectAcpiBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber);
47
48 /* hwapm.c */
49 VOID DetectApmBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber);
50
51 /* hwpci.c */
52 VOID DetectPciBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber);
53
54 /* i386pnp.S */
55 ULONG_PTR __cdecl PnpBiosSupported(VOID);
56 ULONG __cdecl PnpBiosGetDeviceNodeCount(ULONG *NodeSize,
57 ULONG *NodeCount);
58 ULONG __cdecl PnpBiosGetDeviceNode(UCHAR *NodeId,
59 UCHAR *NodeBuffer);
60
61 /* i386pxe.S */
62 USHORT __cdecl PxeCallApi(USHORT Segment, USHORT Offset, USHORT Service, VOID* Parameter);
63
64 /* EOF */