* Sync to trunk HEAD (r53318).
[reactos.git] / boot / freeldr / freeldr / arch / i386 / halstub.c
1 /*
2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: boot/freeldr/freeldr/arch/i386/hal/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 #define NDEBUG
13 #include <debug.h>
14
15 /* FUNCTIONS *****************************************************************/
16
17 NTSTATUS
18 FASTCALL
19 xHalIoReadPartitionTable(
20 IN PDEVICE_OBJECT DeviceObject,
21 IN ULONG SectorSize,
22 IN BOOLEAN ReturnRecognizedPartitions,
23 OUT PDRIVE_LAYOUT_INFORMATION *PartitionBuffer)
24 {
25 return IoReadPartitionTable(DeviceObject,
26 SectorSize,
27 ReturnRecognizedPartitions,
28 PartitionBuffer);
29 }
30
31 UCHAR
32 NTAPI
33 xHalVectorToIDTEntry(IN ULONG Vector)
34 {
35 /* Return the vector */
36 return (UCHAR)Vector;
37 }
38
39 VOID
40 NTAPI
41 xHalHaltSystem(VOID)
42 {
43 /* Halt execution */
44 while (TRUE);
45 }
46
47 /* GLOBALS *******************************************************************/
48
49 HAL_DISPATCH HalDispatchTable =
50 {
51 HAL_DISPATCH_VERSION,
52 (pHalQuerySystemInformation)NULL,
53 (pHalSetSystemInformation)NULL,
54 (pHalQueryBusSlots)NULL,
55 0,
56 (pHalExamineMBR)NULL,
57 (pHalIoAssignDriveLetters)NULL,
58 (pHalIoReadPartitionTable)xHalIoReadPartitionTable,
59 (pHalIoSetPartitionInformation)NULL,
60 (pHalIoWritePartitionTable)NULL,
61 (pHalHandlerForBus)NULL,
62 (pHalReferenceBusHandler)NULL,
63 (pHalReferenceBusHandler)NULL,
64 (pHalInitPnpDriver)NULL,
65 (pHalInitPowerManagement)NULL,
66 (pHalGetDmaAdapter)NULL,
67 (pHalGetInterruptTranslator)NULL,
68 (pHalStartMirroring)NULL,
69 (pHalEndMirroring)NULL,
70 (pHalMirrorPhysicalMemory)NULL,
71 (pHalEndOfBoot)NULL,
72 (pHalMirrorVerify)NULL
73 };
74
75 HAL_PRIVATE_DISPATCH HalPrivateDispatchTable =
76 {
77 HAL_PRIVATE_DISPATCH_VERSION,
78 (pHalHandlerForBus)NULL,
79 (pHalHandlerForConfigSpace)NULL,
80 (pHalLocateHiberRanges)NULL,
81 (pHalRegisterBusHandler)NULL,
82 (pHalSetWakeEnable)NULL,
83 (pHalSetWakeAlarm)NULL,
84 (pHalTranslateBusAddress)NULL,
85 (pHalAssignSlotResources)NULL,
86 (pHalHaltSystem)xHalHaltSystem,
87 (pHalFindBusAddressTranslation)NULL,
88 (pHalResetDisplay)NULL,
89 (pHalAllocateMapRegisters)NULL,
90 (pKdSetupPciDeviceForDebugging)NULL,
91 (pKdReleasePciDeviceForDebugging)NULL,
92 (pKdGetAcpiTablePhase0)NULL,
93 (pKdCheckPowerButton)NULL,
94 (pHalVectorToIDTEntry)xHalVectorToIDTEntry,
95 (pKdMapPhysicalMemory64)NULL,
96 (pKdUnmapVirtualAddress)NULL
97 };