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.

145 lines
2.8 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. xxacpi.h
  5. Abstract:
  6. This module contains definitions specific to the HAL's
  7. ACPI function.
  8. Author:
  9. Jake Oshins (jakeo) Feb. 18, 1997
  10. Revision History:
  11. Todd Kjos (HP) (v-tkjos) 1-Jun-1998: Initial IA64 port
  12. --*/
  13. #if !defined(_XXACPI_H_)
  14. #define _XXACPI_H_
  15. #include "eisa.h"
  16. #include "ntacpi.h"
  17. //
  18. // General ACPI structures
  19. //
  20. typedef struct {
  21. BOOLEAN GeneralWakeupEnable;
  22. BOOLEAN RtcWakeupEnable;
  23. TIME_FIELDS RtcWakeupTime;
  24. } HAL_WAKEUP_STATE, *PHAL_WAKEUP_STATE;
  25. //
  26. // internal prototypes
  27. //
  28. PVOID
  29. HalpGetAcpiTablePhase0(
  30. IN PLOADER_PARAMETER_BLOCK LoaderBlock,
  31. IN ULONG Signature
  32. );
  33. NTSTATUS
  34. HalpSetupAcpiPhase0(
  35. IN PLOADER_PARAMETER_BLOCK LoaderBlock
  36. );
  37. BOOLEAN
  38. HalpAcpiPreSleep(
  39. SLEEP_STATE_CONTEXT Context
  40. );
  41. NTSTATUS
  42. HaliAcpiFakeSleep(
  43. IN PVOID Context,
  44. IN PENTER_STATE_SYSTEM_HANDLER SystemHandler OPTIONAL,
  45. IN PVOID SystemContext,
  46. IN LONG NumberProcessors,
  47. IN volatile PLONG Number
  48. );
  49. NTSTATUS
  50. HaliAcpiSleep(
  51. IN PVOID Context,
  52. IN PENTER_STATE_SYSTEM_HANDLER SystemHandler OPTIONAL,
  53. IN PVOID SystemContext,
  54. IN LONG NumberProcessors,
  55. IN volatile PLONG Number
  56. );
  57. BOOLEAN
  58. HalpAcpiPostSleep(
  59. ULONG Context
  60. );
  61. NTSTATUS
  62. HaliSetWakeAlarm (
  63. IN ULONGLONG WakeSystemTime,
  64. IN PTIME_FIELDS WakeTimeFields OPTIONAL
  65. );
  66. NTSTATUS
  67. HalpSetWakeAlarm (
  68. IN ULONGLONG WakeSystemTime,
  69. IN PTIME_FIELDS WakeTimeFields OPTIONAL
  70. );
  71. VOID
  72. HaliSetWakeEnable(
  73. IN BOOLEAN Enable
  74. );
  75. VOID
  76. HalpSleepGetProcState(
  77. IN OUT PKPROCESSOR_STATE ProcState
  78. );
  79. BOOLEAN
  80. HalpAcpiPicStateIntact(
  81. VOID
  82. );
  83. VOID
  84. HalpAcpiRestorePicState(
  85. VOID
  86. );
  87. //
  88. // The kernel leaves some space (64 byte) of the PCR for the HAL to use
  89. // as it needs.
  90. //
  91. typedef struct {
  92. ULONG Reserved1; // this space is used by APIC stuff
  93. union {
  94. ULONG AddrAndFlags;
  95. struct {
  96. USHORT Addr;
  97. UCHAR Flags;
  98. UCHAR Spare1;
  99. } ;
  100. } PBlk;
  101. } HALPCR, *PHALPCR;
  102. //
  103. // Global HAL-ACPI stuff
  104. //
  105. extern FADT HalpFixedAcpiDescTable;
  106. extern HAL_WAKEUP_STATE HalpWakeupState;
  107. extern ULONG HalpThrottleScale;
  108. extern SLEEP_STATE_CONTEXT HalpSleepContext;
  109. extern KPROCESSOR_STATE HalpSleepProcState;
  110. extern PUCHAR HalpLowStub;
  111. extern PVOID HalpLowStubPhysicalAddress;
  112. extern PVOID HalpWakeVector;
  113. extern PVOID HalpVirtAddrForFlush;
  114. extern PVOID HalpPteForFlush;
  115. #endif // _XXACPI_X_