Angel Pons | 3bd1e3d | 2020-04-05 15:47:17 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 2 | |
| 3 | #include <soc/iomap.h> |
| 4 | |
Subrata Banik | 36eb500 | 2020-01-22 16:01:14 +0530 | [diff] [blame] | 5 | Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */) // _HID: Hardware ID |
| 6 | Name (_CID, EisaId ("PNP0A03") /* PCI Bus */) // _CID: Compatible ID |
| 7 | Name (_SEG, Zero) // _SEG: PCI Segment |
| 8 | Name (_UID, Zero) // _UID: Unique ID |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 9 | |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 10 | Device (MCHC) |
| 11 | { |
Duncan Laurie | f966d3b | 2015-08-27 17:19:24 -0700 | [diff] [blame] | 12 | Name (_ADR, 0x00000000) |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 13 | |
| 14 | OperationRegion (MCHP, PCI_Config, 0x00, 0x100) |
| 15 | Field (MCHP, DWordAcc, NoLock, Preserve) |
| 16 | { |
Duncan Laurie | f966d3b | 2015-08-27 17:19:24 -0700 | [diff] [blame] | 17 | Offset(0x40), /* EPBAR (0:0:0:40) */ |
| 18 | EPEN, 1, /* Enable */ |
| 19 | , 11, |
Subrata Banik | 4f65b87 | 2020-01-22 16:05:16 +0530 | [diff] [blame] | 20 | EPBR, 27, /* EPBAR [38:12] */ |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 21 | |
Duncan Laurie | f966d3b | 2015-08-27 17:19:24 -0700 | [diff] [blame] | 22 | Offset(0x48), /* MCHBAR (0:0:0:48) */ |
| 23 | MHEN, 1, /* Enable */ |
| 24 | , 14, |
Subrata Banik | 4f65b87 | 2020-01-22 16:05:16 +0530 | [diff] [blame] | 25 | MHBR, 24, /* MCHBAR [38:15] */ |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 26 | |
Duncan Laurie | f966d3b | 2015-08-27 17:19:24 -0700 | [diff] [blame] | 27 | Offset(0x60), /* PCIEXBAR (0:0:0:60) */ |
| 28 | PXEN, 1, /* Enable */ |
| 29 | PXSZ, 2, /* PCI Express Size */ |
| 30 | , 23, |
Subrata Banik | 4f65b87 | 2020-01-22 16:05:16 +0530 | [diff] [blame] | 31 | PXBR, 13, /* PCI Express BAR [38:26] */ |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 32 | |
Duncan Laurie | f966d3b | 2015-08-27 17:19:24 -0700 | [diff] [blame] | 33 | Offset(0x68), /* DMIBAR (0:0:0:68) */ |
| 34 | DIEN, 1, /* Enable */ |
| 35 | , 11, |
Subrata Banik | 4f65b87 | 2020-01-22 16:05:16 +0530 | [diff] [blame] | 36 | DIBR, 27, /* DMIBAR [38:12] */ |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 37 | |
Duncan Laurie | f966d3b | 2015-08-27 17:19:24 -0700 | [diff] [blame] | 38 | Offset (0x70), /* ME Base Address */ |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 39 | MEBA, 64, |
Subrata Banik | 4f65b87 | 2020-01-22 16:05:16 +0530 | [diff] [blame] | 40 | |
Subrata Banik | e938fb7 | 2020-01-03 14:02:50 +0530 | [diff] [blame] | 41 | Offset (0xa0), |
| 42 | TOM, 64, /* Top of Used Memory */ |
| 43 | TUUD, 64, /* Top of Upper Used Memory */ |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 44 | |
Duncan Laurie | f966d3b | 2015-08-27 17:19:24 -0700 | [diff] [blame] | 45 | Offset (0xbc), /* Top of Low Used Memory */ |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 46 | TLUD, 32, |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 47 | } |
| 48 | } |
| 49 | |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 50 | Method (_CRS, 0, Serialized) |
| 51 | { |
Subrata Banik | e938fb7 | 2020-01-03 14:02:50 +0530 | [diff] [blame] | 52 | Name (MCRS, ResourceTemplate () |
| 53 | { |
| 54 | /* Bus Numbers */ |
| 55 | WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, |
| 56 | 0x0000, 0x0000, 0x00ff, 0x0000, 0x0100) |
| 57 | |
| 58 | /* IO Region 0 */ |
| 59 | DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, |
| 60 | EntireRange, |
| 61 | 0x0000, 0x0000, 0x0cf7, 0x0000, 0x0cf8) |
| 62 | |
| 63 | /* PCI Config Space */ |
| 64 | Io (Decode16, 0x0cf8, 0x0cf8, 0x0001, 0x0008) |
| 65 | |
| 66 | /* IO Region 1 */ |
| 67 | DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, |
| 68 | EntireRange, |
| 69 | 0x0000, 0x0d00, 0xffff, 0x0000, 0xf300) |
| 70 | |
| 71 | /* VGA memory (0xa0000-0xbffff) */ |
| 72 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, |
| 73 | Cacheable, ReadWrite, |
| 74 | 0x00000000, 0x000a0000, 0x000bffff, 0x00000000, |
| 75 | 0x00020000) |
| 76 | |
| 77 | /* OPROM reserved (0xc0000-0xc3fff) */ |
| 78 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, |
| 79 | Cacheable, ReadWrite, |
| 80 | 0x00000000, 0x000c0000, 0x000c3fff, 0x00000000, |
| 81 | 0x00004000) |
| 82 | |
| 83 | /* OPROM reserved (0xc4000-0xc7fff) */ |
| 84 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, |
| 85 | Cacheable, ReadWrite, |
| 86 | 0x00000000, 0x000c4000, 0x000c7fff, 0x00000000, |
| 87 | 0x00004000) |
| 88 | |
| 89 | /* OPROM reserved (0xc8000-0xcbfff) */ |
| 90 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, |
| 91 | Cacheable, ReadWrite, |
| 92 | 0x00000000, 0x000c8000, 0x000cbfff, 0x00000000, |
| 93 | 0x00004000) |
| 94 | |
| 95 | /* OPROM reserved (0xcc000-0xcffff) */ |
| 96 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, |
| 97 | Cacheable, ReadWrite, |
| 98 | 0x00000000, 0x000cc000, 0x000cffff, 0x00000000, |
| 99 | 0x00004000) |
| 100 | |
| 101 | /* OPROM reserved (0xd0000-0xd3fff) */ |
| 102 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, |
| 103 | Cacheable, ReadWrite, |
| 104 | 0x00000000, 0x000d0000, 0x000d3fff, 0x00000000, |
| 105 | 0x00004000) |
| 106 | |
| 107 | /* OPROM reserved (0xd4000-0xd7fff) */ |
| 108 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, |
| 109 | Cacheable, ReadWrite, |
| 110 | 0x00000000, 0x000d4000, 0x000d7fff, 0x00000000, |
| 111 | 0x00004000) |
| 112 | |
| 113 | /* OPROM reserved (0xd8000-0xdbfff) */ |
| 114 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, |
| 115 | Cacheable, ReadWrite, |
| 116 | 0x00000000, 0x000d8000, 0x000dbfff, 0x00000000, |
| 117 | 0x00004000) |
| 118 | |
| 119 | /* OPROM reserved (0xdc000-0xdffff) */ |
| 120 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, |
| 121 | Cacheable, ReadWrite, |
| 122 | 0x00000000, 0x000dc000, 0x000dffff, 0x00000000, |
| 123 | 0x00004000) |
| 124 | |
| 125 | /* BIOS Extension (0xe0000-0xe3fff) */ |
| 126 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, |
| 127 | Cacheable, ReadWrite, |
| 128 | 0x00000000, 0x000e0000, 0x000e3fff, 0x00000000, |
| 129 | 0x00004000) |
| 130 | |
| 131 | /* BIOS Extension (0xe4000-0xe7fff) */ |
| 132 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, |
| 133 | Cacheable, ReadWrite, |
| 134 | 0x00000000, 0x000e4000, 0x000e7fff, 0x00000000, |
| 135 | 0x00004000) |
| 136 | |
| 137 | /* BIOS Extension (0xe8000-0xebfff) */ |
| 138 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, |
| 139 | Cacheable, ReadWrite, |
| 140 | 0x00000000, 0x000e8000, 0x000ebfff, 0x00000000, |
| 141 | 0x00004000) |
| 142 | |
| 143 | /* BIOS Extension (0xec000-0xeffff) */ |
| 144 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, |
| 145 | Cacheable, ReadWrite, |
| 146 | 0x00000000, 0x000ec000, 0x000effff, 0x00000000, |
| 147 | 0x00004000) |
| 148 | |
| 149 | /* System BIOS (0xf0000-0xfffff) */ |
| 150 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, |
| 151 | Cacheable, ReadWrite, |
| 152 | 0x00000000, 0x000f0000, 0x000fffff, 0x00000000, |
| 153 | 0x00010000) |
| 154 | |
| 155 | /* PCI Memory Region (TLUD - 0xdfffffff) */ |
| 156 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, |
| 157 | NonCacheable, ReadWrite, |
| 158 | 0x00000000, 0x00000000, 0xdfffffff, 0x00000000, |
| 159 | 0xE0000000,,, PM01) |
| 160 | |
| 161 | /* PCI Memory Region (TUUD - (TUUD + ABOVE_4G_MMIO_SIZE)) */ |
| 162 | QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, |
| 163 | NonCacheable, ReadWrite, |
| 164 | 0x00000000, 0x10000, 0x1ffff, 0x00000000, |
| 165 | 0x10000,,, PM02) |
| 166 | |
| 167 | /* PCH reserved resource (0xfc800000-0xfe7fffff) */ |
| 168 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, |
| 169 | Cacheable, ReadWrite, |
| 170 | 0x00000000, PCH_PRESERVED_BASE_ADDRESS, 0xfe7fffff, |
| 171 | 0x00000000, PCH_PRESERVED_BASE_SIZE) |
| 172 | |
Subrata Banik | fa8f9ec | 2020-01-22 15:58:39 +0530 | [diff] [blame] | 173 | #if !CONFIG(TPM_CR50) |
Subrata Banik | e938fb7 | 2020-01-03 14:02:50 +0530 | [diff] [blame] | 174 | /* TPM Area (0xfed40000-0xfed44fff) */ |
| 175 | DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, |
| 176 | Cacheable, ReadWrite, |
| 177 | 0x00000000, 0xfed40000, 0xfed44fff, 0x00000000, |
| 178 | 0x00005000) |
Subrata Banik | fa8f9ec | 2020-01-22 15:58:39 +0530 | [diff] [blame] | 179 | #endif |
Subrata Banik | e938fb7 | 2020-01-03 14:02:50 +0530 | [diff] [blame] | 180 | }) |
| 181 | |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 182 | /* Find PCI resource area in MCRS */ |
Subrata Banik | e938fb7 | 2020-01-03 14:02:50 +0530 | [diff] [blame] | 183 | CreateDwordField (MCRS, PM01._MIN, PMIN) |
| 184 | CreateDwordField (MCRS, PM01._MAX, PMAX) |
| 185 | CreateDwordField (MCRS, PM01._LEN, PLEN) |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 186 | |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 187 | /* |
| 188 | * Fix up PCI memory region |
| 189 | * Start with Top of Lower Usable DRAM |
Furquan Shaikh | 01750ef | 2020-05-16 21:41:35 -0700 | [diff] [blame] | 190 | * Lower 20 bits of TOLUD register need to be masked since they contain lock and |
| 191 | * reserved bits. |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 192 | */ |
Furquan Shaikh | 01750ef | 2020-05-16 21:41:35 -0700 | [diff] [blame] | 193 | Local0 = \_SB.PCI0.MCHC.TLUD & (0xfff << 20) |
Furquan Shaikh | c336130 | 2020-05-16 21:38:33 -0700 | [diff] [blame] | 194 | Local1 = \_SB.PCI0.MCHC.MEBA |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 195 | |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 196 | /* Check if ME base is equal */ |
Furquan Shaikh | c336130 | 2020-05-16 21:38:33 -0700 | [diff] [blame] | 197 | If (Local0 == Local1) { |
Furquan Shaikh | 01750ef | 2020-05-16 21:41:35 -0700 | [diff] [blame] | 198 | /* |
| 199 | * Use Top Of Memory instead |
| 200 | * Lower 20 bits of TOM register need to be masked since they contain lock and |
| 201 | * reserved bits. |
| 202 | */ |
| 203 | Local0 = \_SB.PCI0.MCHC.TOM & (0x7ffff << 20) |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 204 | } |
| 205 | |
Elyes HAOUAS | fc29afb | 2020-10-09 15:05:28 +0200 | [diff] [blame^] | 206 | PMIN = Local0 |
Furquan Shaikh | c336130 | 2020-05-16 21:38:33 -0700 | [diff] [blame] | 207 | PLEN = (PMAX - PMIN) + 1 |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 208 | |
| 209 | /* Patch PM02 range based on Memory Size */ |
Furquan Shaikh | c336130 | 2020-05-16 21:38:33 -0700 | [diff] [blame] | 210 | If (A4GS == 0) { |
Subrata Banik | b6df6b0 | 2020-01-03 15:29:02 +0530 | [diff] [blame] | 211 | CreateQwordField (MCRS, PM02._LEN, MSEN) |
Furquan Shaikh | c336130 | 2020-05-16 21:38:33 -0700 | [diff] [blame] | 212 | MSEN = 0 |
Duncan Laurie | f966d3b | 2015-08-27 17:19:24 -0700 | [diff] [blame] | 213 | } Else { |
Subrata Banik | b6df6b0 | 2020-01-03 15:29:02 +0530 | [diff] [blame] | 214 | CreateQwordField (MCRS, PM02._MIN, MMIN) |
| 215 | CreateQwordField (MCRS, PM02._MAX, MMAX) |
| 216 | CreateQwordField (MCRS, PM02._LEN, MLEN) |
| 217 | /* Set 64bit MMIO resource base and length */ |
Furquan Shaikh | c336130 | 2020-05-16 21:38:33 -0700 | [diff] [blame] | 218 | MLEN = A4GS |
| 219 | MMIN = A4GB |
| 220 | MMAX = (MMIN + MLEN) - 1 |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 221 | } |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 222 | |
Subrata Banik | e938fb7 | 2020-01-03 14:02:50 +0530 | [diff] [blame] | 223 | Return (MCRS) |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 224 | } |
| 225 | |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 226 | /* Get MCH BAR */ |
Duncan Laurie | f966d3b | 2015-08-27 17:19:24 -0700 | [diff] [blame] | 227 | Method (GMHB, 0, Serialized) |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 228 | { |
Furquan Shaikh | c336130 | 2020-05-16 21:38:33 -0700 | [diff] [blame] | 229 | Local0 = \_SB.PCI0.MCHC.MHBR << 15 |
Subrata Banik | e938fb7 | 2020-01-03 14:02:50 +0530 | [diff] [blame] | 230 | Return (Local0) |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 231 | } |
| 232 | |
| 233 | /* Get EP BAR */ |
Duncan Laurie | f966d3b | 2015-08-27 17:19:24 -0700 | [diff] [blame] | 234 | Method (GEPB, 0, Serialized) |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 235 | { |
Furquan Shaikh | c336130 | 2020-05-16 21:38:33 -0700 | [diff] [blame] | 236 | Local0 = \_SB.PCI0.MCHC.EPBR << 12 |
Subrata Banik | e938fb7 | 2020-01-03 14:02:50 +0530 | [diff] [blame] | 237 | Return (Local0) |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 238 | } |
| 239 | |
| 240 | /* Get PCIe BAR */ |
Duncan Laurie | f966d3b | 2015-08-27 17:19:24 -0700 | [diff] [blame] | 241 | Method (GPCB, 0, Serialized) |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 242 | { |
Furquan Shaikh | c336130 | 2020-05-16 21:38:33 -0700 | [diff] [blame] | 243 | Local0 = \_SB.PCI0.MCHC.PXBR << 26 |
Subrata Banik | e938fb7 | 2020-01-03 14:02:50 +0530 | [diff] [blame] | 244 | Return (Local0) |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 245 | } |
| 246 | |
| 247 | /* Get PCIe Length */ |
Duncan Laurie | f966d3b | 2015-08-27 17:19:24 -0700 | [diff] [blame] | 248 | Method (GPCL, 0, Serialized) |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 249 | { |
Furquan Shaikh | c336130 | 2020-05-16 21:38:33 -0700 | [diff] [blame] | 250 | Local0 = 0x10000000 >> \_SB.PCI0.MCHC.PXSZ |
Subrata Banik | e938fb7 | 2020-01-03 14:02:50 +0530 | [diff] [blame] | 251 | Return (Local0) |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 252 | } |
| 253 | |
| 254 | /* Get DMI BAR */ |
Duncan Laurie | f966d3b | 2015-08-27 17:19:24 -0700 | [diff] [blame] | 255 | Method (GDMB, 0, Serialized) |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 256 | { |
Furquan Shaikh | c336130 | 2020-05-16 21:38:33 -0700 | [diff] [blame] | 257 | Local0 = \_SB.PCI0.MCHC.DIBR << 12 |
Subrata Banik | e938fb7 | 2020-01-03 14:02:50 +0530 | [diff] [blame] | 258 | Return (Local0) |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 259 | } |
| 260 | |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 261 | /* PCI Device Resource Consumption */ |
| 262 | Device (PDRC) |
| 263 | { |
Duncan Laurie | f966d3b | 2015-08-27 17:19:24 -0700 | [diff] [blame] | 264 | Name (_HID, EISAID ("PNP0C02")) |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 265 | Name (_UID, 1) |
| 266 | |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 267 | Method (_CRS, 0, Serialized) |
| 268 | { |
Subrata Banik | e938fb7 | 2020-01-03 14:02:50 +0530 | [diff] [blame] | 269 | Name (BUF0, ResourceTemplate () |
| 270 | { |
| 271 | /* MCH BAR _BAS will be updated in _CRS below according to |
| 272 | * B0:D0:F0:Reg.48h |
| 273 | */ |
| 274 | Memory32Fixed (ReadWrite, 0, 0x08000, MCHB) |
| 275 | |
| 276 | /* DMI BAR _BAS will be updated in _CRS below according to |
| 277 | * B0:D0:F0:Reg.68h |
| 278 | */ |
| 279 | Memory32Fixed (ReadWrite, 0, 0x01000, DMIB) |
| 280 | |
| 281 | /* EP BAR _BAS will be updated in _CRS below according to |
| 282 | * B0:D0:F0:Reg.40h |
| 283 | */ |
| 284 | Memory32Fixed (ReadWrite, 0, 0x01000, EGPB) |
| 285 | |
| 286 | /* PCI Express BAR _BAS and _LEN will be updated in |
| 287 | * _CRS below according to B0:D0:F0:Reg.60h |
| 288 | */ |
| 289 | Memory32Fixed (ReadWrite, 0, 0, PCIX) |
| 290 | |
Subrata Banik | e938fb7 | 2020-01-03 14:02:50 +0530 | [diff] [blame] | 291 | /* VTD engine memory range. */ |
| 292 | Memory32Fixed (ReadOnly, VTD_BASE_ADDRESS, VTD_BASE_SIZE) |
| 293 | |
Subrata Banik | e938fb7 | 2020-01-03 14:02:50 +0530 | [diff] [blame] | 294 | /* FLASH range */ |
| 295 | Memory32Fixed (ReadOnly, 0, CONFIG_ROM_SIZE, FIOH) |
| 296 | |
| 297 | /* Local APIC range(0xFEE0_0000 to 0xFEEF_FFFF) */ |
| 298 | Memory32Fixed (ReadOnly, 0xFEE00000, 0x100000) |
| 299 | |
| 300 | /* HPET address decode range */ |
| 301 | Memory32Fixed (ReadWrite, HPET_BASE_ADDRESS, 0x400) |
| 302 | }) |
| 303 | |
| 304 | CreateDwordField (BUF0, MCHB._BAS, MBR0) |
Furquan Shaikh | c336130 | 2020-05-16 21:38:33 -0700 | [diff] [blame] | 305 | MBR0 = \_SB.PCI0.GMHB () |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 306 | |
Subrata Banik | e938fb7 | 2020-01-03 14:02:50 +0530 | [diff] [blame] | 307 | CreateDwordField (BUF0, DMIB._BAS, DBR0) |
Furquan Shaikh | c336130 | 2020-05-16 21:38:33 -0700 | [diff] [blame] | 308 | DBR0 = \_SB.PCI0.GDMB () |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 309 | |
Subrata Banik | e938fb7 | 2020-01-03 14:02:50 +0530 | [diff] [blame] | 310 | CreateDwordField (BUF0, EGPB._BAS, EBR0) |
Furquan Shaikh | c336130 | 2020-05-16 21:38:33 -0700 | [diff] [blame] | 311 | EBR0 = \_SB.PCI0.GEPB () |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 312 | |
Subrata Banik | e938fb7 | 2020-01-03 14:02:50 +0530 | [diff] [blame] | 313 | CreateDwordField (BUF0, PCIX._BAS, XBR0) |
Furquan Shaikh | c336130 | 2020-05-16 21:38:33 -0700 | [diff] [blame] | 314 | XBR0 = \_SB.PCI0.GPCB () |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 315 | |
Subrata Banik | e938fb7 | 2020-01-03 14:02:50 +0530 | [diff] [blame] | 316 | CreateDwordField (BUF0, PCIX._LEN, XSZ0) |
Furquan Shaikh | c336130 | 2020-05-16 21:38:33 -0700 | [diff] [blame] | 317 | XSZ0 = \_SB.PCI0.GPCL () |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 318 | |
Subrata Banik | e938fb7 | 2020-01-03 14:02:50 +0530 | [diff] [blame] | 319 | CreateDwordField (BUF0, FIOH._BAS, FBR0) |
Furquan Shaikh | c336130 | 2020-05-16 21:38:33 -0700 | [diff] [blame] | 320 | FBR0 = 0x100000000 - CONFIG_ROM_SIZE |
Subrata Banik | e938fb7 | 2020-01-03 14:02:50 +0530 | [diff] [blame] | 321 | |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 322 | Return (BUF0) |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 323 | } |
| 324 | } |