ReactOS  0.4.15-dev-1068-g467feb9
halfuncs.h File Reference
#include <umtypes.h>
#include <haltypes.h>
#include <ketypes.h>
#include <section_attribs.h>
Include dependency graph for halfuncs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define HalHandlerForBus   HALPRIVATEDISPATCH->HalHandlerForBus
 
#define HalHandlerForConfigSpace   HALPRIVATEDISPATCH->HalHandlerForConfigSpace
 
#define HalLocateHiberRanges   HALPRIVATEDISPATCH->HalLocateHiberRanges
 
#define HalRegisterBusHandler   HALPRIVATEDISPATCH->HalRegisterBusHandler
 
#define HalSetWakeEnable   HALPRIVATEDISPATCH->HalSetWakeEnable
 
#define HalSetWakeAlarm   HALPRIVATEDISPATCH->HalSetWakeAlarm
 
#define HalPciTranslateBusAddress   HALPRIVATEDISPATCH->HalPciTranslateBusAddress
 
#define HalPciAssignSlotResources   HALPRIVATEDISPATCH->HalPciAssignSlotResources
 
#define HalHaltSystem   HALPRIVATEDISPATCH->HalHaltSystem
 
#define HalFindBusAddressTranslation   HALPRIVATEDISPATCH->HalFindBusAddressTranslation
 
#define HalResetDisplay   HALPRIVATEDISPATCH->HalResetDisplay
 
#define HalAllocateMapRegisters   HALPRIVATEDISPATCH->HalAllocateMapRegisters
 
#define KdSetupPciDeviceForDebugging   HALPRIVATEDISPATCH->KdSetupPciDeviceForDebugging
 
#define KdReleasePciDeviceforDebugging   HALPRIVATEDISPATCH->KdReleasePciDeviceforDebugging
 
#define KdGetAcpiTablePhase0   HALPRIVATEDISPATCH->KdGetAcpiTablePhase0
 
#define KdCheckPowerButton   HALPRIVATEDISPATCH->KdCheckPowerButton
 
#define HalVectorToIDTEntry   HALPRIVATEDISPATCH->HalVectorToIDTEntry
 
#define KdMapPhysicalMemory64   HALPRIVATEDISPATCH->KdMapPhysicalMemory64
 
#define KdUnmapVirtualAddress   HALPRIVATEDISPATCH->KdUnmapVirtualAddress
 

Functions

NTHALAPI VOID NTAPI HalDisplayString (_In_ PCHAR String)
 
NTHALAPI BOOLEAN NTAPI HalAllProcessorsStarted (VOID)
 
NTHALAPI VOID NTAPI HalReturnToFirmware (_In_ FIRMWARE_REENTRY Action)
 
NTHALAPI VOID NTAPI HalProcessorIdle (VOID)
 
NTHALAPI BOOLEAN NTAPI HalBeginSystemInterrupt (_In_ KIRQL Irql, _In_ ULONG Vector, _Out_ PKIRQL OldIrql)
 
VOID FASTCALL HalClearSoftwareInterrupt (_In_ KIRQL Request)
 
NTHALAPI VOID NTAPI HalDisableSystemInterrupt (_In_ ULONG Vector, _In_ KIRQL Irql)
 
NTHALAPI BOOLEAN NTAPI HalEnableSystemInterrupt (_In_ ULONG Vector, _In_ KIRQL Irql, _In_ KINTERRUPT_MODE InterruptMode)
 
NTHALAPI VOID NTAPI HalEndSystemInterrupt (_In_ KIRQL Irql, _In_ UCHAR Vector)
 
INIT_FUNCTION NTHALAPI VOID NTAPI HalReportResourceUsage (VOID)
 
NTHALAPI VOID FASTCALL HalRequestSoftwareInterrupt (_In_ KIRQL SoftwareInterruptRequested)
 
NTHALAPI VOID NTAPI HalRequestIpi (_In_ KAFFINITY TargetSet)
 
NTHALAPI VOID NTAPI HalHandleNMI (PVOID NmiInfo)
 
NTHALAPI UCHAR FASTCALL HalSystemVectorDispatchEntry (_In_ ULONG Vector, _Out_ PKINTERRUPT_ROUTINE **FlatDispatch, _Out_ PKINTERRUPT_ROUTINE *NoConnection)
 
NTHALAPI NTSTATUS NTAPI HalAdjustResourceList (_Inout_ PIO_RESOURCE_REQUIREMENTS_LIST *pResourceList)
 
VOID NTAPI HalStartProfileInterrupt (_In_ KPROFILE_SOURCE ProfileSource)
 
NTHALAPI VOID NTAPI HalStopProfileInterrupt (_In_ KPROFILE_SOURCE ProfileSource)
 
NTHALAPI ULONG_PTR NTAPI HalSetProfileInterval (_In_ ULONG_PTR Interval)
 
NTHALAPI BOOLEAN NTAPI HalQueryRealTimeClock (_In_ PTIME_FIELDS RtcTime)
 
NTHALAPI BOOLEAN NTAPI HalSetRealTimeClock (_In_ PTIME_FIELDS RtcTime)
 
NTHALAPI ULONG NTAPI HalSetTimeIncrement (_In_ ULONG Increment)
 

Macro Definition Documentation

◆ HalAllocateMapRegisters

#define HalAllocateMapRegisters   HALPRIVATEDISPATCH->HalAllocateMapRegisters

Definition at line 46 of file halfuncs.h.

◆ HalFindBusAddressTranslation

#define HalFindBusAddressTranslation   HALPRIVATEDISPATCH->HalFindBusAddressTranslation

Definition at line 44 of file halfuncs.h.

◆ HalHaltSystem

#define HalHaltSystem   HALPRIVATEDISPATCH->HalHaltSystem

Definition at line 43 of file halfuncs.h.

◆ HalHandlerForBus

#define HalHandlerForBus   HALPRIVATEDISPATCH->HalHandlerForBus

Definition at line 35 of file halfuncs.h.

◆ HalHandlerForConfigSpace

#define HalHandlerForConfigSpace   HALPRIVATEDISPATCH->HalHandlerForConfigSpace

Definition at line 36 of file halfuncs.h.

◆ HalLocateHiberRanges

#define HalLocateHiberRanges   HALPRIVATEDISPATCH->HalLocateHiberRanges

Definition at line 37 of file halfuncs.h.

◆ HalPciAssignSlotResources

#define HalPciAssignSlotResources   HALPRIVATEDISPATCH->HalPciAssignSlotResources

Definition at line 42 of file halfuncs.h.

◆ HalPciTranslateBusAddress

#define HalPciTranslateBusAddress   HALPRIVATEDISPATCH->HalPciTranslateBusAddress

Definition at line 41 of file halfuncs.h.

◆ HalRegisterBusHandler

#define HalRegisterBusHandler   HALPRIVATEDISPATCH->HalRegisterBusHandler

Definition at line 38 of file halfuncs.h.

◆ HalResetDisplay

#define HalResetDisplay   HALPRIVATEDISPATCH->HalResetDisplay

Definition at line 45 of file halfuncs.h.

◆ HalSetWakeAlarm

#define HalSetWakeAlarm   HALPRIVATEDISPATCH->HalSetWakeAlarm

Definition at line 40 of file halfuncs.h.

◆ HalSetWakeEnable

#define HalSetWakeEnable   HALPRIVATEDISPATCH->HalSetWakeEnable

Definition at line 39 of file halfuncs.h.

◆ HalVectorToIDTEntry

#define HalVectorToIDTEntry   HALPRIVATEDISPATCH->HalVectorToIDTEntry

Definition at line 51 of file halfuncs.h.

◆ KdCheckPowerButton

#define KdCheckPowerButton   HALPRIVATEDISPATCH->KdCheckPowerButton

Definition at line 50 of file halfuncs.h.

◆ KdGetAcpiTablePhase0

#define KdGetAcpiTablePhase0   HALPRIVATEDISPATCH->KdGetAcpiTablePhase0

Definition at line 49 of file halfuncs.h.

◆ KdMapPhysicalMemory64

#define KdMapPhysicalMemory64   HALPRIVATEDISPATCH->KdMapPhysicalMemory64

Definition at line 52 of file halfuncs.h.

◆ KdReleasePciDeviceforDebugging

#define KdReleasePciDeviceforDebugging   HALPRIVATEDISPATCH->KdReleasePciDeviceforDebugging

Definition at line 48 of file halfuncs.h.

◆ KdSetupPciDeviceForDebugging

#define KdSetupPciDeviceForDebugging   HALPRIVATEDISPATCH->KdSetupPciDeviceForDebugging

Definition at line 47 of file halfuncs.h.

◆ KdUnmapVirtualAddress

#define KdUnmapVirtualAddress   HALPRIVATEDISPATCH->KdUnmapVirtualAddress

Definition at line 53 of file halfuncs.h.

Function Documentation

◆ HalAdjustResourceList()

NTHALAPI NTSTATUS NTAPI HalAdjustResourceList ( _Inout_ PIO_RESOURCE_REQUIREMENTS_LIST pResourceList)

◆ HalAllProcessorsStarted()

NTHALAPI BOOLEAN NTAPI HalAllProcessorsStarted ( VOID  )

Definition at line 60 of file processor.c.

61 {
62  /* Do nothing */
63  return TRUE;
64 }
#define TRUE
Definition: types.h:120

Referenced by Phase1InitializationDiscard().

◆ HalBeginSystemInterrupt()

NTHALAPI BOOLEAN NTAPI HalBeginSystemInterrupt ( _In_ KIRQL  Irql,
_In_ ULONG  Vector,
_Out_ PKIRQL  OldIrql 
)

◆ HalClearSoftwareInterrupt()

VOID FASTCALL HalClearSoftwareInterrupt ( _In_ KIRQL  Request)

◆ HalDisableSystemInterrupt()

NTHALAPI VOID NTAPI HalDisableSystemInterrupt ( _In_ ULONG  Vector,
_In_ KIRQL  Irql 
)

◆ HalDisplayString()

NTHALAPI VOID NTAPI HalDisplayString ( _In_ PCHAR  String)

◆ HalEnableSystemInterrupt()

NTHALAPI BOOLEAN NTAPI HalEnableSystemInterrupt ( _In_ ULONG  Vector,
_In_ KIRQL  Irql,
_In_ KINTERRUPT_MODE  InterruptMode 
)

◆ HalEndSystemInterrupt()

NTHALAPI VOID NTAPI HalEndSystemInterrupt ( _In_ KIRQL  Irql,
_In_ UCHAR  Vector 
)

◆ HalHandleNMI()

NTHALAPI VOID NTAPI HalHandleNMI ( PVOID  NmiInfo)

◆ HalProcessorIdle()

NTHALAPI VOID NTAPI HalProcessorIdle ( VOID  )

Definition at line 83 of file processor.c.

84 {
85  /* Enable interrupts and halt the processor */
86  _enable();
88  while (TRUE);
89 }
#define TRUE
Definition: types.h:120
void __cdecl _enable(void)
Definition: intrin_arm.h:373
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by PopIdle0().

◆ HalQueryRealTimeClock()

NTHALAPI BOOLEAN NTAPI HalQueryRealTimeClock ( _In_ PTIME_FIELDS  RtcTime)

◆ HalReportResourceUsage()

INIT_FUNCTION NTHALAPI VOID NTAPI HalReportResourceUsage ( VOID  )

Definition at line 67 of file usage.c.

68 {
69  UNICODE_STRING HalString;
70 
71  /* Build HAL usage */
72  RtlInitUnicodeString(&HalString, L"ARM Versatile HAL");
73  HalpReportResourceUsage(&HalString, Internal);
74 }
static const WCHAR L[]
Definition: oid.c:1250
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
VOID NTAPI HalpReportResourceUsage(IN PUNICODE_STRING HalName, IN INTERFACE_TYPE InterfaceType)
Definition: usage.c:26

Referenced by Phase1InitializationDiscard().

◆ HalRequestIpi()

NTHALAPI VOID NTAPI HalRequestIpi ( _In_ KAFFINITY  TargetSet)

◆ HalRequestSoftwareInterrupt()

NTHALAPI VOID FASTCALL HalRequestSoftwareInterrupt ( _In_ KIRQL  SoftwareInterruptRequested)

◆ HalReturnToFirmware()

NTHALAPI VOID NTAPI HalReturnToFirmware ( _In_ FIRMWARE_REENTRY  Action)

Definition at line 51 of file reboot.c.

53 {
54  switch (Action)
55  {
58 
59  case HalHaltRoutine:
60  case HalRebootRoutine:
61 #ifndef _MINIHAL_
62  /* Acquire the display */
64 #endif
65 
66  /* Call the internal reboot function */
67  HalpReboot();
68 
69  /* Anything else */
70  default:
71  /* Print message and break */
72  DbgPrint("HalReturnToFirmware called!\n");
73  DbgBreakPoint();
74  }
75 }
#define DbgPrint
Definition: loader.c:25
void DbgBreakPoint()
Definition: mach.c:553
VOID NTAPI HalpReboot(VOID)
Definition: reboot.c:28
static VOID DECLSPEC_NORETURN NTAPI HalpFreezeSystem(VOID)
Definition: reboot.c:20
_In_ PLIST_ENTRY _In_ PSTRING _In_ USHORT _In_opt_ PSTRING _In_opt_ PSTRING _In_ ULONG _In_ ULONG Action
Definition: fsrtlfuncs.h:738
VOID NTAPI InbvAcquireDisplayOwnership(VOID)
Definition: inbv.c:528

◆ HalSetProfileInterval()

NTHALAPI ULONG_PTR NTAPI HalSetProfileInterval ( _In_ ULONG_PTR  Interval)

Definition at line 58 of file profil.c.

60 {
61  /*
62  * FIXME:
63  * 1) What is the maximum and minimum interrupt frequency for the RTC?
64  * 2) Find the maximum possible clock divisor value.
65  */
67 
68  /* Update interval */
71 
72  /* For now... */
73  return Interval;
74 }
BOOLEAN HalpProfilingStopped
Definition: profil.c:18
VOID NTAPI HalStartProfileInterrupt(IN KPROFILE_SOURCE ProfileSource)
Definition: profil.c:33
DWORD Interval
Definition: netstat.c:33
#define UNIMPLEMENTED
Definition: debug.h:115

◆ HalSetRealTimeClock()

NTHALAPI BOOLEAN NTAPI HalSetRealTimeClock ( _In_ PTIME_FIELDS  RtcTime)

Definition at line 292 of file cmos.c.

294 {
295  UCHAR i, j;
296  UCHAR SysTime[6];
297 
299 
300  HalpRtcWriteCommand(RTC_CMD_REGISTER_SHIFT);
301 
302  SysTime[0] = INT_BCD(Time->Second);
303  SysTime[1] = INT_BCD(Time->Minute);
304  SysTime[2] = INT_BCD(Time->Hour);
305  SysTime[3] = INT_BCD(Time->Day);
306  SysTime[4] = (Time->Month << 4) | (Time->Weekday & 0x0F);
307  SysTime[5] = INT_BCD(Time->Year % 100);
308 
309  /* Write time fields to RTC */
310  for (i = 0; i < 6; i++)
311  {
312  for (j = 0; j < 8; j++)
313  HalpRtcWriteBit(SysTime[i] >> j);
314  }
315 
316  HalpRtcWriteCommand(RTC_CMD_TIME_SET_COUNTER_HOLD);
317  HalpRtcWriteCommand(RTC_CMD_REGISTER_HOLD);
318 
320 
321  return TRUE;
322 }
#define TRUE
Definition: types.h:120
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
VOID NTAPI HalpReleaseCmosSpinLock(VOID)
Definition: spinlock.c:244
#define RTC_CMD_TIME_SET_COUNTER_HOLD
Definition: rtc.h:18
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
VOID NTAPI HalpAcquireCmosSpinLock(VOID)
Definition: spinlock.c:227
#define RTC_CMD_REGISTER_HOLD
Definition: rtc.h:16
unsigned char UCHAR
Definition: xmlstorage.h:181
#define RTC_CMD_REGISTER_SHIFT
Definition: rtc.h:17
#define INT_BCD(int)
Definition: halp.h:31
static PLARGE_INTEGER Time
Definition: time.c:105

◆ HalSetTimeIncrement()

NTHALAPI ULONG NTAPI HalSetTimeIncrement ( _In_ ULONG  Increment)

◆ HalStartProfileInterrupt()

VOID NTAPI HalStartProfileInterrupt ( _In_ KPROFILE_SOURCE  ProfileSource)

Definition at line 41 of file profil.c.

43 {
44  UNREFERENCED_PARAMETER(ProfileSource);
45 
47 
49 
50  /* Configure the clock divisor for generating periodic interrupts */
52 
54 }
BOOLEAN HalpProfilingStopped
Definition: profil.c:18
UCHAR HalpProfileRate
Definition: profil.c:19
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define RTC_IO_o_INT_CLOCK_DIVISOR
Definition: rtc.h:37
PPC_QUAL void __outbyte(unsigned long const Port, const unsigned char Data)
Definition: intrin_ppc.h:605
#define FALSE
Definition: types.h:117
VOID NTAPI HalpReleaseCmosSpinLock(VOID)
Definition: spinlock.c:244
VOID NTAPI HalpAcquireCmosSpinLock(VOID)
Definition: spinlock.c:227

◆ HalStopProfileInterrupt()

NTHALAPI VOID NTAPI HalStopProfileInterrupt ( _In_ KPROFILE_SOURCE  ProfileSource)

Definition at line 24 of file profil.c.

26 {
27  UNREFERENCED_PARAMETER(ProfileSource);
28 
30 
31  /* Clear the interrupt flag */
33 
35 
37 }
BOOLEAN HalpProfilingStopped
Definition: profil.c:18
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
VOID NTAPI HalpReleaseCmosSpinLock(VOID)
Definition: spinlock.c:244
#define RTC_IO_i_INTERRUPT_RESET
Definition: rtc.h:44
VOID NTAPI HalpAcquireCmosSpinLock(VOID)
Definition: spinlock.c:227
#define VOID
Definition: acefi.h:82
PPC_QUAL unsigned char __inbyte(const unsigned long Port)
Definition: intrin_ppc.h:539

◆ HalSystemVectorDispatchEntry()

NTHALAPI UCHAR FASTCALL HalSystemVectorDispatchEntry ( _In_ ULONG  Vector,
_Out_ PKINTERRUPT_ROUTINE **  FlatDispatch,
_Out_ PKINTERRUPT_ROUTINE NoConnection 
)