- Add the real NT Object Callbacks and #ifdef out the ReactOS ones.
[reactos.git] / reactos / include / ndk / haltypes.h
1 /*++ NDK Version: 0095
2
3 Copyright (c) Alex Ionescu. All rights reserved.
4
5 Header Name:
6
7 haltypes.h
8
9 Abstract:
10
11 Type definitions for the HAL.
12
13 Author:
14
15 Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
16
17 --*/
18
19 #ifndef _HALTYPES_H
20 #define _HALTYPES_H
21
22 //
23 // Dependencies
24 //
25 #include <umtypes.h>
26
27 #ifndef NTOS_MODE_USER
28
29 //
30 // Multi-Boot Flags (REMOVE ME)
31 //
32 #ifdef _REACTOS_
33 #define MB_FLAGS_MEM_INFO (0x1)
34 #define MB_FLAGS_BOOT_DEVICE (0x2)
35 #define MB_FLAGS_COMMAND_LINE (0x4)
36 #define MB_FLAGS_MODULE_INFO (0x8)
37 #define MB_FLAGS_AOUT_SYMS (0x10)
38 #define MB_FLAGS_ELF_SYMS (0x20)
39 #define MB_FLAGS_MMAP_INFO (0x40)
40 #define MB_FLAGS_DRIVES_INFO (0x80)
41 #define MB_FLAGS_CONFIG_TABLE (0x100)
42 #define MB_FLAGS_BOOT_LOADER_NAME (0x200)
43 #define MB_FLAGS_APM_TABLE (0x400)
44 #define MB_FLAGS_GRAPHICS_TABLE (0x800)
45 #define MB_FLAGS_ACPI_TABLE (0x1000)
46 #endif
47
48 //
49 // HalShutdownSystem Types
50 //
51 typedef enum _FIRMWARE_ENTRY
52 {
53 HalHaltRoutine,
54 HalPowerDownRoutine,
55 HalRestartRoutine,
56 HalRebootRoutine,
57 HalInteractiveModeRoutine,
58 HalMaximumRoutine
59 } FIRMWARE_REENTRY, *PFIRMWARE_REENTRY;
60
61 //
62 // Hal Private dispatch Table
63 //
64 #define HAL_PRIVATE_DISPATCH_VERSION 1
65 typedef struct _HAL_PRIVATE_DISPATCH
66 {
67 ULONG Version;
68 } HAL_PRIVATE_DISPATCH, *PHAL_PRIVATE_DISPATCH;
69
70 #ifndef _REACTOS_
71 //
72 // NLS Data Block
73 //
74 typedef struct _NLS_TABLE_DATA
75 {
76 PVOID AnsiCodePageData;
77 PVOID OemCodePageData;
78 PVOID UnicodeCodePageData;
79 } NLS_TABLE_DATA, *PNLS_TABLE_DATA;
80
81 //
82 // Subsystem Specific Loader Blocks
83 //
84 typedef struct _PROFILE_PARAMETER_BLOCK
85 {
86 USHORT DockData0;
87 USHORT DockData1;
88 USHORT DockData2;
89 USHORT DockData3;
90 ULONG DockData3;
91 ULONG DockData4;
92 } PROFILE_PARAMETER_BLOCK, *PPROFILE_PARAMETER_BLOCK;
93
94 typedef struct _HEADLESS_LOADER_BLOCK
95 {
96 UCHAR Unknown[0xC];
97 } HEADLESS_LOADER_BLOCK, *PHEADLESS_LOADER_BLOCK;
98
99 typedef struct _NETWORK_LOADER_BLOCK
100 {
101 UCHAR Unknown[0xC];
102 } NETWORK_LOADER_BLOCK, *PNETWORK_LOADER_BLOCK;
103
104 //
105 // Extended Loader Parameter Block
106 //
107 typedef struct _LOADER_PARAMETER_EXTENSION
108 {
109 ULONG Size;
110 PROFILE_PARAMETER_BLOCK ProfileParameterBlock;
111 ULONG MajorVersion;
112 ULONG MinorVersion;
113 PVOID SpecialConfigInfFile;
114 ULONG SpecialConfigInfSize;
115 PVOID TriageDumpData;
116 //
117 // NT 5.1
118 //
119 ULONG NumberOfPages;
120 PHEADLESS_LOADER_BLOCK HeadlessLoaderBlock;
121 PVOID Unknown1;
122 PVOID PrefetchDatabaseBase;
123 ULONG PrefetchDatabaseSize;
124 PNETWORK_LOADER_BLOCK NetworkLoaderBlock;
125 //
126 // NT 5.2+
127 //
128 PVOID Reserved[2];
129 LIST_ENTRY FirmwareListEntry;
130 PVOID AcpiTableBase;
131 ULONG AcpiTableSize;
132 } LOADER_PARAMETER_EXTENSION, *PLOADER_PARAMETER_EXTENSION;
133
134 //
135 // Architecture specific Loader Parameter Blocks
136 //
137 typedef struct _I386_LOADER_BLOCK
138 {
139 PVOID CommonDataArea;
140 ULONG MachineType;
141 ULONG Reserved;
142 } I386_LOADER_BLOCK, *PI386_LOADER_BLOCK;
143
144 //
145 // Setup Loader Parameter Block
146 //
147 typedef struct _SETUP_LOADER_BLOCK
148 {
149 ULONG Unknown[139];
150 ULONG Flags;
151 } SETUP_LOADER_BLOCK, *PSETUP_LOADER_BLOCK;
152
153 //
154 // Loader Parameter Block
155 //
156 typedef struct _LOADER_PARAMETER_BLOCK
157 {
158 LIST_ENTRY LoadOrderListHead;
159 LIST_ENTRY MemoryDescriptorListHead;
160 LIST_ENTRY DriverList;
161 PVOID KernelStack;
162 PVOID Prcb;
163 PVOID Process;
164 PVOID Thread;
165 ULONG RegistryLength;
166 PVOID RegistryBase;
167 PCONFIGURATION_COMPONENT_DATA ConfigurationRoot;
168 LPSTR ArcBootDeviceName;
169 LPSTR ArcHalDeviceName;
170 LPSTR SystemRoot;
171 LPSTR BootRoot;
172 LPSTR CommandLine;
173 PNLS_TABLE_DATA NlsTables;
174 PARC_DISK_INFORMATION ArcDevices;
175 PVOID OEMFont;
176 PSETUP_LOADER_BLOCK SetupLdrBlock;
177 PLOADER_PARAMETER_EXTENSION LpbExtension;
178 union
179 {
180 I386_LOADER_BLOCK I386;
181 } u;
182 } LOADER_PARAMETER_BLOCK, *PLOADER_PARAMETER_BLOCK;
183
184 #else
185
186 //
187 // FIXME: ReactOS ONLY
188 //
189 typedef struct _LOADER_MODULE
190 {
191 ULONG ModStart;
192 ULONG ModEnd;
193 ULONG String;
194 ULONG Reserved;
195 } LOADER_MODULE, *PLOADER_MODULE;
196 typedef struct _LOADER_PARAMETER_BLOCK
197 {
198 ULONG Flags;
199 ULONG MemLower;
200 ULONG MemHigher;
201 ULONG BootDevice;
202 ULONG CommandLine;
203 ULONG ModsCount;
204 ULONG ModsAddr;
205 UCHAR Syms[12];
206 ULONG MmapLength;
207 ULONG MmapAddr;
208 ULONG DrivesCount;
209 ULONG DrivesAddr;
210 ULONG ConfigTable;
211 ULONG BootLoaderName;
212 ULONG PageDirectoryStart;
213 ULONG PageDirectoryEnd;
214 ULONG KernelBase;
215 } LOADER_PARAMETER_BLOCK, *PLOADER_PARAMETER_BLOCK;
216 #endif
217
218 //
219 // Kernel Exports
220 //
221 #ifdef __NTOSKRNL__
222 extern HAL_PRIVATE_DISPATCH NTSYSAPI HalPrivateDispatchTable;
223 #else
224 extern PHAL_PRIVATE_DISPATCH NTSYSAPI HalPrivateDispatchTable;
225 #endif
226 extern ULONG NTSYSAPI KdComPortInUse;
227
228 #endif
229 #endif
230