Advertisement
Guest User

Untitled

a guest
May 19th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.73 KB | None | 0 0
  1. +DefinitionBlock ("DSDT.aml", "DSDT", 1, "LXBIOS", "LXB-DSDT", 1)
  2. +{
  3. + /* Define the main processor.*/
  4. + Scope (\_PR)
  5. + {
  6. + Processor (\_PR.CPU0, 0x00, 0x000000, 0x00) {}
  7. + Processor (\_PR.CPU1, 0x01, 0x000000, 0x00) {}
  8. + }
  9. +
  10. + /* For now only define 2 power states:
  11. + * - S0 which is fully on
  12. + * - S5 which is soft off
  13. + * Any others would involve declaring the wake up methods.
  14. + */
  15. + Name (\_S0, Package () { 0x05, 0x05, 0x00, 0x00 })
  16. + Name (\_S5, Package () { 0x00, 0x00, 0x00, 0x00 })
  17. +
  18. + /* Root of the bus hierarchy */
  19. + Scope (\_SB)
  20. + {
  21. + /* Top PCI device */
  22. + Device (PCI0)
  23. + {
  24. + Name (_HID, EisaId ("PNP0A03"))
  25. + Name (_ADR, 0x00)
  26. + Name (_UID, 0x00)
  27. + Name (_BBN, 0x00)
  28. +
  29. + /* PCI Routing Table */
  30. + /* aaa */
  31. + Name (_PRT, Package () {
  32. + // Package (0x04) { 0x0001FFFF, 0, 0, 0xB },
  33. + // Package (0x04) { 0x0004FFFF, 3, 0, 0xB }, // { dev, int pin, static routing 0/1, irq }
  34. +
  35. + // Package (0x04) { 0x0009FFFF, 0, 0, 0xB },
  36. + // Package (0x04) { 0x0009FFFF, 1, 0, 0xB },
  37. + // Package (0x04) { 0x0009FFFF, 2, 0, 0xB },
  38. + // Package (0x04) { 0x0009FFFF, 3, 0, 0xB },
  39. +
  40. + // Package (0x04) { 0x000AFFFF, 0, 0, 0xB },
  41. + // Package (0x04) { 0x000AFFFF, 1, 0, 0xB },
  42. + // Package (0x04) { 0x000AFFFF, 2, 0, 0xB },
  43. + // Package (0x04) { 0x000AFFFF, 3, 0, 0xB },
  44. +
  45. + // Package (0x04) { 0x000BFFFF, 0, 0, 0xB },
  46. + // Package (0x04) { 0x000BFFFF, 1, 0, 0xB },
  47. + // Package (0x04) { 0x000BFFFF, 2, 0, 0xB },
  48. + // Package (0x04) { 0x000BFFFF, 3, 0, 0xB },
  49. +
  50. + // Package (0x04) { 0x000CFFFF, 0, 0, 0xB },
  51. + // Package (0x04) { 0x000CFFFF, 1, 0, 0xB },
  52. + // Package (0x04) { 0x000CFFFF, 2, 0, 0xB },
  53. + // Package (0x04) { 0x000CFFFF, 3, 0, 0xB },
  54. +
  55. + Package (0x04) { 0x0001FFFF, 0, \_SB.PCI0.LPCB.LNKA, 0 },
  56. + Package (0x04) { 0x0004FFFF, 3, \_SB.PCI0.LPCB.LNKD, 0 }, // { dev, int pin, static routing 0/1, irq }
  57. +
  58. + Package (0x04) { 0x0009FFFF, 0, \_SB.PCI0.LPCB.LNKA, 0 },
  59. + Package (0x04) { 0x0009FFFF, 1, \_SB.PCI0.LPCB.LNKB, 0 },
  60. + Package (0x04) { 0x0009FFFF, 2, \_SB.PCI0.LPCB.LNKC, 0 },
  61. + Package (0x04) { 0x0009FFFF, 3, \_SB.PCI0.LPCB.LNKD, 0 },
  62. +
  63. + Package (0x04) { 0x000AFFFF, 0, \_SB.PCI0.LPCB.LNKA, 0 },
  64. + Package (0x04) { 0x000AFFFF, 1, \_SB.PCI0.LPCB.LNKB, 0 },
  65. + Package (0x04) { 0x000AFFFF, 2, \_SB.PCI0.LPCB.LNKC, 0 },
  66. + Package (0x04) { 0x000AFFFF, 3, \_SB.PCI0.LPCB.LNKD, 0 },
  67. +
  68. + Package (0x04) { 0x000BFFFF, 0, \_SB.PCI0.LPCB.LNKA, 0 },
  69. + Package (0x04) { 0x000BFFFF, 1, \_SB.PCI0.LPCB.LNKB, 0 },
  70. + Package (0x04) { 0x000BFFFF, 2, \_SB.PCI0.LPCB.LNKC, 0 },
  71. + Package (0x04) { 0x000BFFFF, 3, \_SB.PCI0.LPCB.LNKD, 0 },
  72. +
  73. + Package (0x04) { 0x000CFFFF, 0, \_SB.PCI0.LPCB.LNKA, 0 },
  74. + Package (0x04) { 0x000CFFFF, 1, \_SB.PCI0.LPCB.LNKB, 0 },
  75. + Package (0x04) { 0x000CFFFF, 2, \_SB.PCI0.LPCB.LNKC, 0 },
  76. + Package (0x04) { 0x000CFFFF, 3, \_SB.PCI0.LPCB.LNKD, 0 },
  77. +
  78. + })
  79. +
  80. + // Intel LPC Bus Device - 0:7.0
  81. +
  82. + Device (LPCB)
  83. + {
  84. + Name(_ADR, 0x0070000)
  85. +
  86. + OperationRegion(LPC0, PCI_Config, 0x00, 0x100)
  87. + Field (LPC0, AnyAcc, NoLock, Preserve)
  88. + {
  89. + Offset (0x40),
  90. + PMBS, 16, // PMBASE
  91. + Offset (0x60), // Interrupt Routing Registers
  92. + PRTA, 8,
  93. + PRTB, 8,
  94. + PRTC, 8,
  95. + PRTD, 8,
  96. + }
  97. +
  98. + // this should go to some other file maybe
  99. +
  100. + Device (LNKA)
  101. + {
  102. + Name (_HID, EISAID("PNP0C0F"))
  103. + Name (_UID, 1)
  104. +
  105. + // Disable method
  106. + Method (_DIS, 0, Serialized)
  107. + {
  108. + Store (0x80, PRTA)
  109. + }
  110. +
  111. + // Possible Resource Settings for this Link
  112. + Name (_PRS, ResourceTemplate()
  113. + {
  114. + IRQ(Level, ActiveLow, Shared)
  115. + { 1, 3, 4, 5, 6, 7, 10, 12, 14, 15 }
  116. + })
  117. +
  118. + // Current Resource Settings for this link
  119. + Method (_CRS, 0, Serialized)
  120. + {
  121. + Name (RTLA, ResourceTemplate()
  122. + {
  123. + IRQ(Level, ActiveLow, Shared) {}
  124. + })
  125. + CreateWordField(RTLA, 1, IRQ0)
  126. +
  127. + // Clear the WordField
  128. + Store (Zero, IRQ0)
  129. +
  130. + // Set the bit from PRTA
  131. + ShiftLeft(1, And(PRTA, 0x0f), IRQ0)
  132. +
  133. + Return (RTLA)
  134. + }
  135. +
  136. + // Set Resource Setting for this IRQ link
  137. + Method (_SRS, 1, Serialized)
  138. + {
  139. + CreateWordField(Arg0, 1, IRQ0)
  140. +
  141. + // Which bit is set?
  142. + FindSetRightBit(IRQ0, Local0)
  143. +
  144. + Decrement(Local0)
  145. + Store(Local0, PRTA)
  146. + }
  147. +
  148. + // Status
  149. + Method (_STA, 0, Serialized)
  150. + {
  151. + If(And(PRTA, 0x80)) {
  152. + Return (0x9)
  153. + } Else {
  154. + Return (0xb)
  155. + }
  156. + }
  157. + } // LNKA
  158. +
  159. + Device (LNKB)
  160. + {
  161. + Name (_HID, EISAID("PNP0C0F"))
  162. + Name (_UID, 2)
  163. +
  164. + // Disable method
  165. + Method (_DIS, 0, Serialized)
  166. + {
  167. + Store (0x80, PRTB)
  168. + }
  169. +
  170. + // Possible Resource Settings for this Link
  171. + Name (_PRS, ResourceTemplate()
  172. + {
  173. + IRQ(Level, ActiveLow, Shared)
  174. + { 1, 3, 4, 5, 6, 7, 11, 12, 14, 15 }
  175. + })
  176. +
  177. + // Current Resource Settings for this link
  178. + Method (_CRS, 0, Serialized)
  179. + {
  180. + Name (RTLB, ResourceTemplate()
  181. + {
  182. + IRQ(Level, ActiveLow, Shared) {}
  183. + })
  184. + CreateWordField(RTLB, 1, IRQ0)
  185. +
  186. + // Clear the WordField
  187. + Store (Zero, IRQ0)
  188. +
  189. + // Set the bit from PRTB
  190. + ShiftLeft(1, And(PRTB, 0x0f), IRQ0)
  191. +
  192. + Return (RTLB)
  193. + }
  194. +
  195. + // Set Resource Setting for this IRQ link
  196. + Method (_SRS, 1, Serialized)
  197. + {
  198. + CreateWordField(Arg0, 1, IRQ0)
  199. +
  200. + // Which bit is set?
  201. + FindSetRightBit(IRQ0, Local0)
  202. +
  203. + Decrement(Local0)
  204. + Store(Local0, PRTB)
  205. + }
  206. +
  207. + // Status
  208. + Method (_STA, 0, Serialized)
  209. + {
  210. + If(And(PRTB, 0x80)) {
  211. + Return (0x9)
  212. + } Else {
  213. + Return (0xb)
  214. + }
  215. + }
  216. + } // LNKB
  217. +
  218. + Device (LNKC)
  219. + {
  220. + Name (_HID, EISAID("PNP0C0F"))
  221. + Name (_UID, 3)
  222. +
  223. + // Disable method
  224. + Method (_DIS, 0, Serialized)
  225. + {
  226. + Store (0x80, PRTC)
  227. + }
  228. +
  229. + // Possible Resource Settings for this Link
  230. + Name (_PRS, ResourceTemplate()
  231. + {
  232. + IRQ(Level, ActiveLow, Shared)
  233. + { 1, 3, 4, 5, 6, 7, 10, 12, 14, 15 }
  234. + })
  235. +
  236. + // Current Resource Settings for this link
  237. + Method (_CRS, 0, Serialized)
  238. + {
  239. + Name (RTLC, ResourceTemplate()
  240. + {
  241. + IRQ(Level, ActiveLow, Shared) {}
  242. + })
  243. + CreateWordField(RTLC, 1, IRQ0)
  244. +
  245. + // Clear the WordField
  246. + Store (Zero, IRQ0)
  247. +
  248. + // Set the bit from PRTC
  249. + ShiftLeft(1, And(PRTC, 0x0f), IRQ0)
  250. +
  251. + Return (RTLC)
  252. + }
  253. +
  254. + // Set Resource Setting for this IRQ link
  255. + Method (_SRS, 1, Serialized)
  256. + {
  257. + CreateWordField(Arg0, 1, IRQ0)
  258. +
  259. + // Which bit is set?
  260. + FindSetRightBit(IRQ0, Local0)
  261. +
  262. + Decrement(Local0)
  263. + Store(Local0, PRTC)
  264. + }
  265. +
  266. + // Status
  267. + Method (_STA, 0, Serialized)
  268. + {
  269. + If(And(PRTC, 0x80)) {
  270. + Return (0x9)
  271. + } Else {
  272. + Return (0xb)
  273. + }
  274. + }
  275. + } // LNKC
  276. +
  277. + Device (LNKD)
  278. + {
  279. + Name (_HID, EISAID("PNP0C0F"))
  280. + Name (_UID, 4)
  281. +
  282. + // Disable method
  283. + Method (_DIS, 0, Serialized)
  284. + {
  285. + Store (0x80, PRTD)
  286. + }
  287. +
  288. + // Possible Resource Settings for this Link
  289. + Name (_PRS, ResourceTemplate()
  290. + {
  291. + IRQ(Level, ActiveLow, Shared)
  292. + { 1, 3, 4, 5, 6, 7, 11, 12, 14, 15 }
  293. + })
  294. +
  295. + // Current Resource Settings for this link
  296. + Method (_CRS, 0, Serialized)
  297. + {
  298. + Name (RTLD, ResourceTemplate()
  299. + {
  300. + IRQ(Level, ActiveLow, Shared) {}
  301. + })
  302. + CreateWordField(RTLD, 1, IRQ0)
  303. +
  304. + // Clear the WordField
  305. + Store (Zero, IRQ0)
  306. +
  307. + // Set the bit from PRTD
  308. + ShiftLeft(1, And(PRTD, 0x0f), IRQ0)
  309. +
  310. + Return (RTLD)
  311. + }
  312. +
  313. + // Set Resource Setting for this IRQ link
  314. + Method (_SRS, 1, Serialized)
  315. + {
  316. + CreateWordField(Arg0, 1, IRQ0)
  317. +
  318. + // Which bit is set?
  319. + FindSetRightBit(IRQ0, Local0)
  320. +
  321. + Decrement(Local0)
  322. + Store(Local0, PRTD)
  323. + }
  324. +
  325. + // Status
  326. + Method (_STA, 0, Serialized)
  327. + {
  328. + If(And(PRTD, 0x80)) {
  329. + Return (0x9)
  330. + } Else {
  331. + Return (0xb)
  332. + }
  333. + }
  334. + } // LNKD
  335. +
  336. + // end
  337. +
  338. + // now modify the PRT method to use:
  339. +
  340. + // Package() { 0x0003ffff, 0, \_SB.PCI0.LPCB.LNKA, 0},
  341. + // Package() { 0x0003ffff, 1, \_SB.PCI0.LPCB.LNKB, 0},
  342. + // Package() { 0x0003ffff, 2, \_SB.PCI0.LPCB.LNKC, 0},
  343. + // Package() { 0x0003ffff, 3, \_SB.PCI0.LPCB.LNKD, 0},
  344. +
  345. + } // LPCB
  346. +
  347. + Device (ISA) {
  348. + Name (_ADR, 0x00110000)
  349. +
  350. + /* PS/2 keyboard (seems to be important for WinXP install) */
  351. + Device (KBD)
  352. + {
  353. + Name (_HID, EisaId ("PNP0303"))
  354. + Method (_STA, 0, NotSerialized)
  355. + {
  356. + Return (0x0f)
  357. + }
  358. + Method (_CRS, 0, NotSerialized)
  359. + {
  360. + Name (TMP, ResourceTemplate () {
  361. + IO (Decode16, 0x0060, 0x0060, 0x01, 0x01)
  362. + IO (Decode16, 0x0064, 0x0064, 0x01, 0x01)
  363. + IRQNoFlags () {1}
  364. + })
  365. + Return (TMP)
  366. + }
  367. + }
  368. +
  369. + /* PS/2 mouse */
  370. + Device (MOU)
  371. + {
  372. + Name (_HID, EisaId ("PNP0F13"))
  373. + Method (_STA, 0, NotSerialized)
  374. + {
  375. + Return (0x0f)
  376. + }
  377. + Method (_CRS, 0, NotSerialized)
  378. + {
  379. + Name (TMP, ResourceTemplate () {
  380. + IRQNoFlags () {12}
  381. + })
  382. + Return (TMP)
  383. + }
  384. + }
  385. +
  386. + /* PS/2 floppy controller */
  387. + Device (FDC0)
  388. + {
  389. + Name (_HID, EisaId ("PNP0700"))
  390. + Method (_STA, 0, NotSerialized)
  391. + {
  392. + Return (0x0f)
  393. + }
  394. + Method (_CRS, 0, NotSerialized)
  395. + {
  396. + Name (BUF0, ResourceTemplate () {
  397. + IO (Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
  398. + IO (Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
  399. + IRQNoFlags () {6}
  400. + DMA (Compatibility, NotBusMaster, Transfer8) {2}
  401. + })
  402. + Return (BUF0)
  403. + }
  404. + }
  405. + }
  406. + }
  407. +
  408. + }
  409. +}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement