Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

192 lines
3.3 KiB

  1. ;/*++
  2. ;
  3. ; Copyright (c) 1997 Microsoft Corporation
  4. ;
  5. ; Module Name:
  6. ;
  7. ; xxacpi.h
  8. ;
  9. ; Abstract:
  10. ;
  11. ;
  12. ; This module contains definitions specific to the HAL's
  13. ; ACPI function.
  14. ;
  15. ; Author:
  16. ;
  17. ; Jake Oshins (jakeo) Feb. 18, 1997
  18. ;
  19. ; Revision History:
  20. ;
  21. ;-
  22. if 0 ; Begin C only code */
  23. #if !defined(_XXACPI_H_)
  24. #define __XACPI_H_
  25. #include "eisa.h"
  26. #include "ntacpi.h"
  27. #include "acpi_mp.inc"
  28. //
  29. // General ACPI structures
  30. //
  31. typedef struct {
  32. BOOLEAN GeneralWakeupEnable;
  33. BOOLEAN RtcWakeupEnable;
  34. TIME_FIELDS RtcWakeupTime;
  35. } HAL_WAKEUP_STATE, *PHAL_WAKEUP_STATE;
  36. ULONG
  37. HalpBuildTiledCR3 (
  38. IN PKPROCESSOR_STATE ProcessorState
  39. );
  40. VOID
  41. HalpFreeTiledCR3 (
  42. VOID
  43. );
  44. //
  45. // internal prototypes
  46. //
  47. PVOID
  48. HalpGetAcpiTablePhase0(
  49. IN PLOADER_PARAMETER_BLOCK LoaderBlock,
  50. IN ULONG Signature
  51. );
  52. BOOLEAN
  53. HalpAcpiPreSleep(
  54. SLEEP_STATE_CONTEXT Context
  55. );
  56. NTSTATUS
  57. HaliAcpiSleep(
  58. IN PVOID Context,
  59. IN PENTER_STATE_SYSTEM_HANDLER SystemHandler OPTIONAL,
  60. IN PVOID SystemContext,
  61. IN LONG NumberProcessors,
  62. IN volatile PLONG Number
  63. );
  64. BOOLEAN
  65. HalpAcpiPostSleep(
  66. ULONG Context
  67. );
  68. NTSTATUS
  69. HaliSetWakeAlarm (
  70. IN ULONGLONG WakeSystemTime,
  71. IN PTIME_FIELDS WakeTimeFields OPTIONAL
  72. );
  73. NTSTATUS
  74. HalpSetWakeAlarm (
  75. IN ULONGLONG WakeSystemTime,
  76. IN PTIME_FIELDS WakeTimeFields OPTIONAL
  77. );
  78. VOID
  79. HaliSetWakeEnable(
  80. IN BOOLEAN Enable
  81. );
  82. VOID
  83. HalpSleepGetProcState(
  84. IN OUT PKPROCESSOR_STATE ProcState
  85. );
  86. BOOLEAN
  87. HalpAcpiPicStateIntact(
  88. VOID
  89. );
  90. ULONG
  91. HalpGetApicVersion(
  92. ULONG ApicNo
  93. );
  94. VOID
  95. HalpResetSBF(
  96. VOID
  97. );
  98. //
  99. // The kernel leaves some space (64 byte) of the PCR for the HAL to use
  100. // as it needs.
  101. //
  102. typedef struct {
  103. ULONG Reserved1; // this space is used by APIC stuff (see pcmp_nt.inc)
  104. union {
  105. ULONG AddrAndFlags;
  106. struct {
  107. USHORT Addr;
  108. UCHAR Flags;
  109. UCHAR Spare1;
  110. } ;
  111. } PBlk;
  112. } HALPMPRCB, *PHALPMPRCB;
  113. //
  114. // Global HAL-ACPI stuff
  115. //
  116. extern FADT HalpFixedAcpiDescTable;
  117. extern PDEBUG_PORT_TABLE HalpDebugPortTable;
  118. extern BOOLEAN HalpProcessedACPIPhase0;
  119. extern HAL_WAKEUP_STATE HalpWakeupState;
  120. extern ULONG HalpThrottleScale;
  121. extern SLEEP_STATE_CONTEXT HalpSleepContext;
  122. extern KPROCESSOR_STATE HalpSleepProcState;
  123. extern PHYSICAL_ADDRESS HalpTiledCR3Address;
  124. extern UCHAR HalpBrokenAcpiTimer;
  125. extern UCHAR HalpPiix4;
  126. extern ULONG HalpPiix4BusNumber;
  127. extern ULONG HalpPiix4SlotNumber;
  128. extern ULONG HalpPiix4DevActB;
  129. extern BOOLEAN HalpBroken440BX;
  130. extern PUCHAR HalpLowStub;
  131. extern PVOID HalpLowStubPhysicalAddress;
  132. extern PVOID HalpWakeVector;
  133. extern PVOID HalpVirtAddrForFlush;
  134. extern PVOID HalpPteForFlush;
  135. extern BOOLEAN HalpCr4Exists;
  136. extern MP_INFO HalpMpInfoTable;
  137. extern PMAPIC HalpApicTable;
  138. extern PBOOT_TABLE HalpSimpleBootFlagTable;
  139. #define PIIX4_THROTTLE_FIX 0x10000
  140. #endif // _XXACPI_H_
  141. /*
  142. endif
  143. ;
  144. ; Begin assembly part of the definitions
  145. ;
  146. include ntacpi.h
  147. ;
  148. ; The kernel leaves some space (64 byte) of the PCR for the HAL to use
  149. ; as it needs.
  150. ;
  151. PrcbE struc
  152. Reserved1 dd 1 ; used in APIC HAL
  153. PcrPblk dd 0 ; PBlk and flags
  154. PrcbE ends
  155. PIIX4_THROTTLE_FIX EQU 10000h
  156. ;*/