3 Copyright (c) Alex Ionescu. All rights reserved.
11 Function definitions for the HAL.
15 Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
29 #ifndef NTOS_MODE_USER
32 // Private HAL Callbacks
34 #define HalHandlerForBus HALPRIVATEDISPATCH->HalHandlerForBus
35 #define HalHandlerForConfigSpace HALPRIVATEDISPATCH->HalHandlerForConfigSpace
36 #define HalLocateHiberRanges HALPRIVATEDISPATCH->HalLocateHiberRanges
37 #define HalRegisterBusHandler HALPRIVATEDISPATCH->HalRegisterBusHandler
38 #define HalSetWakeEnable HALPRIVATEDISPATCH->HalSetWakeEnable
39 #define HalSetWakeAlarm HALPRIVATEDISPATCH->HalSetWakeAlarm
40 #define HalPciTranslateBusAddress HALPRIVATEDISPATCH->HalPciTranslateBusAddress
41 #define HalPciAssignSlotResources HALPRIVATEDISPATCH->HalPciAssignSlotResources
42 #define HalHaltSystem HALPRIVATEDISPATCH->HalHaltSystem
43 #define HalFindBusAddressTranslation HALPRIVATEDISPATCH->HalFindBusAddressTranslation
44 #define HalResetDisplay HALPRIVATEDISPATCH->HalResetDisplay
45 #define HalAllocateMapRegisters HALPRIVATEDISPATCH->HalAllocateMapRegisters
46 #define KdSetupPciDeviceForDebugging HALPRIVATEDISPATCH->KdSetupPciDeviceForDebugging
47 #define KdReleasePciDeviceforDebugging HALPRIVATEDISPATCH->KdReleasePciDeviceforDebugging
48 #define KdGetAcpiTablePhase0 HALPRIVATEDISPATCH->KdGetAcpiTablePhase0
49 #define KdCheckPowerButton HALPRIVATEDISPATCH->KdCheckPowerButton
50 #define HalVectorToIDTEntry HALPRIVATEDISPATCH->HalVectorToIDTEntry
51 #define KdMapPhysicalMemory64 HALPRIVATEDISPATCH->KdMapPhysicalMemory64
52 #define KdUnmapVirtualAddress HALPRIVATEDISPATCH->KdUnmapVirtualAddress
55 // The DDK steals these away from you.
58 void __cdecl
_enable(void);
59 void __cdecl
_disable(void);
60 #pragma intrinsic(_enable)
61 #pragma intrinsic(_disable)
75 // Initialization Functions
80 HalAllProcessorsStarted(
88 HalInitializeProcessor(
89 ULONG ProcessorNumber
,
90 struct _LOADER_PARAMETER_BLOCK
*LoaderBlock
98 struct _LOADER_PARAMETER_BLOCK
*LoaderBlock
104 HalStartNextProcessor(
105 IN
struct _LOADER_PARAMETER_BLOCK
*LoaderBlock
,
106 IN PKPROCESSOR_STATE ProcessorState
115 FIRMWARE_REENTRY Action
129 // Interrupt Functions
134 HalBeginSystemInterrupt(
142 HalClearSoftwareInterrupt(
149 HalDisableSystemInterrupt(
157 HalEnableSystemInterrupt(
160 KINTERRUPT_MODE InterruptMode
166 HalEndSystemInterrupt(
168 IN PKTRAP_FRAME TrapFrame
171 #ifdef _ARM_ // FIXME: ndk/arm? armddk.h?
173 HalGetInterruptSource(
181 HalReportResourceUsage(
188 HalRequestSoftwareInterrupt(
189 KIRQL SoftwareInterruptRequested
209 HalSystemVectorDispatchEntry(
211 OUT PKINTERRUPT_ROUTINE
**FlatDispatch
,
212 OUT PKINTERRUPT_ROUTINE
*NoConnection
216 // Environment Functions
222 HalSetEnvironmentVariable(
230 HalGetEnvironmentVariable(
238 // Profiling Functions
242 HalStartProfileInterrupt(
243 IN KPROFILE_SOURCE ProfileSource
249 HalStopProfileInterrupt(
250 IN KPROFILE_SOURCE ProfileSource
256 HalSetProfileInterval(
257 IN ULONG_PTR Interval
266 HalQueryRealTimeClock(
267 IN PTIME_FIELDS RtcTime
274 IN PTIME_FIELDS RtcTime