ReactOS  0.4.15-dev-1070-ge1a01de
halstub.c
Go to the documentation of this file.
1 /*
2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: ntoskrnl/fstub/halstub.c
5 * PURPOSE: I/O Stub HAL Routines
6 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7  Pierre Schweitzer (pierre.schweitzer@reactos.org)
8 */
9 
10 /* INCLUDES ******************************************************************/
11 
12 #include <ntoskrnl.h>
13 #define NDEBUG
14 #include <debug.h>
15 
16 /* GLOBALS *******************************************************************/
17 
19 {
24  0,
42 };
43 
45 {
66 };
67 
68 /* FUNCTIONS *****************************************************************/
69 
70 UCHAR
71 NTAPI
73 {
74  /* Return the vector */
75  return (UCHAR)Vector;
76 }
77 
78 VOID
79 NTAPI
81 {
82  /* Halt execution */
83  while (TRUE);
84 }
85 
86 VOID
87 NTAPI
89 {
90  PAGED_CODE();
91 
92  /* Nothing */
93  return;
94 }
95 
96 VOID
97 NTAPI
99 {
100  /* Nothing */
101  return;
102 }
103 
105 FASTCALL
108 {
109  return NULL;
110 }
111 
112 VOID
113 FASTCALL
115 {
116  /* Nothing */
117  return;
118 }
119 
120 NTSTATUS
121 NTAPI
123 {
124  return STATUS_NOT_SUPPORTED;
125 }
126 
127 NTSTATUS
128 NTAPI
130  OUT PPM_DISPATCH_TABLE *PmHalDispatchTable)
131 {
132  return STATUS_NOT_SUPPORTED;
133 }
134 
135 NTSTATUS
136 NTAPI
138 {
139  PAGED_CODE();
140 
141  return STATUS_NOT_SUPPORTED;
142 }
143 
144 NTSTATUS
145 NTAPI
147 {
148  return STATUS_NOT_SUPPORTED;
149 }
150 
151 NTSTATUS
152 NTAPI
155 {
156  return STATUS_NOT_SUPPORTED;
157 }
158 
159 NTSTATUS
160 NTAPI
163  OUT PULONG SlotNumbers,
165 {
166  PAGED_CODE();
167 
168  return STATUS_NOT_SUPPORTED;
169 }
170 
171 NTSTATUS
172 NTAPI
175  IN PVOID Buffer)
176 {
177  PAGED_CODE();
178 
179  return STATUS_INVALID_LEVEL;
180 }
181 
182 NTSTATUS
183 NTAPI
186  IN OUT PVOID Buffer,
188 {
189  PAGED_CODE();
190 
191  return STATUS_INVALID_LEVEL;
192 }
193 
194 VOID
195 NTAPI
197 {
198  /* Nothing */
199  return;
200 }
201 
202 NTSTATUS
203 NTAPI
205  IN BUS_DATA_TYPE ConfigSpace,
207  IN INTERFACE_TYPE ParentInterfaceType,
208  IN ULONG ParentBusNumber,
211  OUT PBUS_HANDLER *BusHandler)
212 {
213  PAGED_CODE();
214 
215  return STATUS_NOT_SUPPORTED;
216 }
217 
218 VOID
219 NTAPI
222 {
223  /* Nothing */
224  return;
225 }
226 
227 BOOLEAN
228 NTAPI
234 {
235  KeBugCheckEx(HAL_INITIALIZATION_FAILED, 0, 0, 0, 0);
236 
237  return FALSE;
238 }
239 
240 NTSTATUS
241 NTAPI
243  IN ULONG Unknown,
244  IN ULONG Unknown2,
245  PMAP_REGISTER_ENTRY Registers)
246 {
247  PAGED_CODE();
248 
249  return STATUS_NOT_IMPLEMENTED;
250 }
251 
252 NTSTATUS
253 NTAPI
255  IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice)
256 {
257  return STATUS_NOT_IMPLEMENTED;
258 }
259 
260 NTSTATUS
261 NTAPI
263 {
264  return STATUS_NOT_IMPLEMENTED;
265 }
266 
267 PVOID
268 NTAPI
271 {
272  return NULL;
273 }
274 
275 PVOID
276 NTAPI
278  IN ULONG NumberPages,
279  IN BOOLEAN FlushCurrentTLB)
280 {
281  return NULL;
282 }
283 
284 VOID
285 NTAPI
287  IN ULONG NumberPages,
288  IN BOOLEAN FlushCurrentTLB)
289 {
290  /* Nothing */
291  return;
292 }
NTSTATUS NTAPI xHalRegisterBusHandler(IN INTERFACE_TYPE InterfaceType, IN BUS_DATA_TYPE ConfigSpace, IN ULONG BusNumber, IN INTERFACE_TYPE ParentInterfaceType, IN ULONG ParentBusNumber, IN ULONG ContextSize, IN PINSTALL_BUS_HANDLER InstallCallback, OUT PBUS_HANDLER *BusHandler)
Definition: halstub.c:204
#define IN
Definition: typedefs.h:39
BOOLEAN(NTAPI * pHalResetDisplay)(VOID)
Definition: haltypes.h:183
_In_ ULONG _In_ PHYSICAL_ADDRESS BusAddress
Definition: iofuncs.h:2268
enum _INTERFACE_TYPE INTERFACE_TYPE
NTSTATUS NTAPI xHalSetSystemInformation(IN HAL_SET_INFORMATION_CLASS InformationClass, IN ULONG BufferSize, IN PVOID Buffer)
Definition: halstub.c:173
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
VOID(NTAPI * pKdCheckPowerButton)(VOID)
Definition: kdtypes.h:52
#define TRUE
Definition: types.h:120
NTSTATUS NTAPI xKdReleasePciDeviceForDebugging(IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice)
Definition: halstub.c:262
BIOS_MEMORY_MAP MemoryMap[32]
Definition: loader.c:11
enum _BUS_DATA_TYPE BUS_DATA_TYPE
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG AddressSpace
Definition: iofuncs.h:2268
LONG NTSTATUS
Definition: precomp.h:26
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:140
_Must_inspect_result_ _In_ FLT_CONTEXT_TYPE _In_ SIZE_T ContextSize
Definition: fltkernel.h:1444
PVOID NTAPI MatchAll(IN PHYSICAL_ADDRESS PhysicalAddress, IN ULONG NumberPages, IN BOOLEAN FlushCurrentTLB)
Definition: halstub.c:277
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG _Out_ PPHYSICAL_ADDRESS TranslatedAddress
Definition: iofuncs.h:2268
#define FASTCALL
Definition: nt_native.h:50
BOOLEAN NTAPI xHalTranslateBusAddress(IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber, IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress)
Definition: halstub.c:229
NTSTATUS NTAPI xHalInitPnpDriver(VOID)
Definition: halstub.c:122
VOID FASTCALL xHalExamineMBR(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG MbrTypeIdentifier, OUT PVOID *MbrBuffer)
Definition: disksup.c:1643
Definition: haltypes.h:185
BOOLEAN(NTAPI * pHalFindBusAddressTranslation)(_In_ PHYSICAL_ADDRESS BusAddress, _Inout_ PULONG AddressSpace, _Out_ PPHYSICAL_ADDRESS TranslatedAddress, _Inout_ PULONG_PTR Context, _In_ BOOLEAN NextBus)
Definition: haltypes.h:195
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define FALSE
Definition: types.h:117
VOID FASTCALL xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN PSTRING NtDeviceName, OUT PUCHAR NtSystemPath, OUT PSTRING NtSystemPathString)
Definition: disksup.c:912
NTSTATUS FASTCALL xHalIoSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG PartitionNumber, IN ULONG PartitionType)
Definition: disksup.c:2203
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
struct _DMA_ADAPTER *NTAPI * pHalGetDmaAdapter(_In_ PVOID Context, _In_ struct _DEVICE_DESCRIPTION *DeviceDescriptor, _Out_ PULONG NumberOfMapRegisters)
Definition: haltypes.h:128
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG BusNumber
Definition: halfuncs.h:156
VOID FASTCALL xHalReferenceHandler(IN PBUS_HANDLER BusHandler)
Definition: halstub.c:114
enum _HAL_QUERY_INFORMATION_CLASS HAL_QUERY_INFORMATION_CLASS
HAL_DISPATCH HalDispatchTable
Definition: halstub.c:49
NTSTATUS NTAPI xHalInitPowerManagement(IN PPM_DISPATCH_TABLE PmDriverDispatchTable, OUT PPM_DISPATCH_TABLE *PmHalDispatchTable)
Definition: halstub.c:129
NTSTATUS NTAPI xHalQuerySystemInformation(IN HAL_QUERY_INFORMATION_CLASS InformationClass, IN ULONG BufferSize, IN OUT PVOID Buffer, OUT PULONG ReturnedLength)
Definition: halstub.c:184
NTSTATUS NTAPI xHalQueryBusSlots(IN PBUS_HANDLER BusHandler, IN ULONG BufferSize, OUT PULONG SlotNumbers, OUT PULONG ReturnedLength)
Definition: halstub.c:161
#define STATUS_INVALID_LEVEL
Definition: ntstatus.h:564
PVOID(NTAPI * pKdMapPhysicalMemory64)(_In_ PHYSICAL_ADDRESS PhysicalAddress, _In_ ULONG NumberPages, _In_ BOOLEAN FlushCurrentTLB)
Definition: kdtypes.h:56
uint64_t ULONGLONG
Definition: typedefs.h:67
#define HAL_PRIVATE_DISPATCH_VERSION
Definition: haltypes.h:158
NTSTATUS NTAPI xHalAllocateMapRegisters(IN PADAPTER_OBJECT AdapterObject, IN ULONG Unknown, IN ULONG Unknown2, PMAP_REGISTER_ENTRY Registers)
Definition: halstub.c:242
#define BufferSize
Definition: classpnp.h:436
NTSTATUS NTAPI xHalStartMirroring(VOID)
Definition: halstub.c:137
enum _HAL_SET_INFORMATION_CLASS HAL_SET_INFORMATION_CLASS
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1081
unsigned char UCHAR
Definition: xmlstorage.h:181
VOID NTAPI xHalLocateHiberRanges(IN PVOID MemoryMap)
Definition: halstub.c:196
NTSTATUS FASTCALL xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG SectorsPerTrack, IN ULONG NumberOfHeads, IN PDRIVE_LAYOUT_INFORMATION PartitionBuffer)
Definition: disksup.c:2392
NTSTATUS FASTCALL xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN BOOLEAN ReturnRecognizedPartitions, OUT PDRIVE_LAYOUT_INFORMATION *PartitionBuffer)
Definition: halstub.c:19
_In_ ULONG _In_ BATTERY_QUERY_INFORMATION_LEVEL _In_ LONG _In_ ULONG _Out_ PULONG ReturnedLength
Definition: batclass.h:187
_In_ ULONG _In_ BOOLEAN _Must_inspect_result_ PVOID * VirtualAddress
Definition: ndis.h:3791
PVOID NTAPI xKdGetAcpiTablePhase(IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock, IN ULONG Signature)
Definition: halstub.c:269
VOID NTAPI xKdUnmapVirtualAddress(IN PVOID VirtualAddress, IN ULONG NumberPages, IN BOOLEAN FlushCurrentTLB)
Definition: halstub.c:286
PBUS_HANDLER FASTCALL xHalHandlerForBus(IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber)
Definition: halstub.c:106
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG Vector
Definition: iofuncs.h:798
HAL_PRIVATE_DISPATCH HalPrivateDispatchTable
Definition: halstub.c:77
unsigned int * PULONG
Definition: retypes.h:1
PBUS_HANDLER(FASTCALL * pHalHandlerForConfigSpace)(_In_ BUS_DATA_TYPE ConfigSpace, _In_ ULONG BusNumber)
Definition: haltypes.h:47
NTSTATUS NTAPI xHalMirrorPhysicalMemory(IN PHYSICAL_ADDRESS PhysicalAddress, IN LARGE_INTEGER NumberOfBytes)
Definition: halstub.c:153
NTSTATUS NTAPI xKdSetupPciDeviceForDebugging(IN PVOID LoaderBlock OPTIONAL, IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice)
Definition: halstub.c:254
NTSTATUS NTAPI xHalEndMirroring(IN ULONG PassNumber)
Definition: halstub.c:146
#define OUT
Definition: typedefs.h:40
NTSTATUS(NTAPI * PINSTALL_BUS_HANDLER)(_In_ PBUS_HANDLER Bus)
Definition: haltypes.h:54
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:1018
NTSTATUS NTAPI xHalGetInterruptTranslator(IN INTERFACE_TYPE ParentInterfaceType, IN ULONG ParentBusNumber, IN INTERFACE_TYPE BridgeInterfaceType, IN USHORT Size, IN USHORT Version, OUT PTRANSLATOR_INTERFACE Translator, OUT PULONG BridgeBusNumber)
Definition: translate.c:156
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:423
unsigned int ULONG
Definition: retypes.h:1
VOID(NTAPI * pKdUnmapVirtualAddress)(_In_ PVOID VirtualAddress, _In_ ULONG NumberPages, _In_ BOOLEAN FlushCurrentTLB)
Definition: kdtypes.h:62
VOID NTAPI xHalSetWakeEnable(IN BOOLEAN Enable)
Definition: halstub.c:98
VOID NTAPI xHalSetWakeAlarm(IN ULONGLONG AlartTime, IN PTIME_FIELDS TimeFields)
Definition: halstub.c:220
VOID NTAPI xHalEndOfBoot(VOID)
Definition: halstub.c:88
_In_ FILTER_INFORMATION_CLASS InformationClass
Definition: fltkernel.h:1714
UCHAR NTAPI xHalVectorToIDTEntry(IN ULONG Vector)
Definition: halstub.c:33
NTSTATUS(NTAPI * pHalAssignSlotResources)(_In_ PUNICODE_STRING RegistryPath, _In_opt_ PUNICODE_STRING DriverClassName, _In_ PDRIVER_OBJECT DriverObject, _In_ PDEVICE_OBJECT DeviceObject, _In_ INTERFACE_TYPE BusType, _In_ ULONG BusNumber, _In_ ULONG SlotNumber, _Inout_ PCM_RESOURCE_LIST *AllocatedResources)
Definition: haltypes.h:169
static PTIME_FIELDS TimeFields
Definition: time.c:104
static const WCHAR Signature[]
Definition: parser.c:141
VOID NTAPI KeBugCheckEx(_In_ ULONG BugCheckCode, _In_ ULONG_PTR BugCheckParameter1, _In_ ULONG_PTR BugCheckParameter2, _In_ ULONG_PTR BugCheckParameter3, _In_ ULONG_PTR BugCheckParameter4)
Definition: rtlcompat.c:108
VOID NTAPI xHalHaltSystem(VOID)
Definition: halstub.c:41
#define PAGED_CODE()
#define HAL_DISPATCH_VERSION
Definition: haltypes.h:281
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68