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