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. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | */ |
| 19 | |
| 20 | Name (PBRS, ResourceTemplate () |
| 21 | { |
| 22 | WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, |
| 23 | 0x0000, 0x0000, 0x00FF, 0x0000, 0x0100, ,, ) |
| 24 | |
| 25 | /* System IO */ |
| 26 | DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, |
| 27 | 0x0, 0x0, 0xffff, 0x0000, 0x10000, ,,, TypeStatic) |
| 28 | IO (Decode16, 0x0CF8, 0x0CF8, 0x08, 0x08, ) |
| 29 | |
| 30 | /* Video RAM */ |
| 31 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, |
| 32 | 0x00000000, 0x000A0000, 0x000BFFFF, |
| 33 | 0x00000000, 0x00020000, ,,, AddressRangeMemory, TypeStatic) |
| 34 | |
| 35 | /* Video ROM */ |
| 36 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, |
| 37 | 0x00000000, 0x000C0000, 0x000C7FFF, |
| 38 | 0x00000000, 0x00008000, ,,, AddressRangeMemory, TypeStatic) |
| 39 | |
| 40 | /* Option ROMs ? */ |
| 41 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, |
| 42 | 0x00000000, 0x000C8000, 0x000DFFFF, |
| 43 | 0x00000000, 0x00018000, ,,, AddressRangeMemory, TypeStatic) |
| 44 | |
| 45 | /* Top Of Lowmemory to IOAPIC */ |
| 46 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, |
Kyösti Mälkki | 3aff1a3 | 2012-04-11 12:19:03 +0300 | [diff] [blame^] | 47 | 0x00000000, 0x00000000, 0xFEBFFFFF, |
| 48 | 0x00000000, IO_APIC_ADDR, ,, _Y08, AddressRangeMemory, TypeStatic) |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 49 | }) |
| 50 | |
| 51 | |
| 52 | Method (_CRS, 0, NotSerialized) |
| 53 | { |
| 54 | |
| 55 | /* Top Of Lowmemory to IOAPIC */ |
| 56 | CreateDWordField (PBRS, \_SB.PCI0._Y08._MIN, MEML) |
Kyösti Mälkki | 3aff1a3 | 2012-04-11 12:19:03 +0300 | [diff] [blame^] | 57 | CreateDWordField (PBRS, \_SB.PCI0._Y08._MAX, MEMH) |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 58 | CreateDWordField (PBRS, \_SB.PCI0._Y08._LEN, LENM) |
| 59 | And (\_SB.PCI0.TOLM, 0xF800, Local1) |
| 60 | ShiftRight (Local1, 0x04, Local1) |
| 61 | ShiftLeft (Local1, 0x14, MEML) |
Kyösti Mälkki | 3aff1a3 | 2012-04-11 12:19:03 +0300 | [diff] [blame^] | 62 | Subtract (IO_APIC_ADDR, 0x01, MEMH) |
| 63 | Subtract (IO_APIC_ADDR, MEML, LENM) |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 64 | |
| 65 | Return (PBRS) |
| 66 | } |
| 67 | |
| 68 | Method (_STA, 0, NotSerialized) |
| 69 | { |
| 70 | Return (0x0F) |
| 71 | } |
| 72 | |