Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2011 Kyösti Mälkki <kyosti.malkki@gmail.com> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | Name (PBRS, ResourceTemplate () |
| 17 | { |
| 18 | WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, |
| 19 | 0x0000, 0x0000, 0x00FF, 0x0000, 0x0100, ,, ) |
| 20 | |
| 21 | /* System IO */ |
| 22 | DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, |
| 23 | 0x0, 0x0, 0xffff, 0x0000, 0x10000, ,,, TypeStatic) |
| 24 | IO (Decode16, 0x0CF8, 0x0CF8, 0x08, 0x08, ) |
| 25 | |
| 26 | /* Video RAM */ |
| 27 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, |
| 28 | 0x00000000, 0x000A0000, 0x000BFFFF, |
| 29 | 0x00000000, 0x00020000, ,,, AddressRangeMemory, TypeStatic) |
| 30 | |
| 31 | /* Video ROM */ |
| 32 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, |
| 33 | 0x00000000, 0x000C0000, 0x000C7FFF, |
| 34 | 0x00000000, 0x00008000, ,,, AddressRangeMemory, TypeStatic) |
| 35 | |
| 36 | /* Option ROMs ? */ |
| 37 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, |
| 38 | 0x00000000, 0x000C8000, 0x000DFFFF, |
| 39 | 0x00000000, 0x00018000, ,,, AddressRangeMemory, TypeStatic) |
| 40 | |
| 41 | /* Top Of Lowmemory to IOAPIC */ |
| 42 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, |
Kyösti Mälkki | 3aff1a3 | 2012-04-11 12:19:03 +0300 | [diff] [blame] | 43 | 0x00000000, 0x00000000, 0xFEBFFFFF, |
| 44 | 0x00000000, IO_APIC_ADDR, ,, _Y08, AddressRangeMemory, TypeStatic) |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 45 | }) |
| 46 | |
| 47 | |
| 48 | Method (_CRS, 0, NotSerialized) |
| 49 | { |
| 50 | |
| 51 | /* Top Of Lowmemory to IOAPIC */ |
| 52 | CreateDWordField (PBRS, \_SB.PCI0._Y08._MIN, MEML) |
Kyösti Mälkki | 3aff1a3 | 2012-04-11 12:19:03 +0300 | [diff] [blame] | 53 | CreateDWordField (PBRS, \_SB.PCI0._Y08._MAX, MEMH) |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 54 | CreateDWordField (PBRS, \_SB.PCI0._Y08._LEN, LENM) |
| 55 | And (\_SB.PCI0.TOLM, 0xF800, Local1) |
| 56 | ShiftRight (Local1, 0x04, Local1) |
| 57 | ShiftLeft (Local1, 0x14, MEML) |
Kyösti Mälkki | 3aff1a3 | 2012-04-11 12:19:03 +0300 | [diff] [blame] | 58 | Subtract (IO_APIC_ADDR, 0x01, MEMH) |
| 59 | Subtract (IO_APIC_ADDR, MEML, LENM) |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 60 | |
| 61 | Return (PBRS) |
| 62 | } |
| 63 | |
| 64 | Method (_STA, 0, NotSerialized) |
| 65 | { |
| 66 | Return (0x0F) |
| 67 | } |