Merge FldrCreateComponentKey and FldrSetIdentifier
[reactos.git] / reactos / boot / freeldr / freeldr / include / arch / amd64 / 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
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21 #ifndef __AMD64_HARDWARE_H_
22 #define __AMD64_HARDWARE_H_
23
24 #ifndef __REGISTRY_H
25 #include "../../reactos/registry.h"
26 #endif
27
28 #define CONFIG_CMD(bus, dev_fn, where) \
29 (0x80000000 | (((ULONG)(bus)) << 16) | (((dev_fn) & 0x1F) << 11) | (((dev_fn) & 0xE0) << 3) | ((where) & ~3))
30
31
32 //
33 // Static heap for ARC Hardware Component Tree
34 // 16KB oughta be enough for anyone.
35 //
36 #define HW_MAX_ARC_HEAP_SIZE 16 * 1024
37
38 //
39 // ARC Component Configuration Routines
40 //
41 VOID
42 NTAPI
43 FldrCreateSystemKey(
44 OUT PCONFIGURATION_COMPONENT_DATA *SystemKey
45 );
46
47 VOID
48 NTAPI
49 FldrCreateComponentKey(
50 IN PCONFIGURATION_COMPONENT_DATA SystemKey,
51 IN CONFIGURATION_CLASS Class,
52 IN CONFIGURATION_TYPE Type,
53 IN IDENTIFIER_FLAG Flags,
54 IN ULONG Key,
55 IN ULONG Affinity,
56 IN PCHAR IdentifierString,
57 OUT PCONFIGURATION_COMPONENT_DATA *ComponentKey
58 );
59
60 VOID
61 NTAPI
62 FldrSetConfigurationData(
63 IN PCONFIGURATION_COMPONENT_DATA ComponentKey,
64 IN PCM_PARTIAL_RESOURCE_LIST ResourceList,
65 IN ULONG Size
66 );
67
68
69 /* PROTOTYPES ***************************************************************/
70
71 /* hardware.c */
72
73 VOID StallExecutionProcessor(ULONG Microseconds);
74
75 VOID HalpCalibrateStallExecution(VOID);
76
77 /* hwacpi.c */
78 VOID DetectAcpiBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber);
79
80 /* hwapm.c */
81 VOID DetectApmBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber);
82
83 /* hwpci.c */
84 VOID DetectPciBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber);
85
86 /* i386cpu.S */
87 ULONG CpuidSupported(VOID);
88 VOID GetCpuid(ULONG Level,
89 ULONG *eax,
90 ULONG *ebx,
91 ULONG *ecx,
92 ULONG *edx);
93 ULONGLONG RDTSC(VOID);
94
95 /* i386pnp.S */
96 ULONG_PTR PnpBiosSupported(VOID);
97 ULONG PnpBiosGetDeviceNodeCount(ULONG *NodeSize,
98 ULONG *NodeCount);
99 ULONG PnpBiosGetDeviceNode(UCHAR *NodeId,
100 UCHAR *NodeBuffer);
101
102 #endif /* __AMD64_HARDWARE_H_ */
103
104 /* EOF */