943f2254809851d003eef1ac8665e706514e287d
[reactos.git] / reactos / boot / freeldr / freeldr / include / arch / powerpc / 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 __POWERPC_HARDWARE_H_
22 #define __POWERPC_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 // Static heap for ARC Hardware Component Tree
33 // 16KB oughta be enough for anyone.
34 //
35 #define HW_MAX_ARC_HEAP_SIZE 16 * 1024
36
37 //
38 // ARC Component Configuration Routines
39 //
40 VOID
41 NTAPI
42 FldrSetComponentInformation(
43 IN PCONFIGURATION_COMPONENT_DATA ComponentKey,
44 IN IDENTIFIER_FLAG Flags,
45 IN ULONG Key,
46 IN ULONG Affinity
47 );
48
49 VOID
50 NTAPI
51 FldrSetIdentifier(
52 IN PCONFIGURATION_COMPONENT_DATA ComponentKey,
53 IN PCHAR Identifier
54 );
55
56 VOID
57 NTAPI
58 FldrCreateSystemKey(
59 OUT PCONFIGURATION_COMPONENT_DATA *SystemKey
60 );
61
62 VOID
63 NTAPI
64 FldrCreateComponentKey(
65 IN PCONFIGURATION_COMPONENT_DATA SystemKey,
66 IN PWCHAR BusName,
67 IN ULONG BusNumber,
68 IN CONFIGURATION_CLASS Class,
69 IN CONFIGURATION_TYPE Type,
70 OUT PCONFIGURATION_COMPONENT_DATA *ComponentKey
71 );
72
73 VOID
74 NTAPI
75 FldrSetConfigurationData(
76 IN PCONFIGURATION_COMPONENT_DATA ComponentKey,
77 IN PCM_PARTIAL_RESOURCE_LIST ResourceList,
78 IN ULONG Size
79 );
80
81
82 /* PROTOTYPES ***************************************************************/
83
84 /* hardware.c */
85
86 VOID StallExecutionProcessor(ULONG Microseconds);
87
88 VOID HalpCalibrateStallExecution(VOID);
89
90 ULONGLONG RDTSC(VOID);
91
92 #endif /* __POWERPC_HARDWARE_H_ */
93
94 /* EOF */