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