2 * This file is part of the coreboot project.
4 * Copyright (C) 2013 Google Inc.
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
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.
17 #include <soc/intel/fsp_baytrail/baytrail/iomap.h>
18 #include <soc/intel/fsp_baytrail/baytrail/irq.h>
19 #include "../baytrail/baytrail.h"
23 // IO-Trap at 0x800. This is the ACPI->SMI communication interface.
25 OperationRegion(IO_T, SystemIO, 0x800, 0x10)
26 Field(IO_T, ByteAcc, NoLock, Preserve)
29 TRP0, 8 // IO-Trap at 0x808
33 OperationRegion(ILBS, SystemMemory, ILB_BASE_ADDRESS, ILB_BASE_SIZE)
34 Field (ILBS, AnyAcc, NoLock, Preserve)
48 Name(_HID,EISAID("PNP0A08")) // PCIe
49 Name(_CID,EISAID("PNP0A03")) // PCI
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 // OPROM reserved (0xc0000-0xc3fff)
78 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
80 0x00000000, 0x000c0000, 0x000c3fff, 0x00000000,
83 // OPROM reserved (0xc4000-0xc7fff)
84 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
86 0x00000000, 0x000c4000, 0x000c7fff, 0x00000000,
89 // OPROM reserved (0xc8000-0xcbfff)
90 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
92 0x00000000, 0x000c8000, 0x000cbfff, 0x00000000,
95 // OPROM reserved (0xcc000-0xcffff)
96 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
98 0x00000000, 0x000cc000, 0x000cffff, 0x00000000,
101 // OPROM reserved (0xd0000-0xd3fff)
102 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
103 Cacheable, ReadWrite,
104 0x00000000, 0x000d0000, 0x000d3fff, 0x00000000,
107 // OPROM reserved (0xd4000-0xd7fff)
108 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
109 Cacheable, ReadWrite,
110 0x00000000, 0x000d4000, 0x000d7fff, 0x00000000,
113 // OPROM reserved (0xd8000-0xdbfff)
114 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
115 Cacheable, ReadWrite,
116 0x00000000, 0x000d8000, 0x000dbfff, 0x00000000,
119 // OPROM reserved (0xdc000-0xdffff)
120 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
121 Cacheable, ReadWrite,
122 0x00000000, 0x000dc000, 0x000dffff, 0x00000000,
125 // BIOS Extension (0xe0000-0xe3fff)
126 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
127 Cacheable, ReadWrite,
128 0x00000000, 0x000e0000, 0x000e3fff, 0x00000000,
131 // BIOS Extension (0xe4000-0xe7fff)
132 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
133 Cacheable, ReadWrite,
134 0x00000000, 0x000e4000, 0x000e7fff, 0x00000000,
137 // BIOS Extension (0xe8000-0xebfff)
138 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
139 Cacheable, ReadWrite,
140 0x00000000, 0x000e8000, 0x000ebfff, 0x00000000,
143 // BIOS Extension (0xec000-0xeffff)
144 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
145 Cacheable, ReadWrite,
146 0x00000000, 0x000ec000, 0x000effff, 0x00000000,
149 // System BIOS (0xf0000-0xfffff)
150 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
151 Cacheable, ReadWrite,
152 0x00000000, 0x000f0000, 0x000fffff, 0x00000000,
155 // PCI Memory Region (Top of memory-CONFIG_MMCONF_BASE_ADDRESS)
156 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
157 Cacheable, ReadWrite,
158 0x00000000, 0x00000000, 0x00000000, 0x00000000,
161 // TPM Area (0xfed40000-0xfed44fff)
162 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
163 Cacheable, ReadWrite,
164 0x00000000, 0xfed40000, 0xfed44fff, 0x00000000,
168 Method (_CRS, 0, Serialized)
170 // Update PCI resource area
171 CreateDwordField(MCRS, ^PMEM._MIN, PMIN)
172 CreateDwordField(MCRS, ^PMEM._MAX, PMAX)
173 CreateDwordField(MCRS, ^PMEM._LEN, PLEN)
175 // TOLM is BMBOUND accessible from IOSF so is saved in NVS
177 Store (Subtract(CONFIG_MMCONF_BASE_ADDRESS, 1), PMAX)
178 Add (Subtract (PMAX, PMIN), 1, PLEN)
183 /* Device Resource Consumption */
186 Name (_HID, EISAID("PNP0C02"))
189 Name (PDRS, ResourceTemplate() {
190 Memory32Fixed(ReadWrite, ABORT_BASE_ADDRESS, ABORT_BASE_SIZE)
191 Memory32Fixed(ReadWrite, MCFG_BASE_ADDRESS, MCFG_BASE_SIZE)
192 Memory32Fixed(ReadWrite, PMC_BASE_ADDRESS, PMC_BASE_SIZE)
193 Memory32Fixed(ReadWrite, ILB_BASE_ADDRESS, ILB_BASE_SIZE)
194 Memory32Fixed(ReadWrite, SPI_BASE_ADDRESS, SPI_BASE_SIZE)
195 Memory32Fixed(ReadWrite, MPHY_BASE_ADDRESS, MPHY_BASE_SIZE)
196 Memory32Fixed(ReadWrite, PUNIT_BASE_ADDRESS, PUNIT_BASE_SIZE)
197 Memory32Fixed(ReadWrite, RCBA_BASE_ADDRESS, RCBA_BASE_SIZE)
200 // Current Resource Settings
201 Method (_CRS, 0, Serialized)
209 /* Check for proper GUID */
210 If (LEqual (Arg0, ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766")))
212 /* Let OS control everything */
217 /* Unrecognized UUID */
218 CreateDWordField (Arg3, 0, CDW1)
224 /* IOSF MBI Interface for kernel access */
227 Name (_HID, "INT33BD")
228 Name (_CID, "INT33BD")
231 Name (RBUF, ResourceTemplate ()
233 /* MCR / MDR / MCRX */
234 Memory32Fixed (ReadWrite, 0, 12, RBAR)
239 CreateDwordField (^RBUF, ^RBAR._BAS, RBAS)
240 Store (Add (MCFG_BASE_ADDRESS, 0xD0), RBAS)
258 // IRQ routing for each PCI device
259 #include "irqroute.asl"