5 #ifndef __INTERNAL_HAL_HAL_H
6 #define __INTERNAL_HAL_HAL_H
9 * FUNCTION: Probes for a BIOS32 extension
11 VOID
Hal_bios32_probe(VOID
);
14 * FUNCTION: Determines if a a bios32 service is present
16 BOOLEAN
Hal_bios32_is_service_present(ULONG service
);
19 VOID FASTCALL
HalInitializeDisplay (PLOADER_PARAMETER_BLOCK LoaderBlock
);
20 VOID FASTCALL
HalClearDisplay (UCHAR CharAttribute
);
23 VOID
HalpInitBusHandlers (VOID
);
26 VOID
HalpInitPICs(VOID
);
29 VOID
HalpCalibrateStallExecution(VOID
);
32 VOID
HalpInitPciBus (VOID
);
35 VOID
HalpStartEnumerator (VOID
);
38 VOID
HalpInitDma (VOID
);
41 * ADAPTER_OBJECT - Track a busmaster DMA adapter and its associated resources
44 * - I have not found any documentation on this; if you have any, please
45 * fix this struct definition
46 * - Some of this is right and some of this is wrong; many of these fields
47 * are unused at this point because X86 doesn't have map registers and
48 * currently that's all ROS supports
50 struct _ADAPTER_OBJECT
{
51 INTERFACE_TYPE InterfaceType
;
60 ULONG AvailableMapRegisters
;
61 PVOID MapRegisterBase
;
62 ULONG AllocatedMapRegisters
;
63 PWAIT_CONTEXT_BLOCK WaitContextBlock
;
64 KDEVICE_QUEUE DeviceQueue
;
65 BOOLEAN ScatterGather
;
68 * 18/07/04: Added these members. It's propably not the exact place where
69 * this should be stored, but I can't find better one. I haven't checked
70 * how Windows handles this.
74 BOOLEAN AutoInitialize
;
79 HalpQuerySystemInformation(IN HAL_QUERY_INFORMATION_CLASS InformationClass
,
82 OUT PULONG ReturnedLength
);
85 /* Non-standard functions */
87 HalReleaseDisplayOwnership();
90 HalQueryDisplayOwnership();
93 #define Ki386SaveFlags(x) __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */)
94 #define Ki386RestoreFlags(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory")
95 #define Ki386DisableInterrupts() __asm__ __volatile__("cli\n\t")
96 #define Ki386EnableInterrupts() __asm__ __volatile__("sti\n\t")
97 #define Ki386HaltProcessor() __asm__ __volatile__("hlt\n\t")
98 #elif defined(_MSC_VER)
99 #define Ki386SaveFlags(x) __asm pushfd __asm pop x;
100 #define Ki386RestoreFlags(x) __asm push x __asm popfd;
101 #define Ki386DisableInterrupts() __asm cli
102 #define Ki386EnableInterrupts() __asm sti
103 #define Ki386HaltProcessor() __asm hlt
105 #error Unknown compiler for inline assembler
112 #endif /* __INTERNAL_HAL_HAL_H */