2 * This file is part of the coreboot project.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 2 of the License.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
16 #include "../include/soc/iomap.h"
18 Name(_HID,EISAID("PNP0A08")) // PCIe
19 Name(_CID,EISAID("PNP0A03")) // PCI
25 Name(_ADR, 0x00000000) // 0:0.0
27 OperationRegion(MCHP, PCI_Config, 0x00, 0x100)
28 Field (MCHP, DWordAcc, NoLock, Preserve)
30 Offset (0x48), // MCHBAR
35 Offset (0x60), // PCIe BAR
41 Offset (0xa8), // Top of Upper Memory
44 Offset (0xb8), // TSEGMB
47 Offset (0xbc), // Top of Low Used Memory
52 // Current Resource Settings
54 Name (MCRS, ResourceTemplate()
57 WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
58 0x0000, 0x0000, 0x00ff, 0x0000, 0x0100,,, PB00)
61 DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
62 0x0000, 0x0000, 0x0cf7, 0x0000, 0x0cf8,,, PI00)
65 Io (Decode16, 0x0cf8, 0x0cf8, 0x0001, 0x0008)
68 DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
69 0x0000, 0x0d00, 0xffff, 0x0000, 0xf300,,, PI01)
71 // VGA memory (0xa0000-0xbffff)
72 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
74 0x00000000, 0x000a0000, 0x000bffff, 0x00000000,
77 // RAM (0xc0000-0xdffff)
78 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
80 0x00000000, 0x000c0000, 0x000dffff, 0x00000000,
83 // PCI Memory Region (Top of memory-PCIEXBAR)
84 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
85 NonCacheable, ReadWrite,
86 0x00000000, 0x00000000, 0xfebfffff, 0x00000000,
90 // TPM Area (0xfed40000-0xfed44fff)
91 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
93 0x00000000, 0xfed40000, 0xfed44fff, 0x00000000,
97 // PCI Memory Region (TOUUD - 64G)
98 QWORDMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
99 NonCacheable, ReadWrite,
100 0x00000000, 0x00000000, 0x1ffffffff, 0x00000000,
105 Method (_CRS, 0, Serialized)
107 // Find PCI resource area in MCRS
108 CreateDwordField(MCRS, ^PM01._MIN, PMIN)
109 CreateDwordField(MCRS, ^PM01._MAX, PMAX)
110 CreateDwordField(MCRS, ^PM01._LEN, PLEN)
112 // MMIO Low is saved in NVS
115 Add (Subtract (PMAX, PMIN), 1, PLEN)
117 // Find PCI resource area in MCRS
118 CreateQWordField(MCRS, ^PM02._MIN, P2MN)
119 CreateQWordField(MCRS, ^PM02._MAX, P2MX)
120 CreateQWordField(MCRS, ^PM02._LEN, P2LN)
122 // MMIO High is saved in NVS
125 Add(Subtract(P2MX,P2MN),1,P2LN)
130 /* PCI Device Resource Consumption */
133 Name (_HID, EISAID("PNP0C02"))
136 Name (PDRS, ResourceTemplate() {
137 // PCIEXBAR memory range
138 Memory32Fixed(ReadOnly, CONFIG_MMCONF_BASE_ADDRESS, 0x10000000)
140 Memory32Fixed(ReadOnly, 0x00000000, 0x00000000, TSMB)
143 // Current Resource Settings
144 Method (_CRS, 0, Serialized)
146 // Fix up 32-bit TSEG
147 CreateDWordField(PDRS, ^TSMB._BAS, TSMN)
149 CreateDWordField(PDRS, ^TSMB._LEN, TSLN)
157 Name (_ADR, 0x00040000)
160 // Root Complex Event Collector
162 Name (_ADR, 0x00050000)
165 // Virtual root port 2
167 Name (_ADR, 0x00060000)