ReactOS  0.4.13-dev-986-g029b8f2
halp.h
Go to the documentation of this file.
1 /*
2  *
3  */
4 
5 #pragma once
6 
7 /* Temporary hack */
8 #define KPCR_BASE 0xFF000000
9 
10 #define HAL_APC_REQUEST 0
11 #define HAL_DPC_REQUEST 1
12 
13 /* CMOS Registers and Ports */
14 #define CMOS_CONTROL_PORT (PUCHAR)0x70
15 #define CMOS_DATA_PORT (PUCHAR)0x71
16 #define RTC_REGISTER_A 0x0A
17 #define RTC_REGISTER_B 0x0B
18 #define RTC_REG_A_UIP 0x80
19 #define RTC_REGISTER_CENTURY 0x32
20 
21 /* Timer Registers and Ports */
22 #define TIMER_CONTROL_PORT 0x43
23 #define TIMER_DATA_PORT0 0x40
24 #define TIMER_SC0 0
25 #define TIMER_BOTH 0x30
26 #define TIMER_MD2 0x4
27 
28 /* Conversion functions */
29 #define BCD_INT(bcd) \
30  (((bcd & 0xF0) >> 4) * 10 + (bcd & 0x0F))
31 #define INT_BCD(int) \
32  (UCHAR)(((int / 10) << 4) + (int % 10))
33 
34 /* adapter.c */
36 
37 /* bus.c */
39 
40 /* irql.c */
42 
43 /* udelay.c */
45 
46 /* pci.c */
48 
49 /* dma.c */
51 
52 /* Non-generic initialization */
56 
57 //
58 // KD Support
59 //
60 VOID
61 NTAPI
63  VOID
64 );
65 
66 VOID
67 NTAPI
69  VOID
70 );
71 
73 NTAPI
75  IN PVOID LoaderBlock,
77 );
78 
80 NTAPI
83 );
84 
85 //
86 // Memory routines
87 //
88 PVOID
89 NTAPI
92  IN ULONG NumberPage
93 );
94 
95 VOID
96 NTAPI
99  IN ULONG NumberPages
100 );
101 
102 /* sysinfo.c */
103 NTSTATUS
104 NTAPI
108  IN OUT PVOID Buffer,
110 );
111 
112 NTSTATUS
113 NTAPI
118 );
119 
120 typedef struct tagHALP_HOOKS
121 {
124 
125 extern HALP_HOOKS HalpHooks;
NTSTATUS NTAPI HaliQuerySystemInformation(IN HAL_QUERY_INFORMATION_CLASS InformationClass, IN ULONG BufferSize, IN OUT PVOID Buffer, OUT PULONG ReturnedLength)
Definition: sysinfo.c:19
#define IN
Definition: typedefs.h:38
PADAPTER_OBJECT NTAPI HalpAllocateAdapterEx(ULONG NumberOfMapRegisters, BOOLEAN IsMaster, BOOLEAN Dma32BitAddresses)
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
_Out_ PULONG NumberOfMapRegisters
Definition: halfuncs.h:209
HALP_HOOKS HalpHooks
Definition: halinit.c:17
VOID HalpClockInterrupt(VOID)
Definition: timer.c:30
LONG NTSTATUS
Definition: precomp.h:26
struct tagHALP_HOOKS * PHALP_HOOKS
VOID HalpInitializeClock(VOID)
Definition: timer.c:54
VOID NTAPI HalpInitNonBusHandler(VOID)
Definition: bus.c:120
VOID NTAPI HalpCheckPowerButton(VOID)
Definition: misc.c:20
VOID HalpInitPhase1(VOID)
Definition: halinit_up.c:26
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
NTSTATUS NTAPI HalpSetupPciDeviceForDebugging(IN PVOID LoaderBlock, IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice)
Definition: pci.c:473
VOID NTAPI HalpUnmapVirtualAddress(IN PVOID VirtualAddress, IN ULONG NumberPages)
Definition: misc.c:39
unsigned char BOOLEAN
Definition: bufpool.h:45
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG BusNumber
Definition: halfuncs.h:156
enum _HAL_QUERY_INFORMATION_CLASS HAL_QUERY_INFORMATION_CLASS
VOID HalpInitPciBus(VOID)
VOID HalpInitPhase0(PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: halinit_mp.c:31
NTSTATUS NTAPI HalpReleasePciDeviceForDebugging(IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice)
Definition: pci.c:482
void(* InitPciBus)(ULONG BusNumber, PBUS_HANDLER BusHandler)
Definition: halp.h:122
#define BufferSize
Definition: classpnp.h:419
KSPIN_LOCK HalpSystemHardwareLock
Definition: cmos.c:18
enum _HAL_SET_INFORMATION_CLASS HAL_SET_INFORMATION_CLASS
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1060
_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
VOID NTAPI HalpInitPICs(VOID)
Definition: irql.c:80
struct tagHALP_HOOKS HALP_HOOKS
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
unsigned int * PULONG
Definition: retypes.h:1
NTSTATUS NTAPI HaliSetSystemInformation(IN HAL_SET_INFORMATION_CLASS InformationClass, IN ULONG BufferSize, IN OUT PVOID Buffer)
Definition: sysinfo.c:31
#define OUT
Definition: typedefs.h:39
VOID HalpInitDma(VOID)
Definition: dma.c:121
unsigned int ULONG
Definition: retypes.h:1
PVOID NTAPI HalpMapPhysicalMemory64(IN PHYSICAL_ADDRESS PhysicalAddress, IN ULONG NumberPage)
Definition: misc.c:28
_In_ FILTER_INFORMATION_CLASS InformationClass
Definition: fltkernel.h:1714
VOID NTAPI HalpRegisterKdSupportFunctions(VOID)
Definition: bus.c:23