ReactOS  0.4.14-dev-98-gb0d4763
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: boot/freeldr/freeldr/arch/i386/halstub.c
5  * PURPOSE: I/O Stub HAL Routines
6  * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7  */
8 
9 /* INCLUDES ******************************************************************/
10 
11 #include <ntoskrnl.h>
12 
13 #include <debug.h>
14 
15 /* FUNCTIONS *****************************************************************/
16 
24 {
26  SectorSize,
29 }
30 
31 UCHAR
32 NTAPI
34 {
35  /* Return the vector */
36  return (UCHAR)Vector;
37 }
38 
39 VOID
40 NTAPI
42 {
43  /* Halt execution */
44  while (TRUE);
45 }
46 
47 /* GLOBALS *******************************************************************/
48 
50 {
55  0,
75 };
76 
78 {
99 };
#define IN
Definition: typedefs.h:38
BOOLEAN(NTAPI * pHalResetDisplay)(VOID)
Definition: haltypes.h:183
NTSTATUS(NTAPI * pHalInitPowerManagement)(_In_ PPM_DISPATCH_TABLE PmDriverDispatchTable, _Out_ PPM_DISPATCH_TABLE *PmHalDispatchTable)
Definition: haltypes.h:123
#define TRUE
Definition: types.h:120
VOID(NTAPI * pKdCheckPowerButton)(VOID)
Definition: kdtypes.h:52
NTSTATUS(NTAPI * pHalMirrorPhysicalMemory)(_In_ PHYSICAL_ADDRESS PhysicalAddress, _In_ LARGE_INTEGER NumberOfBytes)
Definition: haltypes.h:151
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS(FASTCALL * pHalIoWritePartitionTable)(_In_ PDEVICE_OBJECT DeviceObject, _In_ ULONG SectorSize, _In_ ULONG SectorsPerTrack, _In_ ULONG NumberOfHeads, _In_ struct _DRIVE_LAYOUT_INFORMATION *PartitionBuffer)
Definition: haltypes.h:99
PBUS_HANDLER(FASTCALL * pHalHandlerForBus)(_In_ INTERFACE_TYPE InterfaceType, _In_ ULONG BusNumber)
Definition: haltypes.h:10
PVOID(NTAPI * pHalGetAcpiTable)(_In_ ULONG Signature, _In_opt_ PCSTR OemId, _In_opt_ PCSTR OemTableId)
Definition: haltypes.h:206
#define FASTCALL
Definition: nt_native.h:50
NTSTATUS(NTAPI * pHalQuerySystemInformation)(_In_ HAL_QUERY_INFORMATION_CLASS InformationClass, _In_ ULONG BufferSize, _Inout_updates_bytes_to_(BufferSize, *ReturnedLength) PVOID Buffer, _Out_ PULONG ReturnedLength)
Definition: haltypes.h:65
BOOLEAN(NTAPI * pHalTranslateBusAddress)(_In_ INTERFACE_TYPE InterfaceType, _In_ ULONG BusNumber, _In_ PHYSICAL_ADDRESS BusAddress, _Inout_ PULONG AddressSpace, _Out_ PPHYSICAL_ADDRESS TranslatedAddress)
Definition: haltypes.h:161
NTSTATUS(NTAPI * pHalRegisterBusHandler)(_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: haltypes.h:60
NTSTATUS(NTAPI * pHalStartMirroring)(VOID)
Definition: haltypes.h:144
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(FASTCALL * pHalIoReadPartitionTable)(_In_ PDEVICE_OBJECT DeviceObject, _In_ ULONG SectorSize, _In_ BOOLEAN ReturnRecognizedPartitions, _Out_ struct _DRIVE_LAYOUT_INFORMATION **PartitionBuffer)
Definition: haltypes.h:85
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
NTSTATUS(FASTCALL * pHalIoSetPartitionInformation)(_In_ PDEVICE_OBJECT DeviceObject, _In_ ULONG SectorSize, _In_ ULONG PartitionNumber, _In_ ULONG PartitionType)
Definition: haltypes.h:92
_In_ ULONG _In_ BOOLEAN _Out_ struct _DRIVE_LAYOUT_INFORMATION ** PartitionBuffer
Definition: iofuncs.h:2048
NTSTATUS(NTAPI * pHalGetInterruptTranslator)(_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: haltypes.h:134
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
struct _DMA_ADAPTER *NTAPI * pHalGetDmaAdapter(_In_ PVOID Context, _In_ struct _DEVICE_DESCRIPTION *DeviceDescriptor, _Out_ PULONG NumberOfMapRegisters)
Definition: haltypes.h:128
VOID(FASTCALL * pHalIoAssignDriveLetters)(_In_ struct _LOADER_PARAMETER_BLOCK *LoaderBlock, _In_ PSTRING NtDeviceName, _Out_ PUCHAR NtSystemPath, _Out_ PSTRING NtSystemPathString)
Definition: haltypes.h:232
NTSTATUS(NTAPI * pHalInitPnpDriver)(VOID)
Definition: haltypes.h:114
NTSTATUS(NTAPI * pHalEndMirroring)(_In_ ULONG PassNumber)
Definition: haltypes.h:147
HAL_DISPATCH HalDispatchTable
Definition: halstub.c:49
PVOID(NTAPI * pKdMapPhysicalMemory64)(_In_ PHYSICAL_ADDRESS PhysicalAddress, _In_ ULONG NumberPages, _In_ BOOLEAN FlushCurrentTLB)
Definition: kdtypes.h:56
#define HAL_PRIVATE_DISPATCH_VERSION
Definition: haltypes.h:158
VOID(FASTCALL * pHalReferenceBusHandler)(_In_ PBUS_HANDLER BusHandler)
Definition: haltypes.h:15
VOID(NTAPI * pHalSetPciErrorHandlerCallback)(_In_ PCI_ERROR_HANDLER_CALLBACK Callback)
Definition: haltypes.h:227
unsigned char UCHAR
Definition: xmlstorage.h:181
NTSTATUS(NTAPI * pHalMirrorVerify)(_In_ PHYSICAL_ADDRESS PhysicalAddress, _In_ LARGE_INTEGER NumberOfBytes)
Definition: haltypes.h:156
_In_ ULONG _In_ BOOLEAN ReturnRecognizedPartitions
Definition: iofuncs.h:2046
NTSTATUS FASTCALL xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN BOOLEAN ReturnRecognizedPartitions, OUT PDRIVE_LAYOUT_INFORMATION *PartitionBuffer)
Definition: halstub.c:19
VOID(FASTCALL * pHalExamineMBR)(_In_ PDEVICE_OBJECT DeviceObject, _In_ ULONG SectorSize, _In_ ULONG MBRTypeIdentifier, _Out_ PVOID *Buffer)
Definition: haltypes.h:78
VOID(NTAPI * pHalEndOfBoot)(VOID)
Definition: haltypes.h:203
NTSTATUS FASTCALL IoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN BOOLEAN ReturnRecognizedPartitions, OUT PDRIVE_LAYOUT_INFORMATION *PartitionBuffer)
Definition: partition.c:495
VOID(NTAPI * pHalSetWakeEnable)(_In_ BOOLEAN Enable)
Definition: haltypes.h:73
NTSTATUS(NTAPI * pHalSetSystemInformation)(_In_ HAL_SET_INFORMATION_CLASS InformationClass, _In_ ULONG BufferSize, _In_ PVOID Buffer)
Definition: haltypes.h:72
NTSTATUS(NTAPI * pKdReleasePciDeviceForDebugging)(_Inout_ PDEBUG_DEVICE_DESCRIPTOR PciDevice)
Definition: kdtypes.h:43
VOID(NTAPI * pHalSetWakeAlarm)(_In_ ULONGLONG AlartTime, _In_ PTIME_FIELDS TimeFields)
Definition: haltypes.h:79
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
VOID(NTAPI * pHalHaltSystem)(VOID)
Definition: haltypes.h:180
UCHAR(NTAPI * pHalVectorToIDTEntry)(ULONG Vector)
Definition: haltypes.h:191
_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
PBUS_HANDLER(FASTCALL * pHalHandlerForConfigSpace)(_In_ BUS_DATA_TYPE ConfigSpace, _In_ ULONG BusNumber)
Definition: haltypes.h:47
#define OUT
Definition: typedefs.h:39
unsigned int ULONG
Definition: retypes.h:1
VOID(NTAPI * pKdUnmapVirtualAddress)(_In_ PVOID VirtualAddress, _In_ ULONG NumberPages, _In_ BOOLEAN FlushCurrentTLB)
Definition: kdtypes.h:62
NTSTATUS(NTAPI * pKdSetupPciDeviceForDebugging)(_In_opt_ PVOID LoaderBlock, _Inout_ PDEBUG_DEVICE_DESCRIPTOR PciDevice)
Definition: kdtypes.h:38
NTSTATUS(NTAPI * pHalQueryBusSlots)(_In_ PBUS_HANDLER BusHandler, _In_ ULONG BufferSize, _Out_ PULONG SlotNumbers, _Out_ PULONG ReturnedLength)
Definition: haltypes.h:107
VOID(NTAPI * pHalLocateHiberRanges)(_In_ PVOID MemoryMap)
Definition: haltypes.h:86
_In_ ULONG SectorSize
Definition: halfuncs.h:291
PVOID(NTAPI * pKdGetAcpiTablePhase0)(_In_ struct _LOADER_PARAMETER_BLOCK *LoaderBlock, _In_ ULONG Signature)
Definition: kdtypes.h:47
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
VOID NTAPI xHalHaltSystem(VOID)
Definition: halstub.c:41
NTSTATUS(NTAPI * pHalAllocateMapRegisters)(_In_ PADAPTER_OBJECT AdapterObject, _In_ ULONG Unknown, _In_ ULONG Unknown2, PMAP_REGISTER_ENTRY Registers)
Definition: haltypes.h:92
#define HAL_DISPATCH_VERSION
Definition: haltypes.h:281