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.

84 lines
2.6 KiB

  1. // ACPI register definitions
  2. // PM1_BLK definitions
  3. // PM1_STS register
  4. #define PM1_STS_OFFSET 0x00 // 16 bits
  5. #define PM1_TMR_STS_BIT 0
  6. #define PM1_TMR_STS (1 << PM1_TMR_STS_BIT)
  7. #define PM1_BM_STS_BIT 4
  8. #define PM1_BM_STS (1 << PM1_BM_STS_BIT)
  9. #define PM1_GBL_STS_BIT 5
  10. #define PM1_GBL_STS (1 << PM1_GBL_STS_BIT)
  11. #define PM1_PWRBTN_STS_BIT 8
  12. #define PM1_PWRBTN_STS (1 << PM1_PWRBTN_STS_BIT)
  13. #define PM1_SLEEPBTN_STS_BIT 9
  14. #define PM1_SLEEPBTN_STS (1 << PM1_SLEEPBTN_STS_BIT)
  15. #define PM1_RTC_STS_BIT 10
  16. #define PM1_RTC_STS (1 << PM1_RTC_STS_BIT)
  17. #define PM1_WAK_STS_BIT 15
  18. #define PM1_WAK_STS (1 << PM1_WAK_STS_BIT)
  19. // PM1_EN register
  20. #define PM1_EN_OFFSET 0x02 // 16 bits
  21. #define PM1_TMR_EN_BIT 0
  22. #define PM1_TMR_EN (1 << PM1_TMR_EN_BIT)
  23. #define PM1_GBL_EN_BIT 5
  24. #define PM1_GBL_EN (1 << PM1_GBL_EN_BIT)
  25. #define PM1_PWRBTN_EN_BIT 8
  26. #define PM1_PWRBTN_EN (1 << PM1_PWRBTN_EN_BIT)
  27. #define PM1_SLEEPBTN_EN_BIT 9
  28. #define PM1_SLEEPBTN_EN (1 << PM1_SLEEPBTN_EN_BIT)
  29. #define PM1_RTC_EN_BIT 10
  30. #define PM1_RTC_EN (1 << PM1_RTC_EN_BIT)
  31. // PM1_CNTRL register
  32. #if SPEC_VER < 71
  33. #define PM1_CNTRL_OFFSET 0x04 // 16 bits
  34. #endif
  35. #define PM1_SCI_EN_BIT 0
  36. #define PM1_SCI_EN (1 << PM1_SCI_EN_BIT)
  37. #define PM1_BM_RLD_BIT 1
  38. #define PM1_BM_RLD (1 << PM1_BM_RLD_BIT)
  39. #define PM1_GBL_RLS_BIT 2
  40. #define PM1_GBL_RLS (1 << PM1_GBL_RLS_BIT)
  41. #define PM1_SLP_EN_BIT 13
  42. #define PM1_SLP_EN (1 << PM1_SLP_EN_BIT)
  43. // P_CNTRL regsiter
  44. #define P_CNTRL_OFFSET 0x00 // 32 bits
  45. // P_LVL2 register
  46. #define P_LVL2_OFFSET 0x04 // 8 bits (read only)
  47. // P_LVL2 register
  48. #define P_LVL3_OFFSET 0x05 // 8 bits (read only)
  49. #define P_THT_EN_BIT 0x04
  50. #define P_THT_EN (1 << P_THT_EN_BIT)
  51. #define SLP_CMD (1 << 13) // Write this value to pm control to put the machine to sleep
  52. #define SLP_TYP_POS 10 // Bit position of 3 bit slp typ field in pm control register
  53. // GP register
  54. #define MAX_GPE 256
  55. #define MAX_GPE_BUFFER_SIZE (MAX_GPE/8)