blob: af5dcfee5664eb447e0975b34380beb8a70855ca [file] [log] [blame]
Aaron Durbin9a7d7bc2013-09-07 00:41:48 -05001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2013 Google Inc.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; version 2 of
9 * the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
19 * MA 02110-1301 USA
20 */
21
22Scope(\)
23{
24 // IO-Trap at 0x800. This is the ACPI->SMI communication interface.
25
26 OperationRegion(IO_T, SystemIO, 0x800, 0x10)
27 Field(IO_T, ByteAcc, NoLock, Preserve)
28 {
29 Offset(0x8),
30 TRP0, 8 // IO-Trap at 0x808
31 }
32}
Duncan Laurie7fbe20b2013-11-04 17:00:22 -080033
Duncan Laurie053bd072013-11-04 17:19:16 -080034Name(_HID,EISAID("PNP0A08")) // PCIe
35Name(_CID,EISAID("PNP0A03")) // PCI
36
37Name(_ADR, 0)
38Name(_BBN, 0)
39
40Method (_CRS, 0, Serialized)
41{
42 Name (MCRS, ResourceTemplate()
43 {
44 // Bus Numbers
45 WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
46 0x0000, 0x0000, 0x00ff, 0x0000, 0x0100,,, PB00)
47
48 // IO Region 0
49 DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
50 0x0000, 0x0000, 0x0cf7, 0x0000, 0x0cf8,,, PI00)
51
52 // PCI Config Space
53 Io (Decode16, 0x0cf8, 0x0cf8, 0x0001, 0x0008)
54
55 // IO Region 1
56 DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
57 0x0000, 0x0d00, 0xffff, 0x0000, 0xf300,,, PI01)
58
59 // VGA memory (0xa0000-0xbffff)
60 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
61 Cacheable, ReadWrite,
62 0x00000000, 0x000a0000, 0x000bffff, 0x00000000,
63 0x00020000,,, ASEG)
64
65 // OPROM reserved (0xc0000-0xc3fff)
66 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
67 Cacheable, ReadWrite,
68 0x00000000, 0x000c0000, 0x000c3fff, 0x00000000,
69 0x00004000,,, OPR0)
70
71 // OPROM reserved (0xc4000-0xc7fff)
72 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
73 Cacheable, ReadWrite,
74 0x00000000, 0x000c4000, 0x000c7fff, 0x00000000,
75 0x00004000,,, OPR1)
76
77 // OPROM reserved (0xc8000-0xcbfff)
78 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
79 Cacheable, ReadWrite,
80 0x00000000, 0x000c8000, 0x000cbfff, 0x00000000,
81 0x00004000,,, OPR2)
82
83 // OPROM reserved (0xcc000-0xcffff)
84 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
85 Cacheable, ReadWrite,
86 0x00000000, 0x000cc000, 0x000cffff, 0x00000000,
87 0x00004000,,, OPR3)
88
89 // OPROM reserved (0xd0000-0xd3fff)
90 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
91 Cacheable, ReadWrite,
92 0x00000000, 0x000d0000, 0x000d3fff, 0x00000000,
93 0x00004000,,, OPR4)
94
95 // OPROM reserved (0xd4000-0xd7fff)
96 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
97 Cacheable, ReadWrite,
98 0x00000000, 0x000d4000, 0x000d7fff, 0x00000000,
99 0x00004000,,, OPR5)
100
101 // OPROM reserved (0xd8000-0xdbfff)
102 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
103 Cacheable, ReadWrite,
104 0x00000000, 0x000d8000, 0x000dbfff, 0x00000000,
105 0x00004000,,, OPR6)
106
107 // OPROM reserved (0xdc000-0xdffff)
108 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
109 Cacheable, ReadWrite,
110 0x00000000, 0x000dc000, 0x000dffff, 0x00000000,
111 0x00004000,,, OPR7)
112
113 // BIOS Extension (0xe0000-0xe3fff)
114 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
115 Cacheable, ReadWrite,
116 0x00000000, 0x000e0000, 0x000e3fff, 0x00000000,
117 0x00004000,,, ESG0)
118
119 // BIOS Extension (0xe4000-0xe7fff)
120 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
121 Cacheable, ReadWrite,
122 0x00000000, 0x000e4000, 0x000e7fff, 0x00000000,
123 0x00004000,,, ESG1)
124
125 // BIOS Extension (0xe8000-0xebfff)
126 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
127 Cacheable, ReadWrite,
128 0x00000000, 0x000e8000, 0x000ebfff, 0x00000000,
129 0x00004000,,, ESG2)
130
131 // BIOS Extension (0xec000-0xeffff)
132 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
133 Cacheable, ReadWrite,
134 0x00000000, 0x000ec000, 0x000effff, 0x00000000,
135 0x00004000,,, ESG3)
136
137 // System BIOS (0xf0000-0xfffff)
138 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
139 Cacheable, ReadWrite,
140 0x00000000, 0x000f0000, 0x000fffff, 0x00000000,
141 0x00010000,,, FSEG)
142
143 // PCI Memory Region (Top of memory-0xfeafffff)
144 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
145 Cacheable, ReadWrite,
146 0x00000000, 0x00000000, 0xfeafffff, 0x00000000,
147 0xfeb00000,,, PMEM)
148
149 // TPM Area (0xfed40000-0xfed44fff)
150 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
151 Cacheable, ReadWrite,
152 0x00000000, 0xfed40000, 0xfed44fff, 0x00000000,
153 0x00005000,,, TPMR)
154 })
155
156 // Update PCI resource area
157 CreateDwordField(MCRS, PMEM._MIN, PMIN)
158 CreateDwordField(MCRS, PMEM._MAX, PMAX)
159 CreateDwordField(MCRS, PMEM._LEN, PLEN)
160
161 // TOLM is BMBOUND accessible from IOSF so is saved in NVS
162 Store (\TOLM, PMIN)
163 Add (Subtract (PMAX, PMIN), 1, PLEN)
164
165 Return (MCRS)
166}
167
Duncan Laurie7fbe20b2013-11-04 17:00:22 -0800168/* Device Resource Consumption */
169Device (PDRC)
170{
171 Name (_HID, EISAID("PNP0C02"))
172 Name (_UID, 1)
173
174 Name (PDRS, ResourceTemplate() {
175 Memory32Fixed(ReadWrite, ABORT_BASE_ADDRESS, ABORT_BASE_SIZE)
176 Memory32Fixed(ReadWrite, MCFG_BASE_ADDRESS, MCFG_BASE_SIZE)
177 Memory32Fixed(ReadWrite, PMC_BASE_ADDRESS, PMC_BASE_SIZE)
178 Memory32Fixed(ReadWrite, IO_BASE_ADDRESS, IO_BASE_SIZE)
179 Memory32Fixed(ReadWrite, ILB_BASE_ADDRESS, ILB_BASE_SIZE)
180 Memory32Fixed(ReadWrite, SPI_BASE_ADDRESS, SPI_BASE_SIZE)
181 Memory32Fixed(ReadWrite, MPHY_BASE_ADDRESS, MPHY_BASE_SIZE)
182 Memory32Fixed(ReadWrite, PUNIT_BASE_ADDRESS, PUNIT_BASE_SIZE)
183 Memory32Fixed(ReadWrite, RCBA_BASE_ADDRESS, RCBA_BASE_SIZE)
184#if CONFIG_CHROMEOS_RAMOOPS
185 Memory32Fixed(ReadWrite, CONFIG_CHROMEOS_RAMOOPS_RAM_START,
186 CONFIG_CHROMEOS_RAMOOPS_RAM_SIZE)
187#endif
188 })
189
190 // Current Resource Settings
191 Method (_CRS, 0, Serialized)
192 {
193 Return(PDRS)
194 }
195}