Leaked source code of windows server 2003
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.

198 lines
3.6 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. #if defined(_AMD64_)
  45. ULONG
  46. HalpBuildCr3Identity (VOID);
  47. #endif
  48. //
  49. // internal prototypes
  50. //
  51. PVOID
  52. HalpGetAcpiTablePhase0(
  53. IN PLOADER_PARAMETER_BLOCK LoaderBlock,
  54. IN ULONG Signature
  55. );
  56. BOOLEAN
  57. HalpAcpiPreSleep(
  58. SLEEP_STATE_CONTEXT Context
  59. );
  60. NTSTATUS
  61. HaliAcpiSleep(
  62. IN PVOID Context,
  63. IN PENTER_STATE_SYSTEM_HANDLER SystemHandler OPTIONAL,
  64. IN PVOID SystemContext,
  65. IN LONG NumberProcessors,
  66. IN volatile PLONG Number
  67. );
  68. BOOLEAN
  69. HalpAcpiPostSleep(
  70. ULONG Context
  71. );
  72. NTSTATUS
  73. HaliSetWakeAlarm (
  74. IN ULONGLONG WakeSystemTime,
  75. IN PTIME_FIELDS WakeTimeFields OPTIONAL
  76. );
  77. NTSTATUS
  78. HalpSetWakeAlarm (
  79. IN ULONGLONG WakeSystemTime,
  80. IN PTIME_FIELDS WakeTimeFields OPTIONAL
  81. );
  82. VOID
  83. HaliSetWakeEnable(
  84. IN BOOLEAN Enable
  85. );
  86. VOID
  87. HalpSleepGetProcState(
  88. IN OUT PKPROCESSOR_STATE ProcState
  89. );
  90. BOOLEAN
  91. HalpAcpiPicStateIntact(
  92. VOID
  93. );
  94. ULONG
  95. HalpGetApicVersion(
  96. ULONG ApicNo
  97. );
  98. VOID
  99. HalpResetSBF(
  100. VOID
  101. );
  102. //
  103. // The kernel leaves some space (64 byte) of the PCR for the HAL to use
  104. // as it needs.
  105. //
  106. typedef struct {
  107. ULONG Reserved1; // this space is used by APIC stuff (see pcmp_nt.inc)
  108. union {
  109. ULONG AddrAndFlags;
  110. struct {
  111. USHORT Addr;
  112. UCHAR Flags;
  113. UCHAR Spare1;
  114. } ;
  115. } PBlk;
  116. } HALPMPRCB, *PHALPMPRCB;
  117. //
  118. // Global HAL-ACPI stuff
  119. //
  120. extern FADT HalpFixedAcpiDescTable;
  121. extern PDEBUG_PORT_TABLE HalpDebugPortTable;
  122. extern BOOLEAN HalpProcessedACPIPhase0;
  123. extern HAL_WAKEUP_STATE HalpWakeupState;
  124. extern ULONG HalpThrottleScale;
  125. extern SLEEP_STATE_CONTEXT HalpSleepContext;
  126. extern KPROCESSOR_STATE HalpSleepProcState;
  127. extern PHYSICAL_ADDRESS HalpTiledCR3Address;
  128. extern UCHAR HalpBrokenAcpiTimer;
  129. extern UCHAR HalpPiix4;
  130. extern ULONG HalpPiix4BusNumber;
  131. extern ULONG HalpPiix4SlotNumber;
  132. extern ULONG HalpPiix4DevActB;
  133. extern BOOLEAN HalpBroken440BX;
  134. extern PUCHAR HalpLowStub;
  135. extern PVOID HalpLowStubPhysicalAddress;
  136. extern PVOID HalpWakeVector;
  137. extern PVOID HalpVirtAddrForFlush;
  138. extern PVOID HalpPteForFlush;
  139. extern BOOLEAN HalpCr4Exists;
  140. extern MP_INFO HalpMpInfoTable;
  141. extern PMAPIC HalpApicTable;
  142. extern PBOOT_TABLE HalpSimpleBootFlagTable;
  143. #define PIIX4_THROTTLE_FIX 0x10000
  144. #endif // _XXACPI_H_
  145. /*
  146. endif
  147. ;
  148. ; Begin assembly part of the definitions
  149. ;
  150. include ntacpi.h
  151. ;
  152. ; The kernel leaves some space (64 byte) of the PCR for the HAL to use
  153. ; as it needs.
  154. ;
  155. PrcbE struc
  156. Reserved1 dd 1 ; used in APIC HAL
  157. PcrPblk dd 0 ; PBlk and flags
  158. PrcbE ends
  159. PIIX4_THROTTLE_FIX EQU 10000h
  160. ;*/