Kyösti Mälkki | 7b73e852 | 2022-11-08 04:43:41 +0000 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | Device (MBRS) |
| 4 | { |
| 5 | Name (_HID, EisaId ("PNP0C01")) |
| 6 | Name (_UID, 0x01) |
| 7 | Name (MSBF, ResourceTemplate () |
| 8 | { |
| 9 | /* System memory */ |
| 10 | QWordMemory (ResourceProducer, PosDecode, MinFixed, |
| 11 | MaxNotFixed, Prefetchable, ReadWrite, |
| 12 | 0x0, 0x100000000, 0x400000000, 0x0, 0x0, ,, _Y1C, |
| 13 | AddressRangeMemory, TypeStatic) |
| 14 | |
| 15 | /* Top Of Low Memory */ |
| 16 | Memory32 (ReadOnly, 0x0, 0x0, 0x1, 0x0, _Y1D) |
| 17 | |
| 18 | /* 640kB who wants more? */ |
| 19 | Memory32Fixed (ReadWrite, 0x0, 0xA0000, ) |
| 20 | |
| 21 | /* 64k BIOS bootblock */ |
| 22 | Memory32Fixed (ReadOnly, 0xF0000, 0x10000,) |
| 23 | |
| 24 | /* ISA memory hole 15-16 MB ? */ |
| 25 | /* Memory32Fixed (ReadOnly, 0x100000, 0xF00000,) */ |
| 26 | /* ISA memory hole 14-15 MB ? */ |
| 27 | /* Memory32Fixed (ReadOnly, 0x100000, 0xE00000,) */ |
| 28 | |
| 29 | /* Local APIC */ |
| 30 | Memory32Fixed (ReadWrite, 0xFEE00000, 0x00001000,) |
| 31 | }) |
| 32 | |
| 33 | Method (_CRS, 0, NotSerialized) |
| 34 | { |
| 35 | CreateQWordField (MSBF, \_SB.MBRS._Y1C._MIN, MEML) |
| 36 | CreateQWordField (MSBF, \_SB.MBRS._Y1C._MAX, MEMM) |
| 37 | CreateQWordField (MSBF, \_SB.MBRS._Y1C._LEN, LELM) |
| 38 | |
Felix Singer | 35e65a8 | 2022-12-16 07:11:17 +0100 | [diff] [blame^] | 39 | Local1 = \_SB.PCI0.RLAR & 0x03FF |
Kyösti Mälkki | 7b73e852 | 2022-11-08 04:43:41 +0000 | [diff] [blame] | 40 | Local1++ |
| 41 | If (Local1 > 0x40) |
| 42 | { |
Felix Singer | 3c9291b | 2022-12-16 02:43:56 +0100 | [diff] [blame] | 43 | LELM = Local1 << 0x1A |
Kyösti Mälkki | 7b73e852 | 2022-11-08 04:43:41 +0000 | [diff] [blame] | 44 | } |
| 45 | |
| 46 | |
| 47 | CreateDWordField (MSBF, \_SB.MBRS._Y1D._MIN, MS00) |
| 48 | CreateDWordField (MSBF, \_SB.MBRS._Y1D._MAX, MS01) |
| 49 | CreateDWordField (MSBF, \_SB.MBRS._Y1D._LEN, MEM2) |
Felix Singer | 35e65a8 | 2022-12-16 07:11:17 +0100 | [diff] [blame^] | 50 | Local1 = \_SB.PCI0.TOLM & 0xF800 |
Felix Singer | 034920c | 2022-12-16 02:25:30 +0100 | [diff] [blame] | 51 | Local1 >>= 4 |
Kyösti Mälkki | 7b73e852 | 2022-11-08 04:43:41 +0000 | [diff] [blame] | 52 | Local1-- |
| 53 | If (Local1 > 0x10) |
| 54 | { |
| 55 | Local1 -= 0x0F |
Felix Singer | 372573e | 2022-12-16 03:49:55 +0100 | [diff] [blame] | 56 | MEM2 = Local1 << 0x14 |
Felix Singer | c64c9cd | 2022-12-12 04:59:05 +0100 | [diff] [blame] | 57 | MS00 = 0x01000000 |
| 58 | MS01 = MS00 |
Kyösti Mälkki | 7b73e852 | 2022-11-08 04:43:41 +0000 | [diff] [blame] | 59 | } |
| 60 | |
| 61 | Return (MSBF) |
| 62 | } |
| 63 | |
| 64 | Method (_STA, 0, NotSerialized) |
| 65 | { |
| 66 | Return (0x0F) |
| 67 | } |
| 68 | } |