Angel Pons | 236c637 | 2020-04-03 01:21:05 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 2 | |
Elyes HAOUAS | 1194999 | 2019-03-12 10:40:08 +0100 | [diff] [blame] | 3 | #include <arch/ioapic.h> |
| 4 | |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 5 | Name (PBRS, ResourceTemplate () |
| 6 | { |
| 7 | WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, |
| 8 | 0x0000, 0x0000, 0x00FF, 0x0000, 0x0100, ,, ) |
| 9 | |
| 10 | /* System IO */ |
| 11 | DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, |
| 12 | 0x0, 0x0, 0xffff, 0x0000, 0x10000, ,,, TypeStatic) |
| 13 | IO (Decode16, 0x0CF8, 0x0CF8, 0x08, 0x08, ) |
| 14 | |
| 15 | /* Video RAM */ |
| 16 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, |
| 17 | 0x00000000, 0x000A0000, 0x000BFFFF, |
| 18 | 0x00000000, 0x00020000, ,,, AddressRangeMemory, TypeStatic) |
| 19 | |
| 20 | /* Video ROM */ |
| 21 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, |
| 22 | 0x00000000, 0x000C0000, 0x000C7FFF, |
| 23 | 0x00000000, 0x00008000, ,,, AddressRangeMemory, TypeStatic) |
| 24 | |
| 25 | /* Option ROMs ? */ |
| 26 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, |
| 27 | 0x00000000, 0x000C8000, 0x000DFFFF, |
| 28 | 0x00000000, 0x00018000, ,,, AddressRangeMemory, TypeStatic) |
| 29 | |
| 30 | /* Top Of Lowmemory to IOAPIC */ |
| 31 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, |
Kyösti Mälkki | 3aff1a3 | 2012-04-11 12:19:03 +0300 | [diff] [blame] | 32 | 0x00000000, 0x00000000, 0xFEBFFFFF, |
| 33 | 0x00000000, IO_APIC_ADDR, ,, _Y08, AddressRangeMemory, TypeStatic) |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 34 | }) |
| 35 | |
| 36 | |
| 37 | Method (_CRS, 0, NotSerialized) |
| 38 | { |
| 39 | |
| 40 | /* Top Of Lowmemory to IOAPIC */ |
| 41 | CreateDWordField (PBRS, \_SB.PCI0._Y08._MIN, MEML) |
Kyösti Mälkki | 3aff1a3 | 2012-04-11 12:19:03 +0300 | [diff] [blame] | 42 | CreateDWordField (PBRS, \_SB.PCI0._Y08._MAX, MEMH) |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 43 | CreateDWordField (PBRS, \_SB.PCI0._Y08._LEN, LENM) |
| 44 | And (\_SB.PCI0.TOLM, 0xF800, Local1) |
| 45 | ShiftRight (Local1, 0x04, Local1) |
| 46 | ShiftLeft (Local1, 0x14, MEML) |
Felix Singer | cb9f038e | 2021-12-30 01:06:53 +0100 | [diff] [blame^] | 47 | MEMH = IO_APIC_ADDR - 1 |
| 48 | LENM = IO_APIC_ADDR - MEML |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 49 | |
| 50 | Return (PBRS) |
| 51 | } |
| 52 | |
| 53 | Method (_STA, 0, NotSerialized) |
| 54 | { |
| 55 | Return (0x0F) |
| 56 | } |