PchRegsPcu.h 76 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201
  1. /*++
  2. Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved
  3. SPDX-License-Identifier: BSD-2-Clause-Patent
  4. Module Name:
  5. PchRegsPcu.h
  6. Abstract:
  7. Register names for VLV PCU device.
  8. Conventions:
  9. - Prefixes:
  10. Definitions beginning with "R_" are registers
  11. Definitions beginning with "B_" are bits within registers
  12. Definitions beginning with "V_" are meaningful values of bits within the registers
  13. Definitions beginning with "S_" are register sizes
  14. Definitions beginning with "N_" are the bit position
  15. - In general, PCH registers are denoted by "_PCH_" in register names
  16. - Registers / bits that are different between PCH generations are denoted by
  17. "_PCH_<generation_name>_" in register/bit names. e.g., "_PCH_VLV_"
  18. - Registers / bits that are different between SKUs are denoted by "_<SKU_name>"
  19. at the end of the register/bit names
  20. - Registers / bits of new devices introduced in a PCH generation will be just named
  21. as "_PCH_" without <generation_name> inserted.
  22. --*/
  23. #ifndef _PCH_REGS_LPC_H_
  24. #define _PCH_REGS_LPC_H_
  25. //
  26. // VLV PCU Registers (D31:F0)
  27. //
  28. #define PCI_DEVICE_NUMBER_PCH_LPC 31
  29. #define PCI_FUNCTION_NUMBER_PCH_LPC 0
  30. // Silicon Steppings
  31. typedef enum {
  32. PchA0 = 0,
  33. PchA1 = 1,
  34. PchB0 = 2,
  35. PchB1 = 3,
  36. PchB2 = 4,
  37. PchB3 = 5,
  38. PchC0 = 6,
  39. PchD0 = 7,
  40. PchSteppingMax
  41. } PCH_STEPPING;
  42. #define R_PCH_LPC_REG_ID 0x00 // Identifiers Register
  43. #define B_PCH_LPC_DEVICE_ID 0xFFFF0000 // Device Identification
  44. #define B_PCH_LPC_VENDOR_ID 0x0000FFFF // Vendor Identification
  45. #define V_PCH_LPC_VENDOR_ID V_PCH_INTEL_VENDOR_ID // Vendor ID for Intel
  46. //
  47. // General VLV PCU Device ID
  48. //
  49. #define V_PCH_LPC_DEVICE_ID_0 0x0F1C
  50. #define V_PCH_LPC_DEVICE_ID_1 0x0F1D
  51. #define V_PCH_LPC_DEVICE_ID_2 0x0F1E
  52. #define V_PCH_LPC_DEVICE_ID_3 0x0F1F
  53. #define R_PCH_LPC_COMMAND 0x04 // Command
  54. #define B_PCH_LPC_COMMAND_ID BIT10 // Interrupt Disable
  55. #define B_PCH_LPC_COMMAND_FBE BIT9 // Fast Back to Back Enable
  56. #define B_PCH_LPC_COMMAND_SERR_EN BIT8 // SERR# Enable
  57. #define B_PCH_LPC_COMMAND_WCC BIT7 // Wait Cycle Control
  58. #define B_PCH_LPC_COMMAND_PER BIT6 // Parity Error Response Enable
  59. #define B_PCH_LPC_COMMAND_VPS BIT5 // VGA Palette Snoop
  60. #define B_PCH_LPC_COMMAND_MWIE BIT4 // Memory Write and Invalidate Enable
  61. #define B_PCH_LPC_COMMAND_SCE BIT3 // Special Cycle Enable
  62. #define B_PCH_LPC_COMMAND_BME BIT2 // Bus Master Enable
  63. #define B_PCH_LPC_COMMAND_MSE BIT1 // Memory Space Enable
  64. #define B_PCH_LPC_COMMAND_IOSE BIT0 // I/O Space Enable
  65. #define R_PCH_LPC_DEV_STS 0x06 // Status
  66. #define B_PCH_LPC_DEV_STS_DPE BIT15 // Detected Parity Error
  67. #define B_PCH_LPC_DEV_STS_SSE BIT14 // Signaled System Error
  68. #define B_PCH_LPC_DEV_STS_RMA BIT13 // Received Master Abort
  69. #define B_PCH_LPC_DEV_STS_RTA BIT12 // Received Target Abort
  70. #define B_PCH_LPC_DEV_STS_STA BIT11 // Signaled Target Abort
  71. #define B_PCH_LPC_DEV_STS_DEVT_STS (BIT10 | BIT9) // DEVSEL# Timing Status
  72. #define B_PCH_LPC_DEV_STS_MDPED BIT8 // Data Parity Error
  73. #define B_PCH_LPC_DEV_STS_FB2B BIT7 // Fast Back to Back Capable
  74. #define B_PCH_LPC_DEV_STS_66MHZ_CAP BIT5 // 66 MHz capable
  75. #define B_PCH_LPC_DEV_STS_CAP_LIST BIT4 // Capabilities List
  76. #define B_PCH_LPC_DEV_STS_INT_STS BIT3 // Interrupt Status
  77. #define R_PCH_LPC_RID_CC 0x08 // Revision ID & Class Code
  78. #define B_PCH_LPC_RID_CC_BCC 0xFF000000 // Base Class Code
  79. #define B_PCH_LPC_RID_CC_SCC 0x00FF0000 // Sub-Class Code
  80. #define B_PCH_LPC_RID_CC_PI 0x0000FF00 // Programming Interface
  81. #define B_PCH_LPC_RID_CC_RID 0x000000FF // Revision ID
  82. // Silicon Steppings
  83. #define V_PCH_LPC_RID_0 0x01 // A0 Stepping (17 x 17)
  84. #define V_PCH_LPC_RID_1 0x02 // A0 Stepping (25 x 27)
  85. #define V_PCH_LPC_RID_2 0x03 // A1 Stepping (17 x 17)
  86. #define V_PCH_LPC_RID_3 0x04 // A1 Stepping (25 x 27)
  87. #define V_PCH_LPC_RID_4 0x05 // B0 Stepping (17 x 17)
  88. #define V_PCH_LPC_RID_5 0x06 // B0 Stepping (25 x 27)
  89. #define V_PCH_LPC_RID_6 0x07 // B1 Stepping (17 x 17)
  90. #define V_PCH_LPC_RID_7 0x08 // B1 Stepping (25 x 27)
  91. #define V_PCH_LPC_RID_8 0x09 // B2 Stepping (17 x 17)
  92. #define V_PCH_LPC_RID_9 0x0A // B2 Stepping (25 x 27)
  93. #define V_PCH_LPC_RID_A 0x0B // B3 Stepping (17 x 17)
  94. #define V_PCH_LPC_RID_B 0x0C // B3 Stepping (25 x 27)
  95. #define V_PCH_LPC_RID_C 0x0D // C0 Stepping (17 x 17)
  96. #define V_PCH_LPC_RID_D 0x0E // C0 Stepping (25 x 27)
  97. #define V_PCH_LPC_RID_E 0x10 // D0 Stepping (17 x 17)
  98. #define V_PCH_LPC_RID_F 0x11 // D0 Stepping (25 x 27)
  99. #define R_PCH_LPC_MLT 0x0D // Master Latency Timer
  100. #define B_PCH_LPC_MLT_MLC 0xF8 // Master Latency Count
  101. #define R_PCH_LPC_HEADTYP 0x0E // Header Type
  102. #define B_PCH_LPC_HEADTYP_MFD BIT7 // Multi-function Device
  103. #define B_PCH_LPC_HEADTYP_HT 0x7F // Header Type
  104. #define R_PCH_LPC_SS 0x2C // Subsystem ID & Vendor ID
  105. #define B_PCH_LPC_SS_SSID 0xFFFF0000 // Subsystem ID
  106. #define B_PCH_LPC_SS_SSVID 0x0000FFFF // Subsystem Vendor ID
  107. #define R_PCH_LPC_CAP_LIST 0x34 // Capability List
  108. #define B_PCH_LPC_CAP_LIST_CP 0xFF // Capability Pointer
  109. #define R_PCH_LPC_ACPI_BASE 0x40 // ABASE, 16bit
  110. #define B_PCH_LPC_ACPI_BASE_BAR 0x0000FF80 // Base Address, 128 Bytes
  111. #define B_PCH_LPC_ACPI_BASE_EN BIT1 // Enable Bit
  112. #define B_PCH_LPC_ACPI_BASE_MEMI BIT0 // Memory Space Indication
  113. #define R_PCH_LPC_PMC_BASE 0x44 // PBASE, 32bit, 512 Bytes
  114. #define B_PCH_LPC_PMC_BASE_BAR 0xFFFFFE00 // Base Address
  115. #define B_PCH_LPC_PMC_BASE_PREF BIT3 // Prefetchable
  116. #define B_PCH_LPC_PMC_BASE_ADDRNG BIT2 // Address Range
  117. #define B_PCH_LPC_PMC_BASE_EN BIT1 // Enable Bit
  118. #define B_PCH_LPC_PMC_BASE_MEMI BIT0 // Memory Space Indication
  119. #define R_PCH_LPC_GPIO_BASE 0x48 // GBASE, 16bit
  120. #define B_PCH_LPC_GPIO_BASE_BAR 0xFF00 // Base Address, 256 Bytes
  121. #define B_PCH_LPC_GPIO_BASE_EN BIT1 // Enable Bit
  122. #define B_PCH_LPC_GPIO_BASE_MEMI BIT0 // Memory Space Indication
  123. #define R_PCH_LPC_IO_BASE 0x4C // IOBASE, 32bit
  124. #define B_PCH_LPC_IO_BASE_BAR 0xFFFFC000 // Base Address, 16 KiloBytes
  125. #define B_PCH_LPC_IO_BASE_PREF BIT3 // Prefetchable
  126. #define B_PCH_LPC_IO_BASE_ADDRNG BIT2 // Address Range
  127. #define B_PCH_LPC_IO_BASE_EN BIT1 // Enable Bit
  128. #define B_PCH_LPC_IO_BASE_MEMI BIT0 // Memory Space Indication
  129. #define R_PCH_LPC_ILB_BASE 0x50 // IBASE, 32bit
  130. #define B_PCH_LPC_ILB_BASE_BAR 0xFFFFFE00 // Base Address, 512 bytes
  131. #define B_PCH_LPC_ILB_BASE_PREF BIT3 // Prefetchable
  132. #define B_PCH_LPC_ILB_BASE_ADDRNG BIT2 // Address Range
  133. #define B_PCH_LPC_ILB_BASE_EN BIT1 // Enable Bit
  134. #define B_PCH_LPC_ILB_BASE_MEMI BIT0 // Memory Space Indication
  135. #define R_PCH_LPC_SPI_BASE 0x54 // SBASE, 32bit
  136. #define B_PCH_LPC_SPI_BASE_BAR 0xFFFFFE00 // Base Address, 512 bytes
  137. #define B_PCH_LPC_SPI_BASE_PREF BIT3 // Prefetchable
  138. #define B_PCH_LPC_SPI_BASE_ADDRNG BIT2 // Address Range
  139. #define B_PCH_LPC_SPI_BASE_EN BIT1 // Enable Bit
  140. #define B_PCH_LPC_SPI_BASE_MEMI BIT0 // Memory Space Indicator
  141. #define R_PCH_LPC_MPHY_BASE 0x58 // MPBASE, 32bit
  142. #define B_PCH_LPC_MPHY_BASE_BAR 0xFFF00000 // Base Address, 1 MegaByte
  143. #define B_PCH_LPC_MPHY_BASE_PREF BIT3 // Prefetchable
  144. #define B_PCH_LPC_MPHY_BASE_ADDRNG BIT2 // Address Range
  145. #define B_PCH_LPC_MPHY_BASE_EN BIT1 // Enable Bit
  146. #define B_PCH_LPC_MPHY_BASE_MEMI BIT0 // Memory Space Indicator
  147. #define R_PCH_LPC_PUNIT_BASE 0x5C // PUBASE, 32bit
  148. #define B_PCH_LPC_PUNIT_BASE_BAR 0xFFFFF800 // Base Address, 2K bytes
  149. #define B_PCH_LPC_PUNIT_BASE_PREF BIT3 // Prefetchable
  150. #define B_PCH_LPC_PUNIT_BASE_ADDRNG BIT2 // Address Range
  151. #define B_PCH_LPC_PUNIT_BASE_EN BIT1 // Enable Bit
  152. #define B_PCH_LPC_PUNIT_BASE_MEMI BIT0 // Memory Space Indicator
  153. #define R_PCH_LPC_UART_CTRL 0x80 // UART Control
  154. #define B_PCH_LPC_UART_CTRL_COM1_EN BIT0 // COM1 Enable
  155. #define R_PCH_LPC_FWH_BIOS_DEC 0xD8 // BIOS Decode Enable
  156. #define B_PCH_LPC_FWH_BIOS_DEC_EF8 BIT15 // F8-FF Enable
  157. #define B_PCH_LPC_FWH_BIOS_DEC_EF0 BIT14 // F0-F8 Enable
  158. #define B_PCH_LPC_FWH_BIOS_DEC_EE8 BIT13 // E8-EF Enable
  159. #define B_PCH_LPC_FWH_BIOS_DEC_EE0 BIT12 // E0-E8 Enable
  160. #define B_PCH_LPC_FWH_BIOS_DEC_ED8 BIT11 // D8-DF Enable
  161. #define B_PCH_LPC_FWH_BIOS_DEC_ED0 BIT10 // D0-D8 Enable
  162. #define B_PCH_LPC_FWH_BIOS_DEC_EC8 BIT9 // C8-CF Enable
  163. #define B_PCH_LPC_FWH_BIOS_DEC_EC0 BIT8 // C0-C8 Enable
  164. #define B_PCH_LPC_FWH_BIOS_DEC_LFE BIT7 // Legacy F Segment Enable
  165. #define B_PCH_LPC_FWH_BIOS_DEC_LEE BIT6 // Legacy E Segment Enable
  166. #define B_PCH_LPC_FWH_BIOS_DEC_E70 BIT3 // 70-7F Enable
  167. #define B_PCH_LPC_FWH_BIOS_DEC_E60 BIT2 // 60-6F Enable
  168. #define B_PCH_LPC_FWH_BIOS_DEC_E50 BIT1 // 50-5F Enable
  169. #define B_PCH_LPC_FWH_BIOS_DEC_E40 BIT0 // 40-4F Enable
  170. #define R_PCH_LPC_FDCAP 0xE0 // Feature Detection Capability ID
  171. #define B_PCH_LPC_FDCAP_NEXT 0xFF00 // Next Capability
  172. #define B_PCH_LPC_FDCAP_CAPID 0x00FF // Capability ID
  173. #define R_PCH_LPC_FDLEN 0xE2 // Feature Detection Capability Length
  174. #define B_PCH_LPC_FDLEN_CAPLEN 0xFF // Capability Length
  175. #define R_PCH_LPC_FDVER 0xE3 // Feature Detection Capability Version
  176. #define B_PCH_LPC_FDVER_VSCID 0xF0 // Vendor Specific Capability ID
  177. #define B_PCH_LPC_FDVER_CAPVER 0x0F // Capability Version
  178. #define R_PCH_LPC_FVECTIDX 0xE4 // Feature Vector Index
  179. #define R_PCH_LPC_FVECTD 0xE8 // Feature Vector Data
  180. #define R_PCH_LPC_RCBA 0xF0 // RCBA, 32bit
  181. #define B_PCH_LPC_RCBA_BAR 0xFFFFFC00 // Base Address, 1 KiloByte
  182. #define B_PCH_LPC_RCBA_EN BIT0 // Enable Bit
  183. #define R_PCH_LPC_ULT_OBS 0xF4 // ULT Observability
  184. #define B_PCH_LPC_ULT_OBS_WNUM 0x3FF000 // Reserved Wafer Number
  185. #define B_PCH_LPC_ULT_OBS_XLOC 0xFC0 // Reserved X Loc
  186. #define B_PCH_LPC_ULT_OBS_YLOC 0x3F // Reserved Y Loc
  187. #define R_PCH_LPC_MAN_ID 0xF8 // Manufacturer ID
  188. #define B_PCH_LPC_MAN_ID_DPID 0xF000000 // Dot Portion of Process ID
  189. #define B_PCH_LPC_MAN_ID_MSID 0xFF0000 // Manufacturing Stepping Identifier
  190. #define B_PCH_LPC_MAN_ID_MID 0xFF00 // Manufacturing Identifier
  191. #define B_PCH_LPC_MAN_ID_PPID 0xFF // Process Portion of Process ID
  192. #define R_PCH_LPC_CGC 0xFC // Clock Gating Control
  193. #define B_PCH_LPC_CGC_SBLCG BIT9 // IOSF-SB Local Clock Gating Disable
  194. #define B_PCH_LPC_CGC_SBTCG BIT8 // IOSF-SB Trunk Clock Gating (Request) Disable
  195. #define B_PCH_LPC_CGC_PRILCG BIT1 // IOSF-PRI Local Clock Gating Disable
  196. #define B_PCH_LPC_CGC_PRITCG BIT0 // IOSF-PRI Trunk Clock Gating (Request) Disable
  197. //
  198. // iLB Memory Space Registers (IBASE)
  199. //
  200. #define R_PCH_ILB_ACPI_CNT 0x00 // ACPI Control
  201. #define B_PCH_ILB_ACPI_CNT_SCI_IRQ_SEL (BIT2 | BIT1 | BIT0) // SCI IRQ Select
  202. #define V_PCH_ILB_ACPI_CNT_SCI_IRQ_9 0 // IRQ9
  203. #define V_PCH_ILB_ACPI_CNT_SCI_IRQ_10 BIT0 // IRQ10
  204. #define V_PCH_ILB_ACPI_CNT_SCI_IRQ_11 BIT1 // IRQ11
  205. #define V_PCH_ILB_ACPI_CNT_SCI_IRQ_20 BIT2 // IRQ20 (Only if APIC enabled)
  206. #define V_PCH_ILB_ACPI_CNT_SCI_IRQ_21 (BIT2 | BIT0) // IRQ21 (Only if APIC enabled)
  207. #define V_PCH_ILB_ACPI_CNT_SCI_IRQ_22 (BIT2 | BIT1) // IRQ22 (Only if APIC enabled)
  208. #define V_PCH_ILB_ACPI_CNT_SCI_IRQ_23 (BIT2 | BIT1 | BIT0) // IRQ23 (Only if APIC enabled)
  209. #define R_PCH_ILB_MC 0x04 // Miscellaneous Control
  210. #define B_PCH_ILB_MC_DRTC BIT3 // Disable RTC
  211. #define B_PCH_ILB_MC_D8259 BIT2 // Disable 8259
  212. #define B_PCH_ILB_MC_D8254 BIT1 // Disable 8254
  213. #define B_PCH_ILB_MC_AME BIT0 // Alternate Access Mode Enable
  214. #define R_PCH_ILB_PIRQA_ROUT 0x08 // PIRQA Routing Control
  215. #define R_PCH_ILB_PIRQB_ROUT 0x09 // PIRQB Routing Control
  216. #define R_PCH_ILB_PIRQC_ROUT 0x0A // PIRQC Routing Control
  217. #define R_PCH_ILB_PIRQD_ROUT 0x0B // PIRQD Routing Control
  218. #define R_PCH_ILB_PIRQE_ROUT 0x0C // PIRQE Routing Control
  219. #define R_PCH_ILB_PIRQF_ROUT 0x0D // PIRQF Routing Control
  220. #define R_PCH_ILB_PIRQG_ROUT 0x0E // PIRQG Routing Control
  221. #define R_PCH_ILB_PIRQH_ROUT 0x0F // PIRQH Routing Control
  222. //
  223. // Bit values are the same for R_PCH_ILB_PIRQA_ROUT to R_PCH_ILB_PIRQH_ROUT
  224. //
  225. #define B_PCH_ILB_PIRQX_ROUT_IRQEN BIT7 // Interrupt Routing Enable
  226. #define B_PCH_ILB_PIRQX_ROUT 0x0F // IRQ Routing
  227. #define V_PCH_ILB_PIRQX_ROUT_IRQ_3 0x03 // Route to IRQ3
  228. #define V_PCH_ILB_PIRQX_ROUT_IRQ_4 0x04 // Route to IRQ4
  229. #define V_PCH_ILB_PIRQX_ROUT_IRQ_5 0x05 // Route to IRQ5
  230. #define V_PCH_ILB_PIRQX_ROUT_IRQ_6 0x06 // Route to IRQ6
  231. #define V_PCH_ILB_PIRQX_ROUT_IRQ_7 0x07 // Route to IRQ7
  232. #define V_PCH_ILB_PIRQX_ROUT_IRQ_9 0x09 // Route to IRQ9
  233. #define V_PCH_ILB_PIRQX_ROUT_IRQ_10 0x0A // Route to IRQ10
  234. #define V_PCH_ILB_PIRQX_ROUT_IRQ_11 0x0B // Route to IRQ11
  235. #define V_PCH_ILB_PIRQX_ROUT_IRQ_12 0x0C // Route to IRQ12
  236. #define V_PCH_ILB_PIRQX_ROUT_IRQ_14 0x0E // Route to IRQ14
  237. #define V_PCH_ILB_PIRQX_ROUT_IRQ_15 0x0F // Route to IRQ15
  238. #define R_PCH_ILB_SERIRQ_CNT 0x10 // Serial IRQ Control
  239. #define B_PCH_ILB_SERIRQ_CNT_SIRQMD BIT7 // Mode
  240. #define R_PCH_ILB_ULKMC 0x14 // USB Legacy Keyboard / Mouse Control
  241. #define B_PCH_ILB_ULKMC_TRAPBY64W BIT11 // SMI Caused by Port 64 Write
  242. #define B_PCH_ILB_ULKMC_TRAPBY64R BIT10 // SMI Caused by Port 64 Read
  243. #define B_PCH_ILB_ULKMC_TRAPBY60W BIT9 // SMI Caused by Port 60 Write
  244. #define B_PCH_ILB_ULKMC_TRAPBY60R BIT8 // SMI Caused by Port 60 Read
  245. #define B_PCH_ILB_ULKMC_64WEN BIT3 // SMI on Port 64 Writes Enable
  246. #define B_PCH_ILB_ULKMC_64REN BIT2 // SMI on Port 64 Reads Enable
  247. #define B_PCH_ILB_ULKMC_60WEN BIT1 // SMI on Port 60 Writes Enable
  248. #define B_PCH_ILB_ULKMC_60REN BIT0 // SMI on Port 60 Reads Enable
  249. #define R_PCH_ILB_FWH_BIOS_SEL 0x18 // FWH ID Select
  250. #define B_PCH_ILB_FWH_BIOS_SEL_F8 0xF0000000 // F8-FF ID Select
  251. #define B_PCH_ILB_FWH_BIOS_SEL_F0 0x0F000000 // F0-F7 ID Select
  252. #define B_PCH_ILB_FWH_BIOS_SEL_E8 0x00F00000 // E8-EF ID Select
  253. #define B_PCH_ILB_FWH_BIOS_SEL_E0 0x000F0000 // E0-E7 ID Select
  254. #define B_PCH_ILB_FWH_BIOS_SEL_D8 0x0000F000 // D8-DF ID Select
  255. #define B_PCH_ILB_FWH_BIOS_SEL_D0 0x00000F00 // D0-D7 ID Select
  256. #define B_PCH_ILB_FWH_BIOS_SEL_C8 0x000000F0 // C8-CF ID Select
  257. #define B_PCH_ILB_FWH_BIOS_SEL_C0 0x0000000F // C0-C7 ID Select
  258. #define R_PCH_ILB_BIOS_CNTL 0x1C // BIOS Control
  259. #define S_PCH_ILB_BIOS_CNTL 4
  260. #define B_PCH_ILB_BIOS_CNTL_PFE BIT8 // Prefetch Enable
  261. #define B_PCH_ILB_BIOS_CNTL_LE BIT1 // Lock Enable
  262. #define N_PCH_ILB_BIOS_CNTL_LE 1
  263. #define B_PCH_ILB_BIOS_CNTL_WP BIT0 // Write Protect
  264. #define R_PCH_ILB_D0IR 0x20 // Device 0 Interrupt Route
  265. #define R_PCH_ILB_D1IR 0x22 // Device 1 Interrupt Route
  266. #define R_PCH_ILB_D2IR 0x24 // Device 2 Interrupt Route
  267. #define R_PCH_ILB_D3IR 0x26 // Device 3 Interrupt Route
  268. #define R_PCH_ILB_D4IR 0x28 // Device 4 Interrupt Route
  269. #define R_PCH_ILB_D5IR 0x2A // Device 5 Interrupt Route
  270. #define R_PCH_ILB_D6IR 0x2C // Device 6 Interrupt Route
  271. #define R_PCH_ILB_D7IR 0x2E // Device 7 Interrupt Route
  272. #define R_PCH_ILB_D8IR 0x30 // Device 8 Interrupt Route
  273. #define R_PCH_ILB_D9IR 0x32 // Device 9 Interrupt Route
  274. #define R_PCH_ILB_D10IR 0x34 // Device 10 Interrupt Route
  275. #define R_PCH_ILB_D11IR 0x36 // Device 11 Interrupt Route
  276. #define R_PCH_ILB_D12IR 0x38 // Device 12 Interrupt Route
  277. #define R_PCH_ILB_D13IR 0x3A // Device 13 Interrupt Route
  278. #define R_PCH_ILB_D14IR 0x3C // Device 14 Interrupt Route
  279. #define R_PCH_ILB_D15IR 0x3E // Device 15 Interrupt Route
  280. #define R_PCH_ILB_D16IR 0x40 // Device 16 Interrupt Route
  281. #define R_PCH_ILB_D17IR 0x42 // Device 17 Interrupt Route
  282. #define R_PCH_ILB_D18IR 0x44 // Device 18 Interrupt Route
  283. #define R_PCH_ILB_D19IR 0x46 // Device 19 Interrupt Route
  284. #define R_PCH_ILB_D20IR 0x48 // Device 20 Interrupt Route
  285. #define R_PCH_ILB_D21IR 0x4A // Device 21 Interrupt Route
  286. #define R_PCH_ILB_D22IR 0x4C // Device 22 Interrupt Route
  287. #define R_PCH_ILB_D23IR 0x4E // Device 23 Interrupt Route
  288. #define R_PCH_ILB_D24IR 0x50 // Device 24 Interrupt Route
  289. #define R_PCH_ILB_D25IR 0x52 // Device 25 Interrupt Route
  290. #define R_PCH_ILB_D26IR 0x54 // Device 26 Interrupt Route
  291. #define R_PCH_ILB_D27IR 0x56 // Device 27 Interrupt Route
  292. #define R_PCH_ILB_D28IR 0x58 // Device 28 Interrupt Route
  293. #define R_PCH_ILB_D29IR 0x5A // Device 29 Interrupt Route
  294. #define R_PCH_ILB_D30IR 0x5C // Device 30 Interrupt Route
  295. #define R_PCH_ILB_D31IR 0x5E // Device 31 Interrupt Route
  296. #define B_PCH_ILB_DXXIR_IDR_MASK (BIT14 | BIT13 | BIT12) // INTD Mask
  297. #define V_PCH_ILB_DXXIR_IDR_PIRQA 0 // INTD Mapping to IRQ A
  298. #define V_PCH_ILB_DXXIR_IDR_PIRQB BIT12 // INTD Mapping to IRQ B
  299. #define V_PCH_ILB_DXXIR_IDR_PIRQC BIT13 // INTD Mapping to IRQ C
  300. #define V_PCH_ILB_DXXIR_IDR_PIRQD (BIT13 | BIT12) // INTD Mapping to IRQ D
  301. #define V_PCH_ILB_DXXIR_IDR_PIRQE BIT14 // INTD Mapping to IRQ E
  302. #define V_PCH_ILB_DXXIR_IDR_PIRQF (BIT14 | BIT12) // INTD Mapping to IRQ F
  303. #define V_PCH_ILB_DXXIR_IDR_PIRQG (BIT14 | BIT13) // INTD Mapping to IRQ G
  304. #define V_PCH_ILB_DXXIR_IDR_PIRQH (BIT14 | BIT13 | BIT12) // INTD Mapping to IRQ H
  305. #define B_PCH_ILB_DXXIR_ICR_MASK (BIT10 | BIT9 | BIT8) // INTC Mask
  306. #define V_PCH_ILB_DXXIR_ICR_PIRQA 0 // INTC Mapping to IRQ A
  307. #define V_PCH_ILB_DXXIR_ICR_PIRQB BIT8 // INTC Mapping to IRQ B
  308. #define V_PCH_ILB_DXXIR_ICR_PIRQC BIT9 // INTC Mapping to IRQ C
  309. #define V_PCH_ILB_DXXIR_ICR_PIRQD (BIT9 | BIT8) // INTC Mapping to IRQ D
  310. #define V_PCH_ILB_DXXIR_ICR_PIRQE BIT10 // INTC Mapping to IRQ E
  311. #define V_PCH_ILB_DXXIR_ICR_PIRQF (BIT10 | BIT8) // INTC Mapping to IRQ F
  312. #define V_PCH_ILB_DXXIR_ICR_PIRQG (BIT10 | BIT9) // INTC Mapping to IRQ G
  313. #define V_PCH_ILB_DXXIR_ICR_PIRQH (BIT10 | BIT9 | BIT8) // INTC Mapping to IRQ H
  314. #define B_PCH_ILB_DXXIR_IBR_MASK (BIT6 | BIT5 | BIT4) // INTB Mask
  315. #define V_PCH_ILB_DXXIR_IBR_PIRQA 0 // INTB Mapping to IRQ A
  316. #define V_PCH_ILB_DXXIR_IBR_PIRQB BIT4 // INTB Mapping to IRQ B
  317. #define V_PCH_ILB_DXXIR_IBR_PIRQC BIT5 // INTB Mapping to IRQ C
  318. #define V_PCH_ILB_DXXIR_IBR_PIRQD (BIT5 | BIT4) // INTB Mapping to IRQ D
  319. #define V_PCH_ILB_DXXIR_IBR_PIRQE BIT6 // INTB Mapping to IRQ E
  320. #define V_PCH_ILB_DXXIR_IBR_PIRQF (BIT6 | BIT4) // INTB Mapping to IRQ F
  321. #define V_PCH_ILB_DXXIR_IBR_PIRQG (BIT6 | BIT5) // INTB Mapping to IRQ G
  322. #define V_PCH_ILB_DXXIR_IBR_PIRQH (BIT6 | BIT5 | BIT4) // INTB Mapping to IRQ H
  323. #define B_PCH_ILB_DXXIR_IAR_MASK (BIT2 | BIT1 | BIT0) // INTA Mask
  324. #define V_PCH_ILB_DXXIR_IAR_PIRQA 0 // INTA Mapping to IRQ A
  325. #define V_PCH_ILB_DXXIR_IAR_PIRQB BIT0 // INTA Mapping to IRQ B
  326. #define V_PCH_ILB_DXXIR_IAR_PIRQC BIT1 // INTA Mapping to IRQ C
  327. #define V_PCH_ILB_DXXIR_IAR_PIRQD (BIT1 | BIT0) // INTA Mapping to IRQ D
  328. #define V_PCH_ILB_DXXIR_IAR_PIRQE BIT2 // INTA Mapping to IRQ E
  329. #define V_PCH_ILB_DXXIR_IAR_PIRQF (BIT2 | BIT0) // INTA Mapping to IRQ F
  330. #define V_PCH_ILB_DXXIR_IAR_PIRQG (BIT2 | BIT1) // INTA Mapping to IRQ G
  331. #define V_PCH_ILB_DXXIR_IAR_PIRQH (BIT2 | BIT1 | BIT0) // INTA Mapping to IRQ H
  332. #define R_PCH_ILB_OIC 0x60 // Other Interrupt Controller
  333. #define B_PCH_ILB_OIC_SIRQEN BIT12 // Serial IRQ Enable
  334. #define B_PCH_ILB_OIC_AEN BIT8 // APIC Enable
  335. #define R_PCH_ILB_RTC_CONF 0x64 // RTC Control
  336. #define B_PCH_ILB_RTC_CONF_UCMOS_LOCK BIT1 // Upper 128 Byte Lock
  337. #define B_PCH_ILB_RTC_CONF_LCMOS_LOCK BIT0 // Lower 128 Byte Lock
  338. #define R_PCH_ILB_RTM 0x68 // RTC Test Mode
  339. #define B_PCH_ILB_RTM_RTM1 (BIT2 | BIT1 | BIT0)
  340. #define R_PCH_ILB_BCS 0x6C // BIOS Control Status
  341. #define B_PCH_ILB_BCS_SMIWPEN BIT1 // SMI WPD Enable
  342. #define B_PCH_ILB_BCS_SMIWPST BIT0 // SMI WPD Status
  343. #define R_PCH_ILB_LE 0x70 // LE
  344. #define B_PCH_ILB_LE_IRQ12C BIT1 // IRQ12 Cause
  345. #define B_PCH_ILB_LE_IRQ1C BIT0 // IRQ1 Cause
  346. #define R_PCH_ILB_RTCC 0x74 // RTC HIP Configuration
  347. #define B_PCH_ILB_RTCC_RTCB4 BIT6 // RTC Bias Resistor 4, Adds 480 Kohm
  348. #define B_PCH_ILB_RTCC_RTCB3 BIT5 // RTC Bias Resistor 3, Adds 240 Kohm
  349. #define B_PCH_ILB_RTCC_RTCB2 BIT4 // RTC Bias Resistor 2, Adds 120 Kohm
  350. #define B_PCH_ILB_RTCC_RTCB1 BIT3 // RTC Bias Resistor 1, Adds 60 Kohm
  351. #define B_PCH_ILB_RTCC_RTCB0 BIT2 // RTC Bias Resistor 0, Adds 30 Kohm
  352. #define B_PCH_ILB_RTCC_DSWEN BIT1 // Deep Sleep Well Enable
  353. #define B_PCH_ILB_RTCC_FEN BIT0 // Enable the Fast Oscillator Bypass Mode
  354. #define R_PCH_ILB_DEF0 0x78 // Defeature Register 0
  355. #define B_PCH_ILB_DEF0_SHRTSYNC BIT22 // Short Sync Abort Defeature
  356. #define B_PCH_ILB_DEF0_SDD BIT21 // Sub Decode Disable
  357. #define R_PCH_ILB_DEF1 0x7C // Defeature Register 1
  358. #define B_PCH_ILB_DEF1_TPMPF BIT10 // usb2leg_chknbit_TPM_PF
  359. #define B_PCH_ILB_DEF1_HPETDEF BIT8 // usb2leg_chknbit_hpet
  360. #define B_PCH_ILB_DEF1_ECWS BIT6 // 8254 Early CW Select
  361. #define B_PCH_ILB_DEF1_FOF BIT5 // 8254 Freeze on first on 1st rd wr11
  362. #define B_PCH_ILB_DEF1_FOAR BIT4 // 8254 Freeze_On_AnyRead
  363. #define B_PCH_ILB_DEF1_LMOO BIT3 // 8259 L2L0_Match_On_OCW2
  364. #define B_PCH_ILB_DEF1_DFP BIT2 // 8259 Disable_Freeze_Priority
  365. #define B_PCH_ILB_DEF1_EETI BIT1 // 8259 Extend_EdgeTrig_IRQ
  366. #define B_PCH_ILB_DEF1_DSAEOI BIT0 // 8259 Disable_Slave_AEOI
  367. #define R_PCH_ILB_GNMI 0x80 // NMI Register
  368. #define S_PCH_ILB_GNMI 4
  369. #define B_PCH_ILB_GNMI_NMI2SMIEN BIT6 // NMI to SMI Enable
  370. #define N_PCH_ILB_GNMI_NMI2SMIEN 6
  371. #define B_PCH_ILB_GNMI_NMI2SMIST BIT5 // NMI to SMI Status
  372. #define N_PCH_ILB_GNMI_NMI2SMIST 5
  373. #define B_PCH_ILB_GNMI_NMIN BIT4 // NMI NOW
  374. #define B_PCH_ILB_GNMI_NMINS BIT3 // NMI NOW Status
  375. #define B_PCH_ILB_GNMI_GNMIED BIT2 // GPIO NMI Edge Detection
  376. #define B_PCH_ILB_GNMI_GNMIE BIT1 // GPIO NMI Enable
  377. #define B_PCH_ILB_GNMI_GNMIS BIT0 // GPIO NMI Status
  378. #define R_PCH_ILB_LPCC 0x84 // LPC Control
  379. #define B_PCH_ILB_LPCC_LPCCLK_SLC BIT8 // iLPCCLK Mux Select
  380. #define B_PCH_ILB_LPCC_LPCCLK_FORCE_OFF BIT3
  381. #define B_PCH_ILB_LPCC_CLKRUN_EN BIT2 // LPC CLKRUN Protocol Enable
  382. #define B_PCH_ILB_LPCC_LPCCLK1EN BIT1 // Clock 1 Enable
  383. #define B_PCH_ILB_LPCC_LPCCLK0EN BIT0 // Clock 0 Enable
  384. #define R_PCH_ILB_IRQE 0x88 // IRQ Enable Control
  385. #define B_PCH_ILB_IRQE_IRQ4TO7EN (BIT7 | BIT6 | BIT5 | BIT4) // IRQ4 - IRQ7 Enable
  386. #define B_PCH_ILB_IRQE_UARTIRQEN_IRQ3 BIT3 // UART IRQ3 Enable
  387. //
  388. // ACPI and Legacy I/O Registers (ABASE)
  389. //
  390. #define R_PCH_ACPI_PM1_STS 0x00 // Power Management 1 Status
  391. #define S_PCH_ACPI_PM1_STS 2
  392. #define B_PCH_ACPI_PM1_STS_WAK BIT15 // Wake Status
  393. #define B_PCH_ACPI_PM1_STS_WAK_PCIE0 BIT14 // PCI Express 0 Wake Status
  394. #define B_PCH_ACPI_PM1_STS_USB_CLKLESS BIT13 // USB Clockless Status
  395. #define B_PCH_ACPI_PM1_STS_PRBTNOR BIT11 // Power Button Override Status
  396. #define B_PCH_ACPI_PM1_STS_RTC BIT10 // RTC Status
  397. #define B_PCH_ACPI_PM1_STS_PWRBTN BIT8 // Power Button Status
  398. #define B_PCH_ACPI_PM1_STS_GBL BIT5 // Global Status
  399. #define B_PCH_ACPI_PM1_STS_WAK_PCIE3 BIT4 // PCI Express 3 Wake Status
  400. #define B_PCH_ACPI_PM1_STS_WAK_PCIE2 BIT3 // PCI Express 2 Wake Status
  401. #define B_PCH_ACPI_PM1_STS_WAK_PCIE1 BIT2 // PCI Express 1 Wake Status
  402. #define B_PCH_ACPI_PM1_STS_TMROF BIT0 // Timer Overflow Status
  403. #define N_PCH_ACPI_PM1_STS_WAK 15
  404. #define N_PCH_ACPI_PM1_STS_PRBTNOR 11
  405. #define N_PCH_ACPI_PM1_STS_RTC 10
  406. #define N_PCH_ACPI_PM1_STS_PWRBTN 8
  407. #define N_PCH_ACPI_PM1_STS_GBL 5
  408. #define N_PCH_ACPI_PM1_STS_TMROF 0
  409. #define R_PCH_ACPI_PM1_EN 0x02 // Power Management 1 Enables
  410. #define S_PCH_ACPI_PM1_EN 2
  411. #define B_PCH_ACPI_PM1_WAK_DIS_PCIE0 BIT14 // PCI Express 0 Disable
  412. #define B_PCH_ACPI_PM1_EN_USB_CLKLESS BIT13 // USB Clockless Enable Bit
  413. #define B_PCH_ACPI_PM1_EN_RTC BIT10 // RTC Alarm Enable Bit
  414. #define B_PCH_ACPI_PM1_EN_PWRBTN BIT8 // Power Button Enable Bit
  415. #define B_PCH_ACPI_PM1_EN_GBL BIT5 // Global Enable Bit
  416. #define B_PCH_ACPI_PM1_WAK_DIS_PCIE3 BIT4 // PCI Express 3 Disable
  417. #define B_PCH_ACPI_PM1_WAK_DIS_PCIE2 BIT3 // PCI Express 2 Disable
  418. #define B_PCH_ACPI_PM1_WAK_DIS_PCIE1 BIT2 // PCI Express 1 Disable
  419. #define B_PCH_ACPI_PM1_EN_TMROF BIT0 // Timer Overflow Interrupt Enable Bit
  420. #define N_PCH_ACPI_PM1_EN_RTC 10
  421. #define N_PCH_ACPI_PM1_EN_PWRBTN 8
  422. #define N_PCH_ACPI_PM1_EN_GBL 5
  423. #define N_PCH_ACPI_PM1_EN_TMROF 0
  424. #define R_PCH_ACPI_PM1_CNT 0x04 // Power Management 1 Control
  425. #define S_PCH_ACPI_PM1_CNT 4
  426. #define B_PCH_ACPI_PM1_CNT_SLP_EN BIT13 // Sleep enable
  427. #define B_PCH_ACPI_PM1_CNT_SLP_TYP (BIT12 | BIT11 | BIT10) // Sleep Type
  428. #define V_PCH_ACPI_PM1_CNT_S0 0x00000000 // ON (S0)
  429. #define V_PCH_ACPI_PM1_CNT_S1 0x00000400 // Puts CPU in S1 state (S1)
  430. #define V_PCH_ACPI_PM1_CNT_S3 0x00001400 // Suspend-to-RAM (S3)
  431. #define V_PCH_ACPI_PM1_CNT_S4 0x00001800 // Suspend-to-Disk (S4)
  432. #define V_PCH_ACPI_PM1_CNT_S5 0x00001C00 // Soft Off (S5)
  433. #define B_PCH_ACPI_PM1_CNT_GBL_RLS BIT2
  434. #define B_PCH_ACPI_PM1_CNT_BM_RLD BIT1 // Treated as Scratchpad Bit
  435. #define B_PCH_ACPI_PM1_CNT_SCI_EN BIT0 // SCI Enable
  436. #define R_PCH_ACPI_PM1_TMR 0x08 // Power Management 1 Timer
  437. #define B_PCH_ACPI_PM1_TMR_VAL 0xFFFFFF // The timer value mask
  438. #define V_PCH_ACPI_PM1_TMR_MAX_VAL 0x1000000 // The timer is 24 bit overflow
  439. #define V_PCH_ACPI_PM1_TMR_FREQUENCY 3579545 // Timer Frequency
  440. #define V_PCH_ACPI_PM1_TMR_NUM_BITS 24 // Programmed to 24 not 32
  441. #define V_PCH_ACPI_PM1_TMR_MAX_BITS 32
  442. #define R_PCH_ACPI_GPE0a_STS 0x20 // General Purpose Event 0a Status
  443. #define S_PCH_ACPI_GPE0a_STS 4
  444. #define B_PCH_ACPI_GPE0a_STS_CORE_GPIO 0xFF000000 // CORE GPIO Status
  445. #define B_PCH_ACPI_GPE0a_STS_SUS_GPIO 0x00FF0000 // SUS GPIO Status
  446. #define B_PCH_ACPI_GPE0a_STS_PME_B0 BIT13 // Power Management Event Bus 0 Status
  447. #define B_PCH_ACPI_GPE0a_STS_BATLOW BIT10 // Battery Low Status
  448. #define B_PCH_ACPI_GPE0a_STS_PCI_EXP BIT9 // PCI Express Status
  449. #define B_PCH_ACPI_GPE0a_STS_GUNIT_SCI BIT5 // GUNIT SCI Status
  450. #define B_PCH_ACPI_GPE0a_STS_PUNIT_SCI BIT4 // PUNIT SCI Status
  451. #define B_PCH_ACPI_GPE0a_STS_SWGPE BIT2 // Software GPE Status
  452. #define B_PCH_ACPI_GPE0a_STS_HOT_PLUG BIT1 // Hot Plug Status
  453. #define N_PCH_ACPI_GPE0a_STS_PME_B0 13
  454. #define N_PCH_ACPI_GPE0a_STS_BATLOW 10
  455. #define N_PCH_ACPI_GPE0a_STS_PCI_EXP 9
  456. #define N_PCH_ACPI_GPE0a_STS_GUNIT_SCI 5
  457. #define N_PCH_ACPI_GPE0a_STS_PUNIT_SCI 4
  458. #define N_PCH_ACPI_GPE0a_STS_SWGPE 2
  459. #define N_PCH_ACPI_GPE0a_STS_HOT_PLUG 1
  460. #define R_PCH_ACPI_GPE0a_EN 0x28 // General Purpose Event 0a Enables
  461. #define S_PCH_ACPI_GPE0a_EN 4
  462. #define B_PCH_ACPI_GPE0a_EN_CORE_GPIO 0xFF000000 // CORE GPIO Enable
  463. #define B_PCH_ACPI_GPE0a_EN_SUS_GPIO 0x00FF0000 // SUS GPIO Enable
  464. #define B_PCH_ACPI_GPE0a_EN_PME_B0 BIT13 // Power Management Event Bus 0 Enable
  465. #define B_PCH_ACPI_GPE0a_EN_BATLOW BIT10 // Battery Low Enable
  466. #define B_PCH_ACPI_GPE0a_EN_PCI_EXP BIT9 // PCI Express Enable
  467. #define B_PCH_ACPI_GPE0a_EN_SWGPE BIT2 // Software GPE Enable
  468. #define B_PCH_ACPI_GPE0a_EN_HOT_PLUG BIT1 // Hot Plug Enable
  469. #define N_PCH_ACPI_GPE0a_EN_PME_B0 13
  470. #define N_PCH_ACPI_GPE0a_EN_BATLOW 10
  471. #define N_PCH_ACPI_GPE0a_EN_PCI_EXP 9
  472. #define N_PCH_ACPI_GPE0a_EN_SWGPE 2
  473. #define N_PCH_ACPI_GPE0a_EN_HOT_PLUG 1
  474. #define R_PCH_SMI_EN 0x30 // SMI Control and Enable
  475. #define S_PCH_SMI_EN 4
  476. #define B_PCH_SMI_EN_LEGACY_USB3 BIT31 // Legacy USB 3 Enable
  477. #define B_PCH_SMI_EN_INTEL_USB2 BIT18 // Intel USB 2 Enable
  478. #define B_PCH_SMI_EN_LEGACY_USB2 BIT17 // Legacy USB 2 Enable
  479. #define B_PCH_SMI_EN_PERIODIC BIT14 // Periodic Enable
  480. #define B_PCH_SMI_EN_TCO BIT13 // TCO Enable
  481. #define B_PCH_SMI_EN_BIOS_RLS BIT7 // BIOS RLS
  482. #define B_PCH_SMI_EN_SWSMI_TMR BIT6 // Software SMI Timer Enable
  483. #define B_PCH_SMI_EN_APMC BIT5 // APMC Enable
  484. #define B_PCH_SMI_EN_ON_SLP_EN BIT4 // SMI On Sleep Enable
  485. #define B_PCH_SMI_EN_BIOS BIT2 // BIOS Enable
  486. #define B_PCH_SMI_EN_EOS BIT1 // End of SMI
  487. #define B_PCH_SMI_EN_GBL_SMI BIT0 // Global SMI Enable
  488. #define N_PCH_SMI_EN_LEGACY_USB3 31
  489. #define N_PCH_SMI_EN_GPIO_UNLOCK 27
  490. #define N_PCH_SMI_EN_INTEL_USB2 18
  491. #define N_PCH_SMI_EN_LEGACY_USB2 17
  492. #define N_PCH_SMI_EN_PERIODIC 14
  493. #define N_PCH_SMI_EN_TCO 13
  494. #define N_PCH_SMI_EN_BIOS_RLS 7
  495. #define N_PCH_SMI_EN_SWSMI_TMR 6
  496. #define N_PCH_SMI_EN_APMC 5
  497. #define N_PCH_SMI_EN_ON_SLP_EN 4
  498. #define N_PCH_SMI_EN_BIOS 2
  499. #define N_PCH_SMI_EN_EOS 1
  500. #define N_PCH_SMI_EN_GBL_SMI 0
  501. #define R_PCH_SMI_STS 0x34 // SMI Status Register
  502. #define S_PCH_SMI_STS 4
  503. #define B_PCH_SMI_STS_LEGACY_USB3 BIT31 // Legacy USB 3 Status
  504. #define B_PCH_SMI_STS_GUNIT_SMI BIT29 // GUNIT SMI Status
  505. #define B_PCH_SMI_STS_PUNIT_SMI BIT28 // PUNIT SMI Status
  506. #define B_PCH_SMI_STS_SPI BIT26 // SPI SMI Status
  507. #define B_PCH_SMI_STS_PCI_EXP BIT20 // PCI Express SMI Status
  508. #define B_PCH_SMI_STS_INTEL_USB2 BIT18 // Intel USB 2 Status
  509. #define B_PCH_SMI_STS_LEGACY_USB2 BIT17 // Legacy USB 2 Status
  510. #define N_PCH_SMI_STS_TCO 13
  511. #define B_PCH_SMI_STS_SMBUS BIT16 // SMBUS SMI Status
  512. #define B_PCH_SMI_STS_ILB BIT15 // ILB SMI Status
  513. #define B_PCH_SMI_STS_PERIODIC BIT14 // Periodic Status
  514. #define B_PCH_SMI_STS_TCO BIT13 // TCO Status
  515. #define B_PCH_SMI_STS_GPE0 BIT9 // GPE0 Status
  516. #define B_PCH_SMI_STS_PM1_STS_REG BIT8 // PM1 Status Register
  517. #define B_PCH_SMI_STS_SWSMI_TMR BIT6 // Software SMI Timer Status
  518. #define B_PCH_SMI_STS_APM BIT5 // APM Status
  519. #define B_PCH_SMI_STS_ON_SLP_EN BIT4 // SMI On Sleep Enable Status
  520. #define B_PCH_SMI_STS_BIOS BIT2 // BIOS Status
  521. #define N_PCH_SMI_STS_LEGACY_USB3 31
  522. #define N_PCH_SMI_STS_SPI 26
  523. #define N_PCH_SMI_STS_PCI_EXP 20
  524. #define N_PCH_SMI_STS_INTEL_USB2 18
  525. #define N_PCH_SMI_STS_LEGACY_USB2 17
  526. #define N_PCH_SMI_STS_SMBUS 16
  527. #define N_PCH_SMI_STS_ILB 15
  528. #define N_PCH_SMI_STS_PERIODIC 14
  529. #define N_PCH_SMI_STS_TCO 13
  530. #define N_PCH_SMI_STS_GPE0 9
  531. #define N_PCH_SMI_STS_PM1_STS_REG 8
  532. #define N_PCH_SMI_STS_SWSMI_TMR 6
  533. #define N_PCH_SMI_STS_APM 5
  534. #define N_PCH_SMI_STS_ON_SLP_EN 4
  535. #define N_PCH_SMI_STS_BIOS 2
  536. #define R_PCH_ALT_GP_SMI_EN 0x38 // Alternate GPI SMI Enable
  537. #define S_PCH_ALT_GP_SMI_EN 2
  538. #define B_PCH_ALT_GP_SMI_EN_CORE_GPIO 0xFF00 // SUS GPIO SMI Enable
  539. #define B_PCH_ALT_GP_SMI_EN_SUS_GPIO 0x00FF // CORE GPIO SMI Enable
  540. #define R_PCH_ALT_GP_SMI_STS 0x3A // Alternate GPI SMI Status
  541. #define S_PCH_ALT_GP_SMI_STS 2
  542. #define B_PCH_ALT_GP_SMI_STS_CORE_GPIO 0xFF00 // SUS GPIO SMI Status
  543. #define B_PCH_ALT_GP_SMI_STS_SUS_GPIO 0x00FF // CORE GPIO SMI Status
  544. #define R_PCH_UPRWC 0x3C // USB Per-Port Registers Write Control
  545. #define S_PCH_UPRWC 2
  546. #define B_PCH_UPRWC_WR_EN_SMI_STS BIT8 // Write Enable Status
  547. #define B_PCH_UPRWC_WR_EN BIT1 // USB Per-Port Registers Write Enable
  548. #define B_PCH_UPRWC_WR_EN_SMI_EN BIT0 // Write Enable SMI Enable
  549. #define R_PCH_ACPI_GPE_CNTL 0x40 // General Purpose Event Control
  550. #define B_PCH_ACPI_GPE_CNTL_SWGPE_CTRL BIT17 // Software GPE Control
  551. #define B_PCH_ACPI_GPE_CNTL_PCIE3_SCI_EN BIT3
  552. #define B_PCH_ACPI_GPE_CNTL_PCIE2_SCI_EN BIT2
  553. #define B_PCH_ACPI_GPE_CNTL_PCIE1_SCI_EN BIT1
  554. #define B_PCH_ACPI_GPE_CNTL_PCIE0_SCI_EN BIT0
  555. #define R_PCH_ACPI_PM2_CNT 0x50 // PM2a Control Block
  556. #define B_PCH_ACPI_PM2_CNT_ARB_DIS BIT0 // Scratchpad Bit
  557. #define R_PCH_TCO_RLD 0x60 // TCO Reload
  558. #define B_PCH_TCO_RLD_VAL 0x3FF // TCO Timer Count Value
  559. #define R_PCH_TCO_STS 0x64 // TCO Timer Status
  560. #define S_PCH_TCO_STS 4
  561. #define B_PCH_TCO_STS_SECOND_TO BIT17 // Second Timeout Status
  562. #define B_PCH_TCO_STS_TIMEOUT BIT3 // Timeout
  563. #define N_PCH_TCO_STS_TIMEOUT 3
  564. #define R_PCH_TCO_CNT 0x68 // TCO Control
  565. #define S_PCH_TCO_CNT 2
  566. #define B_PCH_TCO_CNT_OS_POLICY (BIT21 | BIT20) // OS Policy
  567. #define B_PCH_TCO_CNT_LOCK BIT12 // TCO Enable Lock
  568. #define B_PCH_TCO_CNT_TMR_HLT BIT11 // TCO Timer Halt
  569. #define R_PCH_TCO_TMR 0x70 // TCO Timer
  570. #define B_PCH_TCO_TMR_TCO_TRLD 0x3FF0000
  571. //
  572. // PMC Memory Space Registers (PBASE)
  573. //
  574. #define R_PCH_PMC_PRSTS 0x00 // Power and Reset Status
  575. #define B_PCH_PMC_PRSTS_PRODID 0xFF000000 // Power Management Controller Product ID
  576. #define B_PCH_PMC_PRSTS_REVID 0x00FF0000 // Power Management Controller Revision ID
  577. #define B_PCH_PMC_PRSTS_PM_WD_TMR BIT15 // PMC Watchdog Timer Status
  578. #define B_PCH_PMC_PRSTS_CODE_COPIED_STS BIT11 // Patch Copied Over Status
  579. #define B_PCH_PMC_PRSTS_CODE_LOAD_TO BIT9 // Patch Load Timeout Status
  580. #define B_PCH_PMC_PRSTS_OP_STS BIT8 // PMC Operational Status
  581. #define B_PCH_PMC_PRSTS_SEC_GBLRST_STS BIT7 // SEC Global Reset Status
  582. #define B_PCH_PMC_PRSTS_SEC_WD_TMR_STS BIT6 // SEC Watchdog Timer Status
  583. #define B_PCH_PMC_PRSTS_WOL_OVR_WK_STS BIT5 // Wake On LAN Override Wake Status
  584. #define B_PCH_PMC_PRSTS_HOST_WAKE_STS BIT4 // PMC Host Wake Status
  585. #define R_PCH_PMC_PM_CFG 0x08 // Power Management Configuration
  586. #define B_PCH_PMC_PM_CFG_SPS BIT5 // Shutdown Policy Select
  587. #define B_PCH_PMC_PM_CFG_NO_REBOOT BIT4 // No Reboot Strap
  588. #define B_PCH_PMC_PM_CFG_SX_ENT_TO_EN BIT3 // S1 / 3 / 4 / 5 Entry Timeout Enable
  589. #define B_PCH_PMC_PM_CFG_TIMING_T581 (BIT1 | BIT0) // Timing t581
  590. #define R_PCH_PMC_PM_STS 0x0C // Power Management Status
  591. #define B_PCH_PMC_PM_STS_PMC_MSG_FULL BIT24 // PMC Message Full Status
  592. #define B_PCH_PMC_PM_STS_PMC_MSG_4_FULL BIT23 // PMC 4 Message Full Status
  593. #define B_PCH_PMC_PM_STS_PMC_MSG_3_FULL BIT22 // PMC 3 Message Full Status
  594. #define B_PCH_PMC_PM_STS_PMC_MSG_2_FULL BIT21 // PMC 2 Message Full Status
  595. #define B_PCH_PMC_PM_STS_PMC_MSG_1_FULL BIT20 // PMC 1 Message Full Status
  596. #define B_PCH_PMC_PM_STS_CODE_REQ BIT8 // Patch Request Status
  597. #define B_PCH_PMC_PM_STS_HPR_ENT_TO BIT2 // Host partition Reset Entry Timeout Status
  598. #define B_PCH_PMC_PM_STS_SX_ENT_TO BIT1 // S3 / 4 / 5 Entry Timeout Status
  599. #define R_PCH_PMC_MTPMC 0x10 // Message to PMC
  600. #define R_PCH_PMC_GEN_PMCON_1 0x20 // General PM Configuration 1
  601. #define B_PCH_PMC_GEN_PMCON_UART_EN BIT24 // UART Debug Port Enable
  602. #define B_PCH_PMC_GEN_PMCON_DRAM_INIT BIT23 // DRAM Initialization Scratchpad Bit
  603. #define B_PCH_PMC_GEN_PMCON_MEM_SR BIT21 // Memory Placed in Self-Refresh
  604. #define B_PCH_PMC_GEN_PMCON_SRS BIT20 // System Reset Status
  605. #define B_PCH_PMC_GEN_PMCON_CTS BIT19 // CPU Thermal Trip Status
  606. #define B_PCH_PMC_GEN_PMCON_MIN_SLP_S4 BIT18 // Minimum SLP_S4# Assertion Width Violation Status
  607. #define B_PCH_PMC_GEN_PMCON_PWROK_FLR BIT16 // PWROK Failure
  608. #define B_PCH_PMC_GEN_PMCON_PME_B0_S5_DIS BIT15 // PME B0 S5 Disable
  609. #define B_PCH_PMC_GEN_PMCON_SUS_PWR_FLR BIT14 // SUS Well Power Failure
  610. #define B_PCH_PMC_GEN_PMCON_WOL_ENABLE_OVERRIDE BIT13 // WOL Enable Override
  611. #define B_PCH_PMC_GEN_PMCON_DISABLE_SX_STRETCH BIT12 // Disable SLP_X Scretching After SUS Well Power Up
  612. #define B_PCH_PMC_GEN_PMCON_SLP_S3_MAW (BIT11 | BIT10) // SLP_S3# Minimum Assertion Width
  613. #define V_PCH_PMC_GEN_PMCON_SLP_S3_MAW_60US 0x000 // 60 micro seconds
  614. #define V_PCH_PMC_GEN_PMCON_SLP_S3_MAW_1MS 0x400 // 1 milli second
  615. #define V_PCH_PMC_GEN_PMCON_SLP_S3_MAW_50MS 0x800 // 50 milli seconds
  616. #define V_PCH_PMC_GEN_PMCON_SLP_S3_MAW_2S 0xC00 // 2 seconds
  617. #define B_PCH_PMC_GEN_PMCON_GEN_RST_STS BIT9 // General Reset Status
  618. #define B_PCH_PMC_GEN_PMCON_RTC_RESERVED BIT8 // RTC Reserved
  619. #define B_PCH_PMC_GEN_PMCON_SWSMI_RTSL (BIT7 | BIT6) // SWSMI Rate Select
  620. #define V_PCH_PMC_GEN_PMCON_SWSMI_RTSL_64MS 0xC0 // 64ms +/- 4ms
  621. #define V_PCH_PMC_GEN_PMCON_SWSMI_RTSL_32MS 0x80 // 32ms +/- 4ms
  622. #define V_PCH_PMC_GEN_PMCON_SWSMI_RTSL_16MS 0x40 // 16ms +/- 4ms
  623. #define V_PCH_PMC_GEN_PMCON_SWSMI_RTSL_1_5MS 0x00 // 1.5ms +/- 0.6ms
  624. #define B_PCH_PMC_GEN_PMCON_SLP_S4_MAW (BIT5 | BIT4) // SLP_S4# Minimum Assertion Width
  625. #define V_PCH_PMC_GEN_PMCON_SLP_S4_MAW_1S 0x30 // 1 second
  626. #define V_PCH_PMC_GEN_PMCON_SLP_S4_MAW_2S 0x20 // 2 seconds
  627. #define V_PCH_PMC_GEN_PMCON_SLP_S4_MAW_3S 0x10 // 3 seconds
  628. #define V_PCH_PMC_GEN_PMCON_SLP_S4_MAW_4S 0x00 // 4 seconds
  629. #define B_PCH_PMC_GEN_PMCON_SLP_S4_ASE BIT3 // SLP_S4# Assertion Scretch Enable
  630. #define B_PCH_PMC_GEN_PMCON_RTC_PWR_STS BIT2 // RTC Power Status
  631. #define B_PCH_PMC_GEN_PMCON_AFTERG3_EN BIT0 // After G3 State Enable
  632. #define R_PCH_PMC_GEN_PMCON_2 0x24 // General PM Configuration 2
  633. #define B_PCH_PMC_GEN_PMCON_LOCK_S4_STRET_LD BIT18 // SLP_S3 / SLP_S4 Stretching Policy Lock-Down
  634. #define B_PCH_PMC_GEN_PMCON_BIOS_PCI_EXP_EN BIT10 // BIOS PCI Express Enable
  635. #define B_PCH_PMC_GEN_PMCON_PWRBTN_LVL BIT9 // Power Button Level
  636. #define B_PCH_PMC_GEN_PMCON_SMI_LOCK BIT4 // SMI Lock
  637. #define B_PCH_PMC_GEN_PMCON_PER_SMI_SEL (BIT1 | BIT0) // Period SMI Select
  638. #define V_PCH_PMC_GEN_PMCON_PER_SMI_64S 0x0000 // 64 seconds
  639. #define V_PCH_PMC_GEN_PMCON_PER_SMI_32S 0x0001 // 32 seconds
  640. #define V_PCH_PMC_GEN_PMCON_PER_SMI_16S 0x0002 // 16 seconds
  641. #define V_PCH_PMC_GEN_PMCON_PER_SMI_8S 0x0003 // 8 seconds
  642. #define R_PCH_PMC_MFPMC 0x28 // Message from PMC
  643. #define R_PCH_PMC_SEC_STS 0x2C // SEC Status
  644. #define B_PCH_PMC_SEC_STS_SEC (BIT3 | BIT2 | BIT1 | BIT0) // SEC Exclusion Cause
  645. #define R_PCH_PMC_CRID 0x30 // Configured Revision ID
  646. #define B_PCH_PMC_CRID_RID_SEL (BIT1 | BIT0) // Revision ID Select
  647. #define R_PCH_PMC_FUNC_DIS 0x34 // Function Disable Register
  648. #define B_PCH_PMC_FUNC_DIS_LPSS2_FUNC7 BIT31 // LPSS2 I2C #7
  649. #define B_PCH_PMC_FUNC_DIS_LPSS2_FUNC6 BIT30 // LPSS2 I2C #6
  650. #define B_PCH_PMC_FUNC_DIS_LPSS2_FUNC5 BIT29 // LPSS2 I2C #5
  651. #define B_PCH_PMC_FUNC_DIS_LPSS2_FUNC4 BIT28 // LPSS2 I2C #4
  652. #define B_PCH_PMC_FUNC_DIS_LPSS2_FUNC3 BIT27 // LPSS2 I2C #3
  653. #define B_PCH_PMC_FUNC_DIS_LPSS2_FUNC2 BIT26 // LPSS2 I2C #2
  654. #define B_PCH_PMC_FUNC_DIS_LPSS2_FUNC1 BIT25 // LPSS2 I2C #1
  655. #define B_PCH_PMC_FUNC_DIS_LPSS2_FUNC0 BIT24 // LPSS2 DMA Disable
  656. #define B_PCH_PMC_FUNC_DIS_PCI_EX_FUNC3 BIT23 // PCI Express Function 3 Disable
  657. #define B_PCH_PMC_FUNC_DIS_PCI_EX_FUNC2 BIT22 // PCI Express Function 2 Disable
  658. #define B_PCH_PMC_FUNC_DIS_PCI_EX_FUNC1 BIT21 // PCI Express Function 1 Disable
  659. #define B_PCH_PMC_FUNC_DIS_PCI_EX_FUNC0 BIT20 // PCI Express Function 0 Disable
  660. #define N_PCH_PMC_FUNC_DIS_PCI_EX_FUNC0 20
  661. #define B_PCH_PMC_FUNC_DIS_SEC BIT19 // SEC Disable
  662. #define B_PCH_PMC_FUNC_DIS_USB BIT18 // USB Disable
  663. #define B_PCH_PMC_FUNC_DIS_SATA BIT17 // SATA Disable
  664. #define B_PCH_PMC_FUNC_DIS_USH BIT15 // USH (USB3) Disable
  665. #define B_PCH_PMC_FUNC_DIS_OTG BIT14 // USB OTG Disable
  666. #define B_PCH_PMC_FUNC_DIS_LPE BIT13 // LPE Disable
  667. #define B_PCH_PMC_FUNC_DIS_AZALIA BIT12 // Azalia Disable
  668. #define B_PCH_PMC_FUNC_DIS_MIPI BIT11 // MIPI-HSI Disable
  669. #define B_PCH_PMC_FUNC_DIS_SDIO4 BIT11 // SCC SDIO #4 (Device 23, eMMC4.5) Disable
  670. #define B_PCH_PMC_FUNC_DIS_SDIO3 BIT10 // SCC SDIO #3 (Device 18, SD Card) Disable
  671. #define B_PCH_PMC_FUNC_DIS_SDIO2 BIT9 // SCC SDIO #2 (Device 17, SDIO) Disable
  672. #define B_PCH_PMC_FUNC_DIS_SDIO1 BIT8 // SCC SDIO #1 (Device 16, eMMC) Disable
  673. #define B_PCH_PMC_FUNC_DIS_LPSS1_FUNC7 BIT7 // LPSS1 Spare #2 Disable
  674. #define B_PCH_PMC_FUNC_DIS_LPSS1_FUNC6 BIT6 // LPSS1 Spare #1 Disable
  675. #define B_PCH_PMC_FUNC_DIS_LPSS1_FUNC5 BIT5 // LPSS1 SPI Disable
  676. #define B_PCH_PMC_FUNC_DIS_LPSS1_FUNC4 BIT4 // LPSS1 HS-UART #2 Disable
  677. #define B_PCH_PMC_FUNC_DIS_LPSS1_FUNC3 BIT3 // LPSS1 HS-UART #1 Disable
  678. #define B_PCH_PMC_FUNC_DIS_LPSS1_FUNC2 BIT2 // LPSS1 PWM #2 Disable
  679. #define B_PCH_PMC_FUNC_DIS_LPSS1_FUNC1 BIT1 // LPSS1 PWM #1 Disable
  680. #define B_PCH_PMC_FUNC_DIS_LPSS1_FUNC0 BIT0 // LPSS1 DMA Disable
  681. #define R_PCH_PMC_FUNC_DIS2 0x38 // Function Disable 2 Register
  682. #define B_PCH_PMC_FUNC_DIS2_USH_SS_PHY BIT2 // USH Super Speed PHY Disable
  683. #define B_PCH_PMC_FUNC_DIS2_OTG_SS_PHY BIT1 // OTG Super Speed PHY Disable
  684. #define B_PCH_PMC_FUNC_DIS2_SMBUS BIT0 // SMBus Disable
  685. #define R_PCH_PMC_PMIR 0x48 // Extended Test Mode Register (ETR)
  686. #define B_PCH_PMC_PMIR_CF9LOCK BIT31 // CF9h Lockdown
  687. #define B_PCH_PMC_PMIR_LTR_DEF BIT22 // LTR Default
  688. #define B_PCH_PMC_PMIR_IGNORE_HPET BIT21 // Ignore HPET Disable Check Before Going to S0i2
  689. #define B_PCH_PMC_PMIR_CF9GR BIT20 // CF9h Global Reset
  690. #define R_PCH_PMC_VLT 0x50 // Voltage Detect Register
  691. #define B_PCH_PMC_VLT_FUSES 0xFF // Voltage Detect Fuses
  692. #define R_PCH_PMC_GPI_ROUT 0x58 // GPI Rout
  693. #define B_PCH_PMC_GPI_ROUT_0 (BIT1 | BIT0)
  694. #define B_PCH_PMC_GPI_ROUT_1 (BIT3 | BIT2)
  695. #define B_PCH_PMC_GPI_ROUT_2 (BIT5 | BIT4)
  696. #define B_PCH_PMC_GPI_ROUT_3 (BIT7 | BIT6)
  697. #define B_PCH_PMC_GPI_ROUT_4 (BIT9 | BIT8)
  698. #define B_PCH_PMC_GPI_ROUT_5 (BIT11 | BIT10)
  699. #define B_PCH_PMC_GPI_ROUT_6 (BIT13 | BIT12)
  700. #define B_PCH_PMC_GPI_ROUT_7 (BIT15 | BIT14)
  701. #define B_PCH_PMC_GPI_ROUT_8 (BIT17 | BIT16)
  702. #define B_PCH_PMC_GPI_ROUT_9 (BIT19 | BIT18)
  703. #define B_PCH_PMC_GPI_ROUT_10 (BIT21 | BIT20)
  704. #define B_PCH_PMC_GPI_ROUT_11 (BIT23 | BIT22)
  705. #define B_PCH_PMC_GPI_ROUT_12 (BIT25 | BIT24)
  706. #define B_PCH_PMC_GPI_ROUT_13 (BIT27 | BIT26)
  707. #define B_PCH_PMC_GPI_ROUT_14 (BIT29 | BIT28)
  708. #define B_PCH_PMC_GPI_ROUT_15 (BIT31 | BIT30)
  709. #define R_PCH_PMC_PCC0 0x60 // Platform Clock Control 0
  710. #define B_PCH_PMC_PCC0_CLK_FREQ BIT2 // Clock Frequency
  711. #define B_PCH_PMC_PCC0_CLK_CTL (BIT1 | BIT0) // Clock Gating
  712. #define R_PCH_PMC_PCC1 0x64 // Platform Clock Control 1
  713. #define B_PCH_PMC_PCC1_CLK_FREQ BIT2 // Clock Frequency
  714. #define B_PCH_PMC_PCC1_CLK_CTL (BIT1 | BIT0) // Clock Gating
  715. #define R_PCH_PMC_PCC2 0x68 // Platform Clock Control 2
  716. #define B_PCH_PMC_PCC2_CLK_FREQ BIT2 // Clock Frequency
  717. #define B_PCH_PMC_PCC2_CLK_CTL (BIT1 | BIT0) // Clock Gating
  718. #define R_PCH_PMC_PCC3 0x6C // Platform Clock Control 3
  719. #define B_PCH_PMC_PCC3_CLK_FREQ BIT2 // Clock Frequency
  720. #define B_PCH_PMC_PCC3_CLK_CTL (BIT1 | BIT0) // Clock Gating
  721. #define R_PCH_PMC_PCC4 0x70 // Platform Clock Control 4
  722. #define B_PCH_PMC_PCC4_CLK_FREQ BIT2 // Clock Frequency
  723. #define B_PCH_PMC_PCC4_CLK_CTL (BIT1 | BIT0) // Clock Gating
  724. #define R_PCH_PMC_PCC5 0x74 // Platform Clock Control 5
  725. #define B_PCH_PMC_PCC5_CLK_FREQ BIT2 // Clock Frequency
  726. #define B_PCH_PMC_PCC5_CLK_CTL (BIT1 | BIT0) // Clock Gating
  727. #define R_PCH_PMC_S0IR_TMR 0x80 // S0I Ready Residency Timer
  728. #define B_PCH_PMC_S0IR_TMR_RTIME 0xFFFFFFFF // Time Spent in S0I Ready State
  729. #define R_PCH_PMC_S0I1_TMR 0x84 // S0I1 Ready Residency Timer
  730. #define B_PCH_PMC_S0I1_TMR_RTIME 0xFFFFFFFF // Time Spent in S0I1 Ready State
  731. #define R_PCH_PMC_S0I2_TMR 0x88 // S0I2 Ready Residency Timer
  732. #define B_PCH_PMC_S0I2_TMR_RTIME 0xFFFFFFFF // Time Spent in S0I2 Ready State
  733. #define R_PCH_PMC_S0I3_TMR 0x8C // S0I3 Ready Residency Timer
  734. #define B_PCH_PMC_S0I3_TMR_RTIME 0xFFFFFFFF // Time Spent in S0I3 Ready State
  735. #define R_PCH_PMC_S0_TMR 0x90 // S0 Residency Timer
  736. #define B_PCH_PMC_S0_TMR_RTIME 0xFFFFFFFF // Time Spent in S0 State
  737. #define R_PCH_PMC_PSS 0x98 // Power Island Power Status
  738. #define B_PCH_PMC_PSS_PG_STS 0x3FFFF // Power Gate Status of All Power Islands
  739. #define B_PCH_PMC_PSS_PG_STS_USB_SUS BIT17 // USB SUS
  740. #define B_PCH_PMC_PSS_PG_STS_USB BIT16 // USB
  741. #define B_PCH_PMC_PSS_PG_STS_OTG_VCCACLK BIT15 // OTG VCCACLK
  742. #define B_PCH_PMC_PSS_PG_STS_OTG VCCA BIT14 // OTG VCCA
  743. #define B_PCH_PMC_PSS_PG_STS_OTG_VCCS BIT13 // OTG VCCS
  744. #define B_PCH_PMC_PSS_PG_STS_OTG_CTL BIT12 // OTG Control
  745. #define B_PCH_PMC_PSS_PG_STS_USH_VCCA BIT11 // USH VCCA
  746. #define B_PCH_PMC_PSS_PG_STS_USH_VCCS BIT10 // USH VCCS
  747. #define B_PCH_PMC_PSS_PG_STS_USH_SUS BIT9 // USH SUS
  748. #define B_PCH_PMC_PSS_PG_STS_USH_CTL BIT8 // USH Control
  749. #define B_PCH_PMC_PSS_PG_STS_DFX BIT7 // DFX
  750. #define B_PCH_PMC_PSS_PG_STS_LPE BIT6 // LPE Audio
  751. #define B_PCH_PMC_PSS_PG_STS_LPSS BIT5 // LPSS
  752. #define B_PCH_PMC_PSS_PG_STS_PCIE BIT4 // PCIe
  753. #define B_PCH_PMC_PSS_PG_STS_HDA BIT2 // HDA
  754. #define B_PCH_PMC_PSS_PG_STS_SATA BIT1 // SATA
  755. #define R_PCH_PMC_D3_STS_0 0xA0 // D3 Status 0
  756. #define B_PCH_PMC_D3_STS_0_LPSS1F7 BIT31 // LPSS 1 Function 7
  757. #define B_PCH_PMC_D3_STS_0_LPSS1F6 BIT30 // LPSS 1 Function 6
  758. #define B_PCH_PMC_D3_STS_0_LPSS1F5 BIT29 // LPSS 1 Function 5
  759. #define B_PCH_PMC_D3_STS_0_LPSS1F4 BIT28 // LPSS 1 Function 4
  760. #define B_PCH_PMC_D3_STS_0_LPSS1F3 BIT27 // LPSS 1 Function 3
  761. #define B_PCH_PMC_D3_STS_0_LPSS1F2 BIT26 // LPSS 1 Function 2
  762. #define B_PCH_PMC_D3_STS_0_LPSS1F1 BIT25 // LPSS 1 Function 1
  763. #define B_PCH_PMC_D3_STS_0_LPSS1F0 BIT24 // LPSS 1 Function 0
  764. #define B_PCH_PMC_D3_STS_0_PCIEF3 BIT23 // PCIe Function 3
  765. #define B_PCH_PMC_D3_STS_0_PCIEF2 BIT22 // PCIe Function 2
  766. #define B_PCH_PMC_D3_STS_0_PCIEF1 BIT21 // PCIe Function 1
  767. #define B_PCH_PMC_D3_STS_0_PCIEF0 BIT20 // PCIe Function 0
  768. #define B_PCH_PMC_D3_STS_0_USB BIT18 // USB
  769. #define B_PCH_PMC_D3_STS_0_SATA BIT17 // SATA
  770. #define B_PCH_PMC_D3_STS_0_USH BIT15 // USH
  771. #define B_PCH_PMC_D3_STS_0_OTG BIT14 // OTG
  772. #define B_PCH_PMC_D3_STS_0_LPE BIT13 // LPE
  773. #define B_PCH_PMC_D3_STS_0_HDA BIT12 // HDA
  774. #define B_PCH_PMC_D3_STS_0_MIPI BIT11 // MIPI-HSI
  775. #define B_PCH_PMC_D3_STS_0_SCCF2 BIT10 // SCC Function 2
  776. #define B_PCH_PMC_D3_STS_0_SCCF1 BIT9 // SCC Function 1
  777. #define B_PCH_PMC_D3_STS_0_SCCF0 BIT8 // SCC Function 0
  778. #define B_PCH_PMC_D3_STS_0_LPSS0F7 BIT7 // LPSS 0 Function 7
  779. #define B_PCH_PMC_D3_STS_0_LPSS0F6 BIT6 // LPSS 0 Function 6
  780. #define B_PCH_PMC_D3_STS_0_LPSS0F5 BIT5 // LPSS 0 Function 5
  781. #define B_PCH_PMC_D3_STS_0_LPSS0F4 BIT4 // LPSS 0 Function 4
  782. #define B_PCH_PMC_D3_STS_0_LPSS0F3 BIT3 // LPSS 0 Function 3
  783. #define B_PCH_PMC_D3_STS_0_LPSS0F2 BIT2 // LPSS 0 Function 2
  784. #define B_PCH_PMC_D3_STS_0_LPSS0F1 BIT1 // LPSS 0 Function 1
  785. #define B_PCH_PMC_D3_STS_0_LPSS0F0 BIT0 // LPSS 0 Function 0
  786. #define R_PCH_PMC_D3_STS_1 0xA4 // D3 Status 1
  787. #define B_PCH_PMC_D3_STS_1_DFX BIT3 // DFX
  788. #define B_PCH_PMC_D3_STS_1_OTG_SS BIT2 // OTG SS
  789. #define B_PCH_PMC_D3_STS_1_USH_SS BIT1 // USH SS
  790. #define B_PCH_PMC_D3_STS_1_SMB BIT0 // SMBus
  791. #define R_PCH_PMC_D3_STDBY_STS_0 0xA8 // D3 Standby Status 0
  792. #define B_PCH_PMC_D3_STDBY_STS_0_LPSS1F7 BIT31 // LPSS 1 Function 7
  793. #define B_PCH_PMC_D3_STDBY_STS_0_LPSS1F6 BIT30 // LPSS 1 Function 6
  794. #define B_PCH_PMC_D3_STDBY_STS_0_LPSS1F5 BIT29 // LPSS 1 Function 5
  795. #define B_PCH_PMC_D3_STDBY_STS_0_LPSS1F4 BIT28 // LPSS 1 Function 4
  796. #define B_PCH_PMC_D3_STDBY_STS_0_LPSS1F3 BIT27 // LPSS 1 Function 3
  797. #define B_PCH_PMC_D3_STDBY_STS_0_LPSS1F2 BIT26 // LPSS 1 Function 2
  798. #define B_PCH_PMC_D3_STDBY_STS_0_LPSS1F1 BIT25 // LPSS 1 Function 1
  799. #define B_PCH_PMC_D3_STDBY_STS_0_LPSS1F0 BIT24 // LPSS 1 Function 0
  800. #define B_PCH_PMC_D3_STDBY_STS_0_PCIEF3 BIT23 // PCIe Function 3
  801. #define B_PCH_PMC_D3_STDBY_STS_0_PCIEF2 BIT22 // PCIe Function 2
  802. #define B_PCH_PMC_D3_STDBY_STS_0_PCIEF1 BIT21 // PCIe Function 1
  803. #define B_PCH_PMC_D3_STDBY_STS_0_PCIEF0 BIT20 // PCIe Function 0
  804. #define B_PCH_PMC_D3_STDBY_STS_0_USB BIT18 // USB
  805. #define B_PCH_PMC_D3_STDBY_STS_0_SATA BIT17 // SATA
  806. #define B_PCH_PMC_D3_STDBY_STS_0_USH BIT15 // USH
  807. #define B_PCH_PMC_D3_STDBY_STS_0_OTG BIT14 // OTG
  808. #define B_PCH_PMC_D3_STDBY_STS_0_LPE BIT13 // LPE
  809. #define B_PCH_PMC_D3_STDBY_STS_0_HDA BIT12 // HDA
  810. #define B_PCH_PMC_D3_STDBY_STS_0_MIPI BIT11 // MIPI-HSI
  811. #define B_PCH_PMC_D3_STDBY_STS_0_SCCF2 BIT10 // SCC Function 2
  812. #define B_PCH_PMC_D3_STDBY_STS_0_SCCF1 BIT9 // SCC Function 1
  813. #define B_PCH_PMC_D3_STDBY_STS_0_SCCF0 BIT8 // SCC Function 0
  814. #define B_PCH_PMC_D3_STDBY_STS_0_LPSS0F7 BIT7 // LPSS 0 Function 7
  815. #define B_PCH_PMC_D3_STDBY_STS_0_LPSS0F6 BIT6 // LPSS 0 Function 6
  816. #define B_PCH_PMC_D3_STDBY_STS_0_LPSS0F5 BIT5 // LPSS 0 Function 5
  817. #define B_PCH_PMC_D3_STDBY_STS_0_LPSS0F4 BIT4 // LPSS 0 Function 4
  818. #define B_PCH_PMC_D3_STDBY_STS_0_LPSS0F3 BIT3 // LPSS 0 Function 3
  819. #define B_PCH_PMC_D3_STDBY_STS_0_LPSS0F2 BIT2 // LPSS 0 Function 2
  820. #define B_PCH_PMC_D3_STDBY_STS_0_LPSS0F1 BIT1 // LPSS 0 Function 1
  821. #define B_PCH_PMC_D3_STDBY_STS_0_LPSS0F0 BIT0 // LPSS 0 Function 0
  822. #define R_PCH_PMC_D3_STDBY_STS_1 0xAC // D3 Standby Status 1
  823. #define B_PCH_PMC_D3_STDBY_STS_1_DFX BIT3 // DFX
  824. #define B_PCH_PMC_D3_STDBY_STS_1_OTG_SS BIT2 // OTG SS
  825. #define B_PCH_PMC_D3_STDBY_STS_1_USH_SS BIT1 // USH SS
  826. #define B_PCH_PMC_D3_STDBY_STS_1_SMB BIT0 // SMBus
  827. #define R_PCH_PMC_MTPMC1 0xB0 // Message to PMC 1
  828. #define R_PCH_PMC_MTPMC2 0xB4 // Message to PMC 2
  829. #define R_PCH_PMC_MTPMC3 0xB8 // Message to PMC 3
  830. #define R_PCH_PMC_MTPMC4 0xBC // Message to PMC 4
  831. //
  832. // IO Memory Space Registers (IOBASE)
  833. //
  834. #define R_PCH_CFIO_PAD_CONF0 0x00 // CFIO PAD_CONF0
  835. #define R_PCH_CFIO_PAD_CONF1 0x04 // CFIO PAD_CONF1
  836. #define R_PCH_CFIO_PAD_VAL 0x08 // CFIO PAD_VAL
  837. #define R_PCH_CFIO_PAD_DFT 0x0C // CFIO PAD_CFT
  838. //
  839. // GPIO Register Offsets from GBASE
  840. //
  841. #define R_PCH_GPIO_SC_USE_SEL 0x00 // GPIO South Usage Select [31:0]
  842. #define R_PCH_GPIO_SC_IO_SEL 0x04 // GPIO South Input / Output Select [31:0]
  843. #define R_PCH_GPIO_SC_LVL 0x08 // GPIO South Level for Input or Output [31:0]
  844. #define R_PCH_GPIO_SC_TPE 0x0C // GPIO South Trigger Positive Edge Enable [31:0]
  845. #define R_PCH_GPIO_SC_TNE 0x10 // GPIO South Trigger Negative Edge Enable [31:0]
  846. #define R_PCH_GPIO_SC_TS 0x14 // GPIO South Trigger Status [31:0]
  847. #define R_PCH_GPIO_SC_USE_SEL2 0x20 // GPIO South Usage Select 2 [63:32]
  848. #define R_PCH_GPIO_SC_IO_SEL2 0x24 // GPIO South Input / Output Select 2 [63:32]
  849. #define R_PCH_GPIO_SC_LVL2 0x28 // GPIO South Level for Input or Output 2 [63:32]
  850. #define R_PCH_GPIO_SC_TPE2 0x2C // GPIO South Trigger Positive Edge Enable 2 [63:32]
  851. #define R_PCH_GPIO_SC_TNE2 0x30 // GPIO South Trigger Negative Edge Enable 2 [63:32]
  852. #define R_PCH_GPIO_SC_TS2 0x34 // GPIO South Trigger Status 2 [63:32]
  853. #define R_PCH_GPIO_SC_USE_SEL3 0x40 // GPIO South Usage Select 3 [95:64]
  854. #define R_PCH_GPIO_SC_IO_SEL3 0x44 // GPIO South Input / Output Select 3 [95:64]
  855. #define R_PCH_GPIO_SC_LVL3 0x48 // GPIO South Level for Input or Output 3 [95:64]
  856. #define R_PCH_GPIO_SC_TPE3 0x4C // GPIO South Trigger Positive Edge Enable 3 [95:64]
  857. #define R_PCH_GPIO_SC_TNE3 0x50 // GPIO South Trigger Negative Edge Enable 3 [95:64]
  858. #define R_PCH_GPIO_SC_TS3 0x54 // GPIO South Trigger Status 3 [95:64]
  859. #define R_PCH_GPIO_SC_USE_SEL4 0x60 // GPIO South Usage Select 4 [127:96]
  860. #define R_PCH_GPIO_SC_IO_SEL4 0x64 // GPIO South Input / Output Select 4 [127:96]
  861. #define R_PCH_GPIO_SC_LVL4 0x68 // GPIO South Level for Input or Output 4 [127:96]
  862. #define R_PCH_GPIO_SC_TPE4 0x6C // GPIO South Trigger Positive Edge Enable 4 [127:96]
  863. #define R_PCH_GPIO_SC_TNE4 0x70 // GPIO South Trigger Negative Edge Enable 4 [127:96]
  864. #define R_PCH_GPIO_SC_TS4 0x74 // GPIO South Trigger Status 4 [127:96]
  865. #define R_PCH_GPIO_SUS_USE_SEL 0x80 // GPIO Suspend Use Select [31:0]
  866. #define R_PCH_GPIO_SUS_IO_SEL 0x84 // GPIO Suspend Input / Output Select [31:0]
  867. #define R_PCH_GPIO_SUS_LVL 0x88 // GPIO Suspend Level for Input or Output [31:0]
  868. #define R_PCH_GPIO_SUS_TPE 0x8C // GPIO Suspend Trigger Positive Edge Enable [31:0]
  869. #define R_PCH_GPIO_SUS_TNE 0x90 // GPIO Suspend Trigger Negative Edge Enable [31:0]
  870. #define R_PCH_GPIO_SUS_TS 0x94 // GPIO Suspend Trigger Status [31:0]
  871. #define R_PCH_GPIO_SUS_WAKE_EN 0x98 // GPIO Suspend Wake Enable [31:0]
  872. #define R_PCH_GPIO_SUS_USE_SEL2 0x100 // GPIO Suspend Use Select 2 [42:32]
  873. #define R_PCH_GPIO_SUS_IO_SEL2 0x104 // GPIO Suspend Input / Output Select 2 [42:32]
  874. #define R_PCH_GPIO_SUS_LVL2 0x108 // GPIO Suspend Level for Input or Output 2 [42:32]
  875. #define R_PCH_GPIO_SUS_TPE2 0x10C // GPIO Suspend Trigger Positive Edge Enable [42:32]
  876. #define R_PCH_GPIO_SUS_TNE2 0x110 // GPIO Suspend Trigger Negative Edge Enable [42:32]
  877. #define R_PCH_GPIO_SUS_TS2 0x114 // GPIO Suspend Trigger Status [42:32]
  878. #define R_PCH_GPIO_SUS_WAKE_EN2 0x118 // GPIO Suspend Wake Enable 2 [42:32]
  879. //
  880. // Fixed IO Space
  881. //
  882. //
  883. // Processor Interface Registers
  884. //
  885. #define R_PCH_NMI_SC 0x61 // NMI Status and Control
  886. #define B_PCH_NMI_SC_SERR_NMI_STS BIT7 // SERR# NMI Status
  887. #define B_PCH_NMI_SC_IOCHK_NMI_STS BIT6 // IOCHK NMI Status
  888. #define B_PCH_NMI_SC_TMR2_OUT_STS BIT5 // Timer Counter 2 Status
  889. #define B_PCH_NMI_SC_REF_TOGGLE BIT4 // Refresh Cycle toggle Status
  890. #define B_PCH_NMI_SC_IOCHK_NMI_EN BIT3 // IOCHK NMI Enable
  891. #define B_PCH_NMI_SC_PCI_SERR_EN BIT2 // SERR# NMI Enable
  892. #define B_PCH_NMI_SC_SPKR_DAT_EN BIT1 // Speaker Data Enable
  893. #define B_PCH_NMI_SC_TIM_CNT2_EN BIT0 // Timer Counter 2 Enable
  894. #define R_PCH_NMI_EN 0x70 // NMI Enable and Real Time Clock Index, Co-function with R_PCH_RTC_INDEX
  895. #define B_PCH_NMI_EN_NMI_EN BIT7 // NMI Enable, must preserve this bit first before writing to IO port 0x70
  896. //
  897. // RTC Registers
  898. //
  899. #define R_PCH_RTC_INDEX 0x70 // NMI Enable and Real Time Clock Index, Co-function with R_PCH_NMI_EN
  900. #define R_PCH_RTC_TARGET 0x71 // Real-Time Clock Target Register
  901. #define R_PCH_RTC_EXT_INDEX 0x72 // Extended RAM Index Register
  902. #define R_PCH_RTC_EXT_TARGET 0x73 // Extended RAM Target Register
  903. #define R_PCH_RTC_INDEX2 0x74 // Real-Time Clock Index Register
  904. #define R_PCH_RTC_TARGET2 0x75 // Real-Time Clock Target Register
  905. #define R_PCH_RTC_EXT_INDEX2 0x76 // Extended RAM Index Register
  906. #define R_PCH_RTC_EXT_TARGET2 0x77 // Extended RAM Target Register
  907. #define R_PCH_RTC_SECONDS 0x00 // Seconds, Range 0..59
  908. #define R_PCH_RTC_SECONDSALARM 0x01 // Seconds Alarm, Range 0..59
  909. #define R_PCH_RTC_MINUTES 0x02 // Minutes, Range 0..59
  910. #define R_PCH_RTC_MINUTESALARM 0x03 // Minutes Alarm, Range 0..59
  911. #define R_PCH_RTC_HOURS 0x04 // Hours, Range 1..12 or 0..23 Bit 7 is AM/PM
  912. #define R_PCH_RTC_HOURSALARM 0x05 // Hours Alarm, Range 1..12 or 0..23 Bit 7 is AM/PM
  913. #define R_PCH_RTC_DAYOFWEEK 0x06 // Day of Week, Range 1..7
  914. #define R_PCH_RTC_DAYOFMONTH 0x07 // Day of Month, Range 1..31
  915. #define R_PCH_RTC_MONTH 0x08 // Month, Range 1..12
  916. #define R_PCH_RTC_YEAR 0x09 // Year, Range 0..99
  917. #define R_PCH_RTC_REGISTERA 0x0A // RTC Register A
  918. #define B_PCH_RTC_REGISTERA_UIP BIT7 // Update In Progress
  919. #define B_PCH_RTC_REGISTERA_DV (BIT6 | BIT5 | BIT4) // Division Chain Select
  920. #define V_PCH_RTC_REGISTERA_DV_NORM_OP 0x20 // Normal Operation
  921. #define V_PCH_RTC_REGISTERA_DV_BYP_5 0x30 // Bypass 5 Stages (Test mode only)
  922. #define V_PCH_RTC_REGISTERA_DV_BYP_10 0x40 // Bypass 10 Stages (Test mode only)
  923. #define V_PCH_RTC_REGISTERA_DV_BYP_15 0x50 // Bypass 15 Stages (Test mode only)
  924. #define V_PCH_RTC_REGISTERA_DV_DIV_RST1 0x60 // Divider Reset
  925. #define V_PCH_RTC_REGISTERA_DV_DIV_RST2 0x70 // Divider Reset
  926. #define B_PCH_RTC_REGISTERA_RS (BIT3 | BIT2 | BIT1 | BIT0) // Rate Select
  927. #define V_PCH_RTC_REGISTERA_RS_INT_NV_TGL 0x00 // Interrupt Never Toggles
  928. #define V_PCH_RTC_REGISTERA_RS_3P906MS1 0x01 // 3.90625 ms
  929. #define V_PCH_RTC_REGISTERA_RS_7P812MS1 0x02 // 7.8125 ms
  930. #define V_PCH_RTC_REGISTERA_RS_122P0US 0x03 // 122.070 us
  931. #define V_PCH_RTC_REGISTERA_RS_244P1US 0x04 // 244.141 us
  932. #define V_PCH_RTC_REGISTERA_RS_488P2US 0x05 // 488.281 us
  933. #define V_PCH_RTC_REGISTERA_RS_976P5US 0x06 // 976.5625 us
  934. #define V_PCH_RTC_REGISTERA_RS_1P953MS 0x07 // 1.953125 ms
  935. #define V_PCH_RTC_REGISTERA_RS_3P906MS 0x08 // 3.90625 ms
  936. #define V_PCH_RTC_REGISTERA_RS_7P812MS 0x09 // 7.8125 ms
  937. #define V_PCH_RTC_REGISTERA_RS_15P62MS 0x0A // 15.625 ms
  938. #define V_PCH_RTC_REGISTERA_RS_31P25MS 0x0B // 31.25 ms
  939. #define V_PCH_RTC_REGISTERA_RS_62P5MS 0x0C // 62.5 ms
  940. #define V_PCH_RTC_REGISTERA_RS_125MS 0x0D // 125 ms
  941. #define V_PCH_RTC_REGISTERA_RS_250MS 0x0E // 250 ms
  942. #define V_PCH_RTC_REGISTERA_RS_500MS 0x0F // 500 ms
  943. #define R_PCH_RTC_REGISTERB 0x0B // RTC Register B
  944. #define B_PCH_RTC_REGISTERB_SET BIT7 // Update Cycle Inhibit 1: Stop auto update, begin set value; 0: Update cycle occurs
  945. #define B_PCH_RTC_REGISTERB_PIE BIT6 // Periodic Interrupt Enable
  946. #define B_PCH_RTC_REGISTERB_AIE BIT5 // Alarm Interrupt Enable
  947. #define B_PCH_RTC_REGISTERB_UIE BIT4 // Update-ended Interrupt Enable
  948. #define B_PCH_RTC_REGISTERB_SQWE BIT3 // Square Wave Enable (Not implemented)
  949. #define B_PCH_RTC_REGISTERB_DM BIT2 // Data Mode 1: Binary; 0:BCD
  950. #define B_PCH_RTC_REGISTERB_HF BIT1 // Hour Format 1: 24 mode; 0: 12 mode.
  951. #define B_PCH_RTC_REGISTERB_DSE BIT0 // Daylight Savings Enable (Not Implemented)
  952. #define R_PCH_RTC_REGISTERC 0x0C // RTC Register C
  953. #define B_PCH_RTC_REGISTERC_IRQF BIT7 // Interrupt Request Flag
  954. #define B_PCH_RTC_REGISTERC_PF BIT6 // Periodic Interrupt Flag
  955. #define B_PCH_RTC_REGISTERC_AF BIT5 // Alarm Flag
  956. #define B_PCH_RTC_REGISTERC_UF BIT4 // Update-ended Flag
  957. #define B_PCH_RTC_REGISTERC_RESERVED (BIT3 | BIT2 | BIT1 | BIT0)
  958. #define R_PCH_RTC_REGISTERD 0x0D // RTC Register D
  959. #define B_PCH_RTC_REGISTERD_VRT BIT7 // Valid RAM and Time Bit
  960. #define B_PCH_RTC_REGISTERD_RESERVED BIT6
  961. #define B_PCH_RTC_REGISTERD_DA 0x3F // Date Alarm
  962. #define B_PCH_RTC_CENTURY 0x32 // Century Data
  963. //
  964. // APM Registers
  965. //
  966. #define R_PCH_APM_CNT 0xB2 // Advanced Power Management Control Port
  967. #define R_PCH_APM_STS 0xB3 // Advanced Power Management Status Port
  968. //
  969. // INIT Register
  970. //
  971. #define R_PCH_PORT92 0x92
  972. #define B_PCH_PORT92_ALT_A20_GATE BIT1 // Alternate A20 Gate
  973. #define B_PCH_PORT92_INIT_NOW BIT0 // Init Now
  974. //
  975. // PCU UART
  976. //
  977. #define R_PCH_COM1_BASE 0x3F8 // COM1 IO BASE
  978. //
  979. // Reset Control Register
  980. //
  981. #define R_PCH_RST_CNT 0xCF9 // Reset Control
  982. #define B_PCH_RST_CNT_FULL_RST BIT3
  983. #define B_PCH_RST_CNT_RST_CPU BIT2
  984. #define B_PCH_RST_CNT_SYS_RST BIT1
  985. #define V_PCH_RST_CNT_FULLRESET 0x0E
  986. #define V_PCH_RST_CNT_HARDRESET 0x06
  987. #define V_PCH_RST_CNT_SOFTRESET 0x04 // Not supported by VLV
  988. #define V_PCH_RST_CNT_HARDSTARTSTATE 0x02
  989. #define V_PCH_RST_CNT_SOFTSTARTSTATE 0x00
  990. //
  991. // Fixed Memory Region
  992. //
  993. //
  994. // IO APIC Registers
  995. //
  996. #define R_PCH_IO_APIC_INDEX 0xFEC00000 // IOAPIC Index Register, 8bit
  997. #define R_PCH_IO_APIC_WINDOW 0xFEC00010 // IOAPIC Window Register, 32bit
  998. #define R_PCH_IO_APIC_EOI 0xFEC00040 // IOAPIC EOI Register, 8bit
  999. #define R_PCH_IO_APIC_ID 0x00 // Identification
  1000. #define B_PCH_IO_APIC_ID_AID (BIT27 | BIT26 | BIT25 | BIT24) // APIC Identification
  1001. #define R_PCH_IO_APIC_VS 0x01 // Version
  1002. #define B_PCH_IO_APIC_VS_MRE 0xFF0000 // Maximum Redirection Entries
  1003. #define B_PCH_IO_APIC_VS_PRQ BIT15 // Pin Assertion Register Supported
  1004. #define B_PCH_IO_APIC_VS_VS 0xFF // Version
  1005. //
  1006. // HPET Registers
  1007. //
  1008. #define R_PCH_PCH_HPET 0xFED00000 // HPET Base Address
  1009. #define R_PCH_PCH_HPET_GCID 0x00 // HPET General Capabilities and ID, 64bit
  1010. #define B_PCH_PCH_HPET_GCID_CTP 0xFFFFFFFF00000000 // Counter Tick Period
  1011. #define B_PCH_PCH_HPET_GCID_VID 0xFFFF0000 // Vendor ID
  1012. #define B_PCH_PCH_HPET_GCID_LRC BIT15 // Legacy Rout Capable
  1013. #define B_PCH_PCH_HPET_GCID_CS BIT13 // Counter Size
  1014. #define B_PCH_PCH_HPET_GCID_NT 0x1F00 // Number of Timers
  1015. #define B_PCH_PCH_HPET_GCID_RID 0xFF // Revision ID
  1016. #define N_PCH_HPET_ADDR_ASEL 12
  1017. #define R_PCH_PCH_HPET_GCFG 0x10 // HPET General Configuration
  1018. #define B_PCH_PCH_HPET_GCFG_LRE BIT1 // Legacy Rout Enable
  1019. #define B_PCH_PCH_HPET_GCFG_EN BIT0 // Overall Enable
  1020. #define R_PCH_PCH_HPET_GIS 0x20 // HPET General Interrupt Status
  1021. #define B_PCH_PCH_HPET_GIS_T2 BIT2 // Timer 2 Status
  1022. #define B_PCH_PCH_HPET_GIS_T1 BIT1 // Timer 1 Status
  1023. #define B_PCH_PCH_HPET_GIS_T0 BIT0 // Timer 0 Status
  1024. #define R_PCH_PCH_HPET_MCV 0xF0 // HPET Main Counter Value, 64bit
  1025. #define R_PCH_PCH_HPET_T0C 0x100 // HPET Timer 0 Config and Capabilities
  1026. #define R_PCH_PCH_HPET_T0CV_L 0x108 // HPET Timer 0 Lower Comparator Value
  1027. #define R_PCH_PCH_HPET_T0CV_H 0x10C // HPET Timer 0 Upper Comparator Value
  1028. #define R_PCH_PCH_HPET_T1C 0x120 // HPET Timer 1 Config and Capabilities
  1029. #define R_PCH_PCH_HPET_T1CV 0x128 // HPET Timer 1 Comparator Value
  1030. #define R_PCH_PCH_HPET_T2C 0x140 // HPET Timer 2 Config and Capabilities
  1031. #define R_PCH_PCH_HPET_T2CV 0x148 // HPET Timer 2 Comparator Value
  1032. #define B_PCH_PCH_HPET_TXC_IRC 0xFFFFFFFF00000000 // Interrupt Rout Capability
  1033. #define B_PCH_PCH_HPET_TXC_FID BIT15 // FSB Interrupt Delivery
  1034. #define B_PCH_PCH_HPET_TXC_FE BIT14 // FSB Enable
  1035. #define B_PCH_PCH_HPET_TXC_IR 0x3E00 // Interrupt Rout
  1036. #define B_PCH_PCH_HPET_TXC_T32M BIT8 // Timer 32-bit Mode
  1037. #define B_PCH_PCH_HPET_TXC_TVS BIT6 // Timer Value Set
  1038. #define B_PCH_PCH_HPET_TXC_TS BIT5 // Timer Size
  1039. #define B_PCH_PCH_HPET_TXC_PIC BIT4 // Periodic Interrupt Capable
  1040. #define B_PCH_PCH_HPET_TXC_TYP BIT3 // Timer Type
  1041. #define B_PCH_PCH_HPET_TXC_IE BIT2 // Interrupt Enable
  1042. #define B_PCH_PCH_HPET_TXC_IT BIT1 // Timer Interrupt Type
  1043. #endif