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.

458 lines
17 KiB

  1. DefinitionBlock("MEM.AML","SSDT",0x1,"MSFT","simulatr",0x1) {
  2. Scope(\_SB) {
  3. Device(XXSP) {
  4. Name(_HID, "SPSIMUL")
  5. Method(_STA) {
  6. return (0xF)
  7. }
  8. Name(AVAL, 0)
  9. OperationRegion(DSTA, 0x99, 0, 0x10)
  10. Field(DSTA, ByteAcc, NoLock, Preserve) {
  11. SMM0, 8,
  12. SMM1, 8,
  13. SMM2, 8,
  14. SMM3, 8,
  15. SMM4, 8,
  16. SMM5, 8,
  17. SMM6, 8,
  18. SMM7, 8
  19. }
  20. Name(SNAM,
  21. Package() {
  22. \_SB.PMM0,
  23. \_SB.PMM1,
  24. \_SB.PMM2,
  25. \_SB.PMM3,
  26. \_SB.PMM4,
  27. \_SB.PMM5,
  28. \_SB.PMM6,
  29. \_SB.PMM7
  30. }
  31. )
  32. OperationRegion(MEMI, 0x9A, 0, 0x100)
  33. Field(MEMI, DwordAcc, NoLock, Preserve) {
  34. MM0A, 32,
  35. MM0L, 32,
  36. MM1A, 32,
  37. MM1L, 32,
  38. MM2A, 32,
  39. MM2L, 32,
  40. MM3A, 32,
  41. MM3L, 32,
  42. MM4A, 32,
  43. MM4L, 32,
  44. MM5A, 32,
  45. MM5L, 32,
  46. MM6A, 32,
  47. MM6L, 32,
  48. MM7A, 32,
  49. MM7L, 32
  50. }
  51. Method(_REG, 2) {
  52. Store(Arg1, AVAL)
  53. }
  54. Method(NOFD, 2) {
  55. if (LEqual(Arg0, 0)) {
  56. Notify(\_SB.PMM0, Arg1)
  57. }
  58. if (LEqual(Arg0, 1)) {
  59. Notify(\_SB.PMM1, Arg1)
  60. }
  61. if (LEqual(Arg0, 2)) {
  62. Notify(\_SB.PMM2, Arg1)
  63. }
  64. if (LEqual(Arg0, 3)) {
  65. Notify(\_SB.PMM3, Arg1)
  66. }
  67. if (LEqual(Arg0, 4)) {
  68. Notify(\_SB.PMM4, Arg1)
  69. }
  70. if (LEqual(Arg0, 5)) {
  71. Notify(\_SB.PMM5, Arg1)
  72. }
  73. if (LEqual(Arg0, 6)) {
  74. Notify(\_SB.PMM6, Arg1)
  75. }
  76. if (LEqual(Arg0, 7)) {
  77. Notify(\_SB.PMM7, Arg1)
  78. }
  79. }
  80. }
  81. Device(PMM0) {
  82. Name(_HID, EISAID("PNP0C80"))
  83. Name(_UID, 0)
  84. Name(_SUN, 0)
  85. Method(_STA) {
  86. If (Land(\_SB.XXSP.AVAL, \_SB.XXSP.MM0L)) {
  87. Store(\_SB.XXSP.SMM0, Local0)
  88. return (Local0)
  89. }
  90. return (0)
  91. }
  92. Method(_EJ0, 1) {
  93. Store(0, \_SB.XXSP.SMM0)
  94. }
  95. Method(_CRS) {
  96. Name(BUF0, ResourceTemplate() {
  97. DWORDMemory( // Consumed-and-produced resource(all of memory space)
  98. ResourceConsumer, // bit 0 of general flags is 0
  99. PosDecode, // positive Decode
  100. MinFixed, // Range is fixed
  101. MaxFixed, // Range is fixed
  102. Cacheable,
  103. ReadWrite,
  104. 0x00000000, // Granularity
  105. 0x00000000, // Min (calculated dynamically)
  106. 0x00000000, // Max
  107. 0x00000000, // Translation
  108. 0x00000000, // Length
  109. , // ResIndex
  110. , // ResSource
  111. MEMD // ResourceTag
  112. )
  113. }
  114. )
  115. CreateDWORDField(BUF0, MEMD._MIN, MMIN)
  116. CreateDWORDField(BUF0, MEMD._MAX, MMAX)
  117. CreateDWORDField(BUF0, MEMD._LEN, MLEN)
  118. Store(\_SB.XXSP.MM0A, MMIN)
  119. Store(\_SB.XXSP.MM0L, MLEN)
  120. Add(MMIN, MLEN, Local0)
  121. Decrement(Local0)
  122. Store(Local0, MMAX)
  123. return (BUF0)
  124. }
  125. }
  126. Device(PMM1) {
  127. Name(_HID, EISAID("PNP0C80"))
  128. Name(_UID, 1)
  129. Name(_SUN, 1)
  130. Method(_STA) {
  131. If (Land(\_SB.XXSP.AVAL, \_SB.XXSP.MM1L)) {
  132. Store(\_SB.XXSP.SMM1, Local0)
  133. return (Local0)
  134. }
  135. return (0)
  136. }
  137. Method(_EJ0, 1) {
  138. Store(0, \_SB.XXSP.SMM1)
  139. }
  140. Method(_CRS) {
  141. Name(BUF0, ResourceTemplate() {
  142. DWORDMemory( // Consumed-and-produced resource(all of memory space)
  143. ResourceConsumer, // bit 0 of general flags is 0
  144. PosDecode, // positive Decode
  145. MinFixed, // Range is fixed
  146. MaxFixed, // Range is fixed
  147. Cacheable,
  148. ReadWrite,
  149. 0x00000000, // Granularity
  150. 0x00000000, // Min (calculated dynamically)
  151. 0x00000000, // Max
  152. 0x00000000, // Translation
  153. 0x00000000, // Length
  154. , // ResIndex
  155. , // ResSource
  156. MEMD // ResourceTag
  157. )
  158. }
  159. )
  160. CreateDWORDField(BUF0, MEMD._MIN, MMIN)
  161. CreateDWORDField(BUF0, MEMD._MAX, MMAX)
  162. CreateDWORDField(BUF0, MEMD._LEN, MLEN)
  163. Store(\_SB.XXSP.MM1A, MMIN)
  164. Store(\_SB.XXSP.MM1L, MLEN)
  165. Add(MMIN, MLEN, Local0)
  166. Decrement(Local0)
  167. Store(Local0, MMAX)
  168. return (BUF0)
  169. }
  170. }
  171. Device(PMM2) {
  172. Name(_HID, EISAID("PNP0C80"))
  173. Name(_UID, 2)
  174. Name(_SUN, 2)
  175. Method(_STA) {
  176. If (Land(\_SB.XXSP.AVAL, \_SB.XXSP.MM2L)) {
  177. Store(\_SB.XXSP.SMM2, Local0)
  178. return (Local0)
  179. }
  180. return (0)
  181. }
  182. Method(_EJ0, 1) {
  183. Store(0, \_SB.XXSP.SMM2)
  184. }
  185. Method(_CRS) {
  186. Name(BUF0, ResourceTemplate() {
  187. DWORDMemory( // Consumed-and-produced resource(all of memory space)
  188. ResourceConsumer, // bit 0 of general flags is 0
  189. PosDecode, // positive Decode
  190. MinFixed, // Range is fixed
  191. MaxFixed, // Range is fixed
  192. Cacheable,
  193. ReadWrite,
  194. 0x00000000, // Granularity
  195. 0x00000000, // Min (calculated dynamically)
  196. 0x00000000, // Max
  197. 0x00000000, // Translation
  198. 0x00000000, // Length
  199. , // ResIndex
  200. , // ResSource
  201. MEMD // ResourceTag
  202. )
  203. }
  204. )
  205. CreateDWORDField(BUF0, MEMD._MIN, MMIN)
  206. CreateDWORDField(BUF0, MEMD._MAX, MMAX)
  207. CreateDWORDField(BUF0, MEMD._LEN, MLEN)
  208. Store(\_SB.XXSP.MM2A, MMIN)
  209. Store(\_SB.XXSP.MM2L, MLEN)
  210. Add(MMIN, MLEN, Local0)
  211. Decrement(Local0)
  212. Store(Local0, MMAX)
  213. return (BUF0)
  214. }
  215. }
  216. Device(PMM3) {
  217. Name(_HID, EISAID("PNP0C80"))
  218. Name(_UID, 3)
  219. Name(_SUN, 3)
  220. Method(_STA) {
  221. If (Land(\_SB.XXSP.AVAL, \_SB.XXSP.MM3L)) {
  222. Store(\_SB.XXSP.SMM3, Local0)
  223. return (Local0)
  224. }
  225. return (0)
  226. }
  227. Method(_EJ0, 1) {
  228. Store(0, \_SB.XXSP.SMM3)
  229. }
  230. Method(_CRS) {
  231. Name(BUF0, ResourceTemplate() {
  232. DWORDMemory( // Consumed-and-produced resource(all of memory space)
  233. ResourceConsumer, // bit 0 of general flags is 0
  234. PosDecode, // positive Decode
  235. MinFixed, // Range is fixed
  236. MaxFixed, // Range is fixed
  237. Cacheable,
  238. ReadWrite,
  239. 0x00000000, // Granularity
  240. 0x00000000, // Min (calculated dynamically)
  241. 0x00000000, // Max
  242. 0x00000000, // Translation
  243. 0x00000000, // Length
  244. , // ResIndex
  245. , // ResSource
  246. MEMD // ResourceTag
  247. )
  248. }
  249. )
  250. CreateDWORDField(BUF0, MEMD._MIN, MMIN)
  251. CreateDWORDField(BUF0, MEMD._MAX, MMAX)
  252. CreateDWORDField(BUF0, MEMD._LEN, MLEN)
  253. Store(\_SB.XXSP.MM3A, MMIN)
  254. Store(\_SB.XXSP.MM3L, MLEN)
  255. Add(MMIN, MLEN, Local0)
  256. Decrement(Local0)
  257. Store(Local0, MMAX)
  258. return (BUF0)
  259. }
  260. }
  261. Device(PMM4) {
  262. Name(_HID, EISAID("PNP0C80"))
  263. Name(_UID, 4)
  264. Name(_SUN, 4)
  265. Method(_STA) {
  266. If (Land(\_SB.XXSP.AVAL, \_SB.XXSP.MM4L)) {
  267. Store(\_SB.XXSP.SMM4, Local0)
  268. return (Local0)
  269. }
  270. return (0)
  271. }
  272. Method(_EJ0, 1) {
  273. Store(0, \_SB.XXSP.SMM4)
  274. }
  275. Method(_CRS) {
  276. Name(BUF0, ResourceTemplate() {
  277. DWORDMemory( // Consumed-and-produced resource(all of memory space)
  278. ResourceConsumer, // bit 0 of general flags is 0
  279. PosDecode, // positive Decode
  280. MinFixed, // Range is fixed
  281. MaxFixed, // Range is fixed
  282. Cacheable,
  283. ReadWrite,
  284. 0x00000000, // Granularity
  285. 0x00000000, // Min (calculated dynamically)
  286. 0x00000000, // Max
  287. 0x00000000, // Translation
  288. 0x00000000, // Length
  289. , // ResIndex
  290. , // ResSource
  291. MEMD // ResourceTag
  292. )
  293. }
  294. )
  295. CreateDWORDField(BUF0, MEMD._MIN, MMIN)
  296. CreateDWORDField(BUF0, MEMD._MAX, MMAX)
  297. CreateDWORDField(BUF0, MEMD._LEN, MLEN)
  298. Store(\_SB.XXSP.MM4A, MMIN)
  299. Store(\_SB.XXSP.MM4L, MLEN)
  300. Add(MMIN, MLEN, Local0)
  301. Decrement(Local0)
  302. Store(Local0, MMAX)
  303. return (BUF0)
  304. }
  305. }
  306. Device(PMM5) {
  307. Name(_HID, EISAID("PNP0C80"))
  308. Name(_UID, 5)
  309. Name(_SUN, 5)
  310. Method(_STA) {
  311. If (Land(\_SB.XXSP.AVAL, \_SB.XXSP.MM5L)) {
  312. Store(\_SB.XXSP.SMM5, Local0)
  313. return (Local0)
  314. }
  315. return (0)
  316. }
  317. Method(_EJ0, 1) {
  318. Store(0, \_SB.XXSP.SMM5)
  319. }
  320. Method(_CRS) {
  321. Name(BUF0, ResourceTemplate() {
  322. DWORDMemory( // Consumed-and-produced resource(all of memory space)
  323. ResourceConsumer, // bit 0 of general flags is 0
  324. PosDecode, // positive Decode
  325. MinFixed, // Range is fixed
  326. MaxFixed, // Range is fixed
  327. Cacheable,
  328. ReadWrite,
  329. 0x00000000, // Granularity
  330. 0x00000000, // Min (calculated dynamically)
  331. 0x00000000, // Max
  332. 0x00000000, // Translation
  333. 0x00000000, // Length
  334. , // ResIndex
  335. , // ResSource
  336. MEMD // ResourceTag
  337. )
  338. }
  339. )
  340. CreateDWORDField(BUF0, MEMD._MIN, MMIN)
  341. CreateDWORDField(BUF0, MEMD._MAX, MMAX)
  342. CreateDWORDField(BUF0, MEMD._LEN, MLEN)
  343. Store(\_SB.XXSP.MM5A, MMIN)
  344. Store(\_SB.XXSP.MM5L, MLEN)
  345. Add(MMIN, MLEN, Local0)
  346. Decrement(Local0)
  347. Store(Local0, MMAX)
  348. return (BUF0)
  349. }
  350. }
  351. Device(PMM6) {
  352. Name(_HID, EISAID("PNP0C80"))
  353. Name(_UID, 6)
  354. Name(_SUN, 6)
  355. Method(_STA) {
  356. If (Land(\_SB.XXSP.AVAL, \_SB.XXSP.MM6L)) {
  357. Store(\_SB.XXSP.SMM6, Local0)
  358. return (Local0)
  359. }
  360. return (0)
  361. }
  362. Method(_EJ0, 1) {
  363. Store(0, \_SB.XXSP.SMM6)
  364. }
  365. Method(_CRS) {
  366. Name(BUF0, ResourceTemplate() {
  367. DWORDMemory( // Consumed-and-produced resource(all of memory space)
  368. ResourceConsumer, // bit 0 of general flags is 0
  369. PosDecode, // positive Decode
  370. MinFixed, // Range is fixed
  371. MaxFixed, // Range is fixed
  372. Cacheable,
  373. ReadWrite,
  374. 0x00000000, // Granularity
  375. 0x00000000, // Min (calculated dynamically)
  376. 0x00000000, // Max
  377. 0x00000000, // Translation
  378. 0x00000000, // Length
  379. , // ResIndex
  380. , // ResSource
  381. MEMD // ResourceTag
  382. )
  383. }
  384. )
  385. CreateDWORDField(BUF0, MEMD._MIN, MMIN)
  386. CreateDWORDField(BUF0, MEMD._MAX, MMAX)
  387. CreateDWORDField(BUF0, MEMD._LEN, MLEN)
  388. Store(\_SB.XXSP.MM6A, MMIN)
  389. Store(\_SB.XXSP.MM6L, MLEN)
  390. Add(MMIN, MLEN, Local0)
  391. Decrement(Local0)
  392. Store(Local0, MMAX)
  393. return (BUF0)
  394. }
  395. }
  396. Device(PMM7) {
  397. Name(_HID, EISAID("PNP0C80"))
  398. Name(_UID, 7)
  399. Name(_SUN, 7)
  400. Method(_STA) {
  401. If (Land(\_SB.XXSP.AVAL, \_SB.XXSP.MM7L)) {
  402. Store(\_SB.XXSP.SMM7, Local0)
  403. return (Local0)
  404. }
  405. return (0)
  406. }
  407. Method(_EJ0, 1) {
  408. Store(0, \_SB.XXSP.SMM7)
  409. }
  410. Method(_CRS) {
  411. Name(BUF0, ResourceTemplate() {
  412. DWORDMemory( // Consumed-and-produced resource(all of memory space)
  413. ResourceConsumer, // bit 0 of general flags is 0
  414. PosDecode, // positive Decode
  415. MinFixed, // Range is fixed
  416. MaxFixed, // Range is fixed
  417. Cacheable,
  418. ReadWrite,
  419. 0x00000000, // Granularity
  420. 0x00000000, // Min (calculated dynamically)
  421. 0x00000000, // Max
  422. 0x00000000, // Translation
  423. 0x00000000, // Length
  424. , // ResIndex
  425. , // ResSource
  426. MEMD // ResourceTag
  427. )
  428. }
  429. )
  430. CreateDWORDField(BUF0, MEMD._MIN, MMIN)
  431. CreateDWORDField(BUF0, MEMD._MAX, MMAX)
  432. CreateDWORDField(BUF0, MEMD._LEN, MLEN)
  433. Store(\_SB.XXSP.MM7A, MMIN)
  434. Store(\_SB.XXSP.MM7L, MLEN)
  435. Add(MMIN, MLEN, Local0)
  436. Decrement(Local0)
  437. Store(Local0, MMAX)
  438. return (BUF0)
  439. }
  440. }
  441. }
  442. }