ReactOS 0.4.15-dev-8191-gbc6c731
halfuncs.h
Go to the documentation of this file.
1/*++ NDK Version: 0098
2
3Copyright (c) Alex Ionescu. All rights reserved.
4
5Header Name:
6
7 halfuncs.h
8
9Abstract:
10
11 Function definitions for the HAL.
12
13Author:
14
15 Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
16
17--*/
18
19#ifndef _HALFUNCS_H
20#define _HALFUNCS_H
21
22//
23// Dependencies
24//
25#include <umtypes.h>
26#include <haltypes.h>
27#include <ketypes.h>
28#include <section_attribs.h>
29
30#ifndef NTOS_MODE_USER
31
32//
33// Private HAL Callbacks
34//
35#define HalHandlerForBus HALPRIVATEDISPATCH->HalHandlerForBus
36#define HalHandlerForConfigSpace HALPRIVATEDISPATCH->HalHandlerForConfigSpace
37#define HalLocateHiberRanges HALPRIVATEDISPATCH->HalLocateHiberRanges
38#define HalRegisterBusHandler HALPRIVATEDISPATCH->HalRegisterBusHandler
39#define HalSetWakeEnable HALPRIVATEDISPATCH->HalSetWakeEnable
40#define HalSetWakeAlarm HALPRIVATEDISPATCH->HalSetWakeAlarm
41#define HalPciTranslateBusAddress HALPRIVATEDISPATCH->HalPciTranslateBusAddress
42#define HalPciAssignSlotResources HALPRIVATEDISPATCH->HalPciAssignSlotResources
43#define HalHaltSystem HALPRIVATEDISPATCH->HalHaltSystem
44#define HalFindBusAddressTranslation HALPRIVATEDISPATCH->HalFindBusAddressTranslation
45#define HalResetDisplay HALPRIVATEDISPATCH->HalResetDisplay
46#define HalAllocateMapRegisters HALPRIVATEDISPATCH->HalAllocateMapRegisters
47#define KdSetupPciDeviceForDebugging HALPRIVATEDISPATCH->KdSetupPciDeviceForDebugging
48#define KdReleasePciDeviceforDebugging HALPRIVATEDISPATCH->KdReleasePciDeviceforDebugging
49#define KdGetAcpiTablePhase0 HALPRIVATEDISPATCH->KdGetAcpiTablePhase0
50#define KdCheckPowerButton HALPRIVATEDISPATCH->KdCheckPowerButton
51#define HalVectorToIDTEntry HALPRIVATEDISPATCH->HalVectorToIDTEntry
52#define KdMapPhysicalMemory64 HALPRIVATEDISPATCH->KdMapPhysicalMemory64
53#define KdUnmapVirtualAddress HALPRIVATEDISPATCH->KdUnmapVirtualAddress
54
55//
56// Display Functions
57//
59VOID
63);
64
65//
66// Initialization Functions
67//
72 VOID
73);
74
75#ifdef _ARC_
77VOID
80 _In_ ULONG ProcessorNumber,
81 _In_ struct _LOADER_PARAMETER_BLOCK *LoaderBlock
82);
83
84CODE_SEG("INIT")
89 _In_ ULONG BootPhase,
91);
92
98 _In_ PKPROCESSOR_STATE ProcessorState
99);
100
101#endif
102
104VOID
105NTAPI
108);
109
110//
111// CPU Routines
112//
114VOID
115NTAPI
117 VOID
118);
119
120//
121// Interrupt Functions
122//
125NTAPI
130);
131
132VOID
136);
137
139VOID
140NTAPI
144);
145
148NTAPI
153);
154
155#ifdef __REACTOS__
157VOID
158NTAPI
161 _In_ PKTRAP_FRAME TrapFrame
162);
163#else
165VOID
166NTAPI
170);
171#endif
172
173#ifdef _ARM_ // FIXME: ndk/arm? armddk.h?
174ULONG
176 VOID
177);
178#endif
179
180CODE_SEG("INIT")
182VOID
183NTAPI
185 VOID
186);
187
189VOID
192 _In_ KIRQL SoftwareInterruptRequested
193);
194
195#ifdef _M_AMD64
196
198VOID
199NTAPI
200HalSendNMI(
201 _In_ KAFFINITY TargetSet);
202
204VOID
205NTAPI
206HalSendSoftwareInterrupt(
207 _In_ KAFFINITY TargetSet,
208 _In_ KIRQL Irql);
209
210#endif // _M_AMD64
211
213VOID
214NTAPI
216 _In_ KAFFINITY TargetSet
217);
218
220VOID
221NTAPI
223 PVOID NmiInfo
224);
225
227UCHAR
231 _Out_ PKINTERRUPT_ROUTINE **FlatDispatch,
232 _Out_ PKINTERRUPT_ROUTINE *NoConnection
233);
234
235//
236// Bus Functions
237//
240NTAPI
243);
244
245//
246// Environment Functions
247//
248#ifdef _ARC_
251NTAPI
253 _In_ PCH Name,
255);
256
259NTAPI
261 _In_ PCH Variable,
264);
265#endif
266
267//
268// Profiling Functions
269//
270VOID
271NTAPI
273 _In_ KPROFILE_SOURCE ProfileSource
274);
275
277VOID
278NTAPI
280 _In_ KPROFILE_SOURCE ProfileSource
281);
282
285NTAPI
288);
289
290//
291// Time Functions
292//
295NTAPI
297 _In_ PTIME_FIELDS RtcTime
298);
299
302NTAPI
304 _In_ PTIME_FIELDS RtcTime
305);
306
308ULONG
309NTAPI
312);
313
314
315//
316// BIOS call API
317//
319NTAPI
321 _In_ ULONG *Size,
324
326NTAPI
330
332NTAPI
337 _In_ ULONG Size);
338
340NTAPI
345 _In_ ULONG Size);
346
348NTAPI
350 _In_ ULONG InterruptNumber,
351 _Inout_ PX86_BIOS_REGISTERS Registers);
352
353#endif // NTOS_MODE_USER
354#endif // _HALFUNCS_H
#define CODE_SEG(...)
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
Definition: bufpool.h:45
_Out_ PKIRQL Irql
Definition: csq.h:179
ULONG_PTR KAFFINITY
Definition: compat.h:85
UCHAR KIRQL
Definition: env_spec_w32.h:591
KIRQL * PKIRQL
Definition: env_spec_w32.h:592
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG Increment
Definition: CrNtStubs.h:46
ULONG HalGetInterruptSource(VOID)
Definition: pic.c:108
BOOLEAN NTAPI HalStartNextProcessor(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN PKPROCESSOR_STATE ProcessorState)
Definition: processor.c:71
VOID NTAPI HalInitializeProcessor(IN ULONG ProcessorNumber, IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: processor.c:48
BOOLEAN NTAPI HalInitSystem(IN ULONG BootPhase, IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: halinit.c:43
enum _KPROFILE_SOURCE KPROFILE_SOURCE
#define _In_reads_bytes_(size)
Definition: ms_sal.h:321
#define _Inout_
Definition: ms_sal.h:378
#define _Out_writes_bytes_(size)
Definition: ms_sal.h:350
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
NTHALAPI NTSTATUS NTAPI HalAdjustResourceList(_Inout_ PIO_RESOURCE_REQUIREMENTS_LIST *pResourceList)
NTSTATUS NTAPI x86BiosFreeBuffer(_In_ USHORT Segment, _In_ USHORT Offset)
Definition: x86bios.c:180
NTHALAPI BOOLEAN NTAPI HalAllProcessorsStarted(VOID)
Definition: processor.c:60
NTHALAPI VOID NTAPI HalRequestIpi(_In_ KAFFINITY TargetSet)
Definition: up.c:19
NTSTATUS NTAPI x86BiosReadMemory(_In_ USHORT Segment, _In_ USHORT Offset, _Out_writes_bytes_(Size) PVOID Buffer, _In_ ULONG Size)
Definition: x86bios.c:204
VOID FASTCALL HalClearSoftwareInterrupt(_In_ KIRQL Request)
NTHALAPI VOID FASTCALL HalRequestSoftwareInterrupt(_In_ KIRQL SoftwareInterruptRequested)
BOOLEAN NTAPI x86BiosCall(_In_ ULONG InterruptNumber, _Inout_ PX86_BIOS_REGISTERS Registers)
Definition: x86bios.c:410
NTHALAPI VOID NTAPI HalReturnToFirmware(_In_ FIRMWARE_REENTRY Action)
Definition: reboot.c:21
VOID NTAPI HalStartProfileInterrupt(_In_ KPROFILE_SOURCE ProfileSource)
Definition: profil.c:41
NTSTATUS NTAPI x86BiosWriteMemory(_In_ USHORT Segment, _In_ USHORT Offset, _In_reads_bytes_(Size) PVOID Buffer, _In_ ULONG Size)
Definition: x86bios.c:231
NTHALAPI UCHAR FASTCALL HalSystemVectorDispatchEntry(_In_ ULONG Vector, _Out_ PKINTERRUPT_ROUTINE **FlatDispatch, _Out_ PKINTERRUPT_ROUTINE *NoConnection)
NTHALAPI BOOLEAN NTAPI HalQueryRealTimeClock(_In_ PTIME_FIELDS RtcTime)
NTHALAPI VOID NTAPI HalHandleNMI(PVOID NmiInfo)
NTHALAPI BOOLEAN NTAPI HalEnableSystemInterrupt(_In_ ULONG Vector, _In_ KIRQL Irql, _In_ KINTERRUPT_MODE InterruptMode)
NTHALAPI VOID NTAPI HalProcessorIdle(VOID)
Definition: processor.c:83
NTHALAPI ULONG NTAPI HalSetTimeIncrement(_In_ ULONG Increment)
NTHALAPI VOID NTAPI HalEndSystemInterrupt(_In_ KIRQL Irql, _In_ UCHAR Vector)
NTHALAPI VOID NTAPI HalDisableSystemInterrupt(_In_ ULONG Vector, _In_ KIRQL Irql)
NTHALAPI VOID NTAPI HalStopProfileInterrupt(_In_ KPROFILE_SOURCE ProfileSource)
Definition: profil.c:24
NTHALAPI BOOLEAN NTAPI HalSetRealTimeClock(_In_ PTIME_FIELDS RtcTime)
Definition: cmos.c:288
NTHALAPI VOID NTAPI HalReportResourceUsage(VOID)
Definition: usage.c:67
NTHALAPI BOOLEAN NTAPI HalBeginSystemInterrupt(_In_ KIRQL Irql, _In_ ULONG Vector, _Out_ PKIRQL OldIrql)
NTSTATUS NTAPI x86BiosAllocateBuffer(_In_ ULONG *Size, _In_ USHORT *Segment, _In_ USHORT *Offset)
Definition: x86bios.c:151
NTHALAPI ULONG_PTR NTAPI HalSetProfileInterval(_In_ ULONG_PTR Interval)
Definition: profil.c:58
NTHALAPI VOID NTAPI HalDisplayString(_In_ PCHAR String)
enum _FIRMWARE_REENTRY FIRMWARE_REENTRY
DWORD Interval
Definition: netstat.c:30
#define FASTCALL
Definition: nt_native.h:50
CHAR * PCH
Definition: ntbasedef.h:391
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define NTHALAPI
Definition: ntoskrnl.h:40
unsigned short USHORT
Definition: pedump.c:61
ARC_STATUS NTAPI HalGetEnvironmentVariable(IN PCH Name, IN USHORT ValueLength, IN PCH Value)
Definition: rtc.c:70
ARC_STATUS NTAPI HalSetEnvironmentVariable(IN PCH Name, IN PCH Value)
Definition: rtc.c:57
enum _KINTERRUPT_MODE KINTERRUPT_MODE
ULONG ARC_STATUS
Definition: arc.h:4
#define NTAPI
Definition: typedefs.h:36
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
Definition: wdfiotarget.h:510
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
_Inout_ PVOID Segment
Definition: exfuncs.h:1101
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL _In_ KINTERRUPT_MODE InterruptMode
Definition: iofuncs.h:806
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:778
VOID(NTAPI * PKINTERRUPT_ROUTINE)(VOID)
Definition: ketypes.h:502
unsigned char UCHAR
Definition: xmlstorage.h:181