LpcDev.asi 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. /** @file
  2. Legacy resource template
  3. Copyright (c) 2013-2015 Intel Corporation.
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #ifndef LPC_DEV_ASI
  7. #define LPC_DEV_ASI
  8. Device(RTC)
  9. {
  10. Name(_HID,EISAID("PNP0B00"))
  11. Name(BUF0,ResourceTemplate() {
  12. IO(Decode16,0x70,0x70,0x01,0x04)
  13. IO(Decode16,0x74,0x74,0x01,0x04)
  14. })
  15. Name(BUF1,ResourceTemplate() {
  16. IO(Decode16,0x70,0x70,0x01,0x04)
  17. IO(Decode16,0x74,0x74,0x01,0x04)
  18. IRQNoFlags(){8}
  19. })
  20. Method(_CRS,0,Serialized)
  21. {
  22. If (HPEA)
  23. {
  24. return (BUF0)
  25. }
  26. Else
  27. {
  28. return (BUF1)
  29. }
  30. }
  31. }
  32. Device(PIC)
  33. {
  34. Name(_HID,EISAID("PNP0000"))
  35. Name(_CRS,ResourceTemplate() {
  36. IO(Decode16,0x20,0x20,0x01,0x1E) // length of 1Eh includes all aliases
  37. IO(Decode16,0xA0,0xA0,0x01,0x1E)
  38. IO(Decode16,0x4D0,0x4D0,0x01,0x02)
  39. })
  40. }
  41. Device(TMR)
  42. {
  43. Name(_HID,EISAID("PNP0100"))
  44. Name(BUF0,ResourceTemplate() {
  45. IO(Decode16,0x40,0x40,0x01,0x04)
  46. IO(Decode16,0x50,0x50,0x01,0x04) // alias
  47. })
  48. Name(BUF1,ResourceTemplate() {
  49. IO(Decode16,0x40,0x40,0x01,0x04)
  50. IO(Decode16,0x50,0x50,0x01,0x04) // alias
  51. IRQNoFlags(){0}
  52. })
  53. Method(_CRS,0,Serialized)
  54. {
  55. If (HPEA)
  56. {
  57. return (BUF0)
  58. }
  59. Else
  60. {
  61. return (BUF1)
  62. }
  63. }
  64. }
  65. Device(SPKR)
  66. {
  67. Name(_HID,EISAID("PNP0800"))
  68. Name(_CRS,ResourceTemplate() {
  69. IO(Decode16,0x61,0x61,0x01,0x01)
  70. })
  71. }
  72. Device(XTRA) // all "PNP0C02" devices- pieces that don't fit anywhere else
  73. {
  74. Name(_HID,EISAID("PNP0C02")) // Generic motherboard devices
  75. Name(CRS,
  76. ResourceTemplate()
  77. {
  78. IO(Decode16,0x2E,0x2E,0x01,0x02)
  79. IO(Decode16,0x4E,0x2E,0x01,0x02)
  80. IO(Decode16,0x63,0x61,0x01,0x01)
  81. IO(Decode16,0x65,0x61,0x01,0x01)
  82. IO(Decode16,0x67,0x61,0x01,0x01)
  83. IO(Decode16,0x80,0x80,0x01,0x01)
  84. IO(Decode16,0x84,0x84,0x01,0x04)
  85. IO(Decode16,0x88,0x88,0x01,0x01)
  86. IO(Decode16,0x8c,0x8c,0x01,0x03)
  87. IO(Decode16,0x92,0x92,0x01,0x01)
  88. IO(
  89. Decode16,
  90. 0,
  91. 0,
  92. 0x01,
  93. 0x10,
  94. FIX1
  95. )
  96. IO(
  97. Decode16,
  98. 0,
  99. 0,
  100. 0x01,
  101. 0x10,
  102. FIX2
  103. )
  104. IO(
  105. Decode16,
  106. 0,
  107. 0,
  108. 0x01,
  109. 0x40,
  110. FIX3
  111. )
  112. IO(
  113. Decode16,
  114. 0,
  115. 0,
  116. 0x01,
  117. 0x40,
  118. FIX5
  119. )
  120. IO(
  121. Decode16,
  122. 0,
  123. 0,
  124. 0x01,
  125. 0x40,
  126. FIX6
  127. )
  128. }
  129. )
  130. Method (_CRS, 0, NotSerialized) {
  131. CreateWordField (CRS, ^FIX1._MIN, MBR0)
  132. Store(\P1BB, MBR0)
  133. CreateWordField (CRS, ^FIX1._MAX, MBR1)
  134. Store(\P1BB, MBR1)
  135. CreateWordField (CRS, ^FIX2._MIN, MBR2)
  136. Store(\PBAB, MBR2)
  137. CreateWordField (CRS, ^FIX2._MAX, MBR3)
  138. Store(\PBAB, MBR3)
  139. CreateWordField (CRS, ^FIX3._MIN, MBR4)
  140. Store(\GP0B, MBR4)
  141. CreateWordField (CRS, ^FIX3._MAX, MBR5)
  142. Store(\GP0B, MBR5)
  143. CreateWordField (CRS, ^FIX5._MIN, MBR8)
  144. Store(\SMBB, MBR8)
  145. CreateWordField (CRS, ^FIX5._MAX, MBR9)
  146. Store(\SMBB, MBR9)
  147. CreateWordField (CRS, ^FIX6._MIN, MBRA)
  148. Store(\WDTB, MBRA)
  149. CreateWordField (CRS, ^FIX6._MAX, MBRB)
  150. Store(\WDTB, MBRB)
  151. return (CRS)
  152. }
  153. }
  154. Device(LGIO) // Legacy GPIO.
  155. {
  156. Name(_HID, "INT3488")
  157. Name(_CID, "INT3488")
  158. Name(CRS,
  159. ResourceTemplate()
  160. {
  161. IO(
  162. Decode16,
  163. 0,
  164. 0,
  165. 0x01,
  166. 0x48,
  167. FIX4
  168. )
  169. }
  170. )
  171. Method (_CRS, 0, NotSerialized) {
  172. CreateWordField (CRS, ^FIX4._MIN, MBR6)
  173. Store(\GPAB, MBR6)
  174. CreateWordField (CRS, ^FIX4._MAX, MBR7)
  175. Store(\GPAB, MBR7)
  176. return (CRS)
  177. }
  178. }
  179. Device(HPET) // High Performance Event Timer
  180. {
  181. Name(_HID,EISAID("PNP0103"))
  182. Name(BUF0,ResourceTemplate()
  183. {
  184. IRQNoFlags() {0}
  185. IRQNoFlags() {8}
  186. Memory32Fixed(ReadOnly, 0, 0, FIX1)
  187. })
  188. Method(_STA,0)
  189. {
  190. // Show this Device only if the OS is WINXP or beyond.
  191. If(LGreaterEqual(OSTP,WINDOWS_XP))
  192. {
  193. If(HPEA)
  194. {
  195. Return(0x000F) // Enabled, do Display.
  196. }
  197. }
  198. Else
  199. {
  200. // OS = WIN98, WINME, or WIN2000.
  201. If(HPEA)
  202. {
  203. Return(0x000B) // Enabled, don't Display.
  204. }
  205. }
  206. Return(0x0000) // Return Nothing.
  207. }
  208. Method(_CRS,0,Serialized)
  209. {
  210. CreateDWordField (BUF0, ^FIX1._BAS, MBR0)
  211. Store(\HPTB, MBR0)
  212. CreateDWordField (BUF0, ^FIX1._LEN, MBR1)
  213. Store(\HPTS, MBR1)
  214. Return(BUF0)
  215. }
  216. }
  217. #endif