Patrick Rudolph | fa47042 | 2017-06-20 17:49:53 +0200 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
Patrick Rudolph | fa47042 | 2017-06-20 17:49:53 +0200 | [diff] [blame] | 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation; version 2, or (at your option) |
Frans Hendriks | 01cb55b | 2018-11-28 09:07:54 +0100 | [diff] [blame] | 7 | * any later version of the License. |
Patrick Rudolph | fa47042 | 2017-06-20 17:49:53 +0200 | [diff] [blame] | 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | */ |
| 14 | |
Matt DeVillier | ebe08e0 | 2017-07-14 13:28:42 -0500 | [diff] [blame] | 15 | #include <arch/acpi.h> |
| 16 | #include <types.h> |
| 17 | #include <string.h> |
Matt DeVillier | 53e4195 | 2017-06-27 13:07:43 -0500 | [diff] [blame] | 18 | #include <cbfs.h> |
Patrick Rudolph | fa47042 | 2017-06-20 17:49:53 +0200 | [diff] [blame] | 19 | #include <device/device.h> |
| 20 | #include <device/pci.h> |
| 21 | #include <device/pci_ids.h> |
| 22 | #include <device/pci_ops.h> |
Patrick Rudolph | bac2303 | 2017-06-30 15:18:23 +0200 | [diff] [blame] | 23 | #include <console/console.h> |
| 24 | #include <cbmem.h> |
Matt DeVillier | ebe08e0 | 2017-07-14 13:28:42 -0500 | [diff] [blame] | 25 | #include "intel_bios.h" |
Patrick Rudolph | fa47042 | 2017-06-20 17:49:53 +0200 | [diff] [blame] | 26 | #include "opregion.h" |
| 27 | |
Patrick Georgi | 4a3956d | 2018-05-03 19:15:13 +0200 | [diff] [blame] | 28 | __weak |
| 29 | const char *mainboard_vbt_filename(void) |
| 30 | { |
| 31 | return "vbt.bin"; |
| 32 | } |
| 33 | |
| 34 | static char vbt_data[8 * KiB]; |
Aaron Durbin | 44f8065 | 2018-05-11 11:43:52 -0600 | [diff] [blame] | 35 | static size_t vbt_data_sz; |
Patrick Georgi | 4a3956d | 2018-05-03 19:15:13 +0200 | [diff] [blame] | 36 | |
| 37 | void *locate_vbt(size_t *vbt_size) |
| 38 | { |
| 39 | uint32_t vbtsig = 0; |
| 40 | |
Aaron Durbin | 44f8065 | 2018-05-11 11:43:52 -0600 | [diff] [blame] | 41 | if (vbt_data_sz != 0) { |
| 42 | if (vbt_size) |
| 43 | *vbt_size = vbt_data_sz; |
Patrick Georgi | 4a3956d | 2018-05-03 19:15:13 +0200 | [diff] [blame] | 44 | return (void *)vbt_data; |
Aaron Durbin | 44f8065 | 2018-05-11 11:43:52 -0600 | [diff] [blame] | 45 | } |
Patrick Georgi | 4a3956d | 2018-05-03 19:15:13 +0200 | [diff] [blame] | 46 | |
| 47 | const char *filename = mainboard_vbt_filename(); |
| 48 | |
| 49 | size_t file_size = cbfs_boot_load_file(filename, |
| 50 | vbt_data, sizeof(vbt_data), CBFS_TYPE_RAW); |
| 51 | |
| 52 | if (file_size == 0) |
| 53 | return NULL; |
| 54 | |
| 55 | if (vbt_size) |
| 56 | *vbt_size = file_size; |
| 57 | |
| 58 | memcpy(&vbtsig, vbt_data, sizeof(vbtsig)); |
| 59 | if (vbtsig != VBT_SIGNATURE) { |
| 60 | printk(BIOS_ERR, "Missing/invalid signature in VBT data file!\n"); |
| 61 | return NULL; |
| 62 | } |
| 63 | |
| 64 | printk(BIOS_INFO, "Found a VBT of %zu bytes after decompression\n", |
| 65 | file_size); |
Aaron Durbin | 44f8065 | 2018-05-11 11:43:52 -0600 | [diff] [blame] | 66 | vbt_data_sz = file_size; |
Patrick Georgi | 4a3956d | 2018-05-03 19:15:13 +0200 | [diff] [blame] | 67 | |
| 68 | return (void *)vbt_data; |
| 69 | } |
| 70 | |
Patrick Rudolph | fa47042 | 2017-06-20 17:49:53 +0200 | [diff] [blame] | 71 | /* Write ASLS PCI register and prepare SWSCI register. */ |
| 72 | void intel_gma_opregion_register(uintptr_t opregion) |
| 73 | { |
Elyes HAOUAS | 263076c | 2018-05-02 21:54:59 +0200 | [diff] [blame] | 74 | struct device *igd; |
Patrick Rudolph | fa47042 | 2017-06-20 17:49:53 +0200 | [diff] [blame] | 75 | u16 reg16; |
Matt DeVillier | 681ef51 | 2018-02-11 01:17:01 -0600 | [diff] [blame] | 76 | u16 sci_reg; |
Patrick Rudolph | fa47042 | 2017-06-20 17:49:53 +0200 | [diff] [blame] | 77 | |
Kyösti Mälkki | c70eed1 | 2018-05-22 02:18:00 +0300 | [diff] [blame] | 78 | igd = pcidev_on_root(0x2, 0); |
Patrick Rudolph | fa47042 | 2017-06-20 17:49:53 +0200 | [diff] [blame] | 79 | if (!igd || !igd->enabled) |
| 80 | return; |
| 81 | |
| 82 | /* |
| 83 | * Intel BIOS Specification |
| 84 | * Chapter 5.3.7 "Initialize Hardware State" |
| 85 | */ |
| 86 | pci_write_config32(igd, ASLS, opregion); |
| 87 | |
| 88 | /* |
Matt DeVillier | 681ef51 | 2018-02-11 01:17:01 -0600 | [diff] [blame] | 89 | * Atom-based platforms use a combined SMI/SCI register, |
| 90 | * whereas non-Atom platforms use a separate SCI register. |
| 91 | */ |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 92 | if (CONFIG(INTEL_GMA_SWSMISCI)) |
Matt DeVillier | 681ef51 | 2018-02-11 01:17:01 -0600 | [diff] [blame] | 93 | sci_reg = SWSMISCI; |
| 94 | else |
| 95 | sci_reg = SWSCI; |
| 96 | |
| 97 | /* |
Patrick Rudolph | fa47042 | 2017-06-20 17:49:53 +0200 | [diff] [blame] | 98 | * Intel's Windows driver relies on this: |
| 99 | * Intel BIOS Specification |
| 100 | * Chapter 5.4 "ASL Software SCI Handler" |
| 101 | */ |
Matt DeVillier | 681ef51 | 2018-02-11 01:17:01 -0600 | [diff] [blame] | 102 | reg16 = pci_read_config16(igd, sci_reg); |
Patrick Rudolph | fa47042 | 2017-06-20 17:49:53 +0200 | [diff] [blame] | 103 | reg16 &= ~GSSCIE; |
| 104 | reg16 |= SMISCISEL; |
Matt DeVillier | 681ef51 | 2018-02-11 01:17:01 -0600 | [diff] [blame] | 105 | pci_write_config16(igd, sci_reg, reg16); |
Patrick Rudolph | fa47042 | 2017-06-20 17:49:53 +0200 | [diff] [blame] | 106 | } |
Patrick Rudolph | bac2303 | 2017-06-30 15:18:23 +0200 | [diff] [blame] | 107 | |
| 108 | /* Restore ASLS register on S3 resume and prepare SWSCI. */ |
| 109 | void intel_gma_restore_opregion(void) |
| 110 | { |
| 111 | if (acpi_is_wakeup_s3()) { |
| 112 | const void *const gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS); |
| 113 | uintptr_t aslb; |
| 114 | |
| 115 | if (gnvs && (aslb = gma_get_gnvs_aslb(gnvs))) |
| 116 | intel_gma_opregion_register(aslb); |
| 117 | else |
| 118 | printk(BIOS_ERR, "Error: GNVS or ASLB not set.\n"); |
| 119 | } |
| 120 | } |
Matt DeVillier | ebe08e0 | 2017-07-14 13:28:42 -0500 | [diff] [blame] | 121 | |
Matt DeVillier | 53e4195 | 2017-06-27 13:07:43 -0500 | [diff] [blame] | 122 | static enum cb_err vbt_validate(struct region_device *rdev) |
Matt DeVillier | ebe08e0 | 2017-07-14 13:28:42 -0500 | [diff] [blame] | 123 | { |
Matt DeVillier | 53e4195 | 2017-06-27 13:07:43 -0500 | [diff] [blame] | 124 | uint32_t sig; |
Matt DeVillier | ebe08e0 | 2017-07-14 13:28:42 -0500 | [diff] [blame] | 125 | |
Matt DeVillier | 53e4195 | 2017-06-27 13:07:43 -0500 | [diff] [blame] | 126 | if (rdev_readat(rdev, &sig, 0, sizeof(sig)) != sizeof(sig)) |
Matt DeVillier | ebe08e0 | 2017-07-14 13:28:42 -0500 | [diff] [blame] | 127 | return CB_ERR; |
Matt DeVillier | ebe08e0 | 2017-07-14 13:28:42 -0500 | [diff] [blame] | 128 | |
Matt DeVillier | 53e4195 | 2017-06-27 13:07:43 -0500 | [diff] [blame] | 129 | if (sig != VBT_SIGNATURE) |
Matt DeVillier | ebe08e0 | 2017-07-14 13:28:42 -0500 | [diff] [blame] | 130 | return CB_ERR; |
Matt DeVillier | ebe08e0 | 2017-07-14 13:28:42 -0500 | [diff] [blame] | 131 | |
| 132 | return CB_SUCCESS; |
| 133 | } |
| 134 | |
Matt DeVillier | 53e4195 | 2017-06-27 13:07:43 -0500 | [diff] [blame] | 135 | static enum cb_err locate_vbt_vbios(const u8 *vbios, struct region_device *rdev) |
Matt DeVillier | ebe08e0 | 2017-07-14 13:28:42 -0500 | [diff] [blame] | 136 | { |
Matt DeVillier | 53e4195 | 2017-06-27 13:07:43 -0500 | [diff] [blame] | 137 | const optionrom_header_t *oprom; |
| 138 | const optionrom_pcir_t *pcir; |
| 139 | struct region_device rd; |
Matt DeVillier | ebe08e0 | 2017-07-14 13:28:42 -0500 | [diff] [blame] | 140 | enum cb_err ret; |
Matt DeVillier | 53e4195 | 2017-06-27 13:07:43 -0500 | [diff] [blame] | 141 | u8 opromsize; |
| 142 | size_t offset; |
Matt DeVillier | ebe08e0 | 2017-07-14 13:28:42 -0500 | [diff] [blame] | 143 | |
Matt DeVillier | 53e4195 | 2017-06-27 13:07:43 -0500 | [diff] [blame] | 144 | // FIXME: caller should supply a region_device instead of vbios pointer |
| 145 | if (rdev_chain(&rd, &addrspace_32bit.rdev, (uintptr_t)vbios, |
| 146 | sizeof(*oprom))) |
| 147 | return CB_ERR; |
Matt DeVillier | ebe08e0 | 2017-07-14 13:28:42 -0500 | [diff] [blame] | 148 | |
Matt DeVillier | 53e4195 | 2017-06-27 13:07:43 -0500 | [diff] [blame] | 149 | if (rdev_readat(&rd, &opromsize, offsetof(optionrom_header_t, size), |
| 150 | sizeof(opromsize)) != sizeof(opromsize) || !opromsize) |
| 151 | return CB_ERR; |
| 152 | |
| 153 | if (rdev_chain(&rd, &addrspace_32bit.rdev, (uintptr_t)vbios, |
| 154 | opromsize * 512)) |
| 155 | return CB_ERR; |
| 156 | |
| 157 | oprom = rdev_mmap(&rd, 0, sizeof(*oprom)); |
| 158 | if (!oprom) |
| 159 | return CB_ERR; |
| 160 | |
| 161 | if (!oprom->pcir_offset || !oprom->vbt_offset) { |
| 162 | rdev_munmap(&rd, (void *)oprom); |
| 163 | return CB_ERR; |
| 164 | } |
| 165 | |
| 166 | pcir = rdev_mmap(&rd, oprom->pcir_offset, sizeof(*pcir)); |
| 167 | if (pcir == NULL) { |
| 168 | rdev_munmap(&rd, (void *)oprom); |
| 169 | return CB_ERR; |
| 170 | } |
| 171 | |
| 172 | printk(BIOS_DEBUG, "GMA: locate_vbt_vbios: %x %x %x %x %x\n", |
| 173 | oprom->signature, pcir->vendor, pcir->classcode[0], |
| 174 | pcir->classcode[1], pcir->classcode[2]); |
| 175 | |
| 176 | /* Make sure we got an Intel VGA option rom */ |
| 177 | if ((oprom->signature != OPROM_SIGNATURE) || |
| 178 | (pcir->vendor != PCI_VENDOR_ID_INTEL) || |
| 179 | (pcir->signature != 0x52494350) || |
| 180 | (pcir->classcode[0] != 0x00) || |
| 181 | (pcir->classcode[1] != 0x00) || |
| 182 | (pcir->classcode[2] != 0x03)) { |
| 183 | rdev_munmap(&rd, (void *)oprom); |
| 184 | rdev_munmap(&rd, (void *)pcir); |
| 185 | return CB_ERR; |
| 186 | } |
| 187 | |
| 188 | rdev_munmap(&rd, (void *)pcir); |
| 189 | |
| 190 | /* Search for $VBT as some VBIOS are broken... */ |
| 191 | offset = oprom->vbt_offset; |
| 192 | do { |
| 193 | ret = rdev_chain(rdev, &rd, offset, |
| 194 | (opromsize * 512) - offset); |
| 195 | offset++; |
| 196 | } while (ret == CB_SUCCESS && vbt_validate(rdev) != CB_SUCCESS); |
| 197 | |
| 198 | offset--; |
| 199 | |
| 200 | if (ret == CB_SUCCESS && offset != oprom->vbt_offset) |
| 201 | printk(BIOS_WARNING, "GMA: Buggy VBIOS found\n"); |
| 202 | else if (ret != CB_SUCCESS) |
| 203 | printk(BIOS_ERR, "GMA: Broken VBIOS found\n"); |
| 204 | |
| 205 | rdev_munmap(&rd, (void *)oprom); |
| 206 | return ret; |
| 207 | } |
| 208 | |
| 209 | static enum cb_err locate_vbt_cbfs(struct region_device *rdev) |
| 210 | { |
Patrick Georgi | 4a3956d | 2018-05-03 19:15:13 +0200 | [diff] [blame] | 211 | size_t vbt_data_size; |
| 212 | void *vbt = locate_vbt(&vbt_data_size); |
Matt DeVillier | 53e4195 | 2017-06-27 13:07:43 -0500 | [diff] [blame] | 213 | |
Patrick Georgi | 4a3956d | 2018-05-03 19:15:13 +0200 | [diff] [blame] | 214 | if (vbt == NULL) |
| 215 | return CB_ERR; |
Matt DeVillier | 53e4195 | 2017-06-27 13:07:43 -0500 | [diff] [blame] | 216 | |
Patrick Georgi | 4a3956d | 2018-05-03 19:15:13 +0200 | [diff] [blame] | 217 | if (rdev_chain(rdev, &addrspace_32bit.rdev, (uintptr_t)vbt, |
| 218 | vbt_data_size)) |
| 219 | return CB_ERR; |
| 220 | |
| 221 | printk(BIOS_INFO, "GMA: Found VBT in CBFS\n"); |
| 222 | |
| 223 | return CB_SUCCESS; |
Matt DeVillier | 53e4195 | 2017-06-27 13:07:43 -0500 | [diff] [blame] | 224 | } |
| 225 | |
| 226 | static enum cb_err locate_vbt_vbios_cbfs(struct region_device *rdev) |
| 227 | { |
| 228 | const u8 *oprom = |
Kyösti Mälkki | c70eed1 | 2018-05-22 02:18:00 +0300 | [diff] [blame] | 229 | (const u8 *)pci_rom_probe(pcidev_on_root(0x2, 0)); |
Matt DeVillier | 53e4195 | 2017-06-27 13:07:43 -0500 | [diff] [blame] | 230 | if (oprom == NULL) |
| 231 | return CB_ERR; |
| 232 | |
| 233 | printk(BIOS_INFO, "GMA: Found VBIOS in CBFS\n"); |
| 234 | |
| 235 | return locate_vbt_vbios(oprom, rdev); |
| 236 | } |
| 237 | |
| 238 | /* Initialize IGD OpRegion, called from ACPI code and OS drivers */ |
| 239 | enum cb_err |
| 240 | intel_gma_init_igd_opregion(igd_opregion_t *opregion) |
| 241 | { |
| 242 | struct region_device rdev; |
| 243 | optionrom_vbt_t *vbt = NULL; |
| 244 | optionrom_vbt_t *ext_vbt; |
| 245 | bool found = false; |
| 246 | |
| 247 | /* Search for vbt.bin in CBFS. */ |
| 248 | if (locate_vbt_cbfs(&rdev) == CB_SUCCESS && |
| 249 | vbt_validate(&rdev) == CB_SUCCESS) { |
| 250 | found = true; |
| 251 | printk(BIOS_INFO, "GMA: Found valid VBT in CBFS\n"); |
| 252 | } |
| 253 | /* Search for pci8086,XXXX.rom in CBFS. */ |
| 254 | else if (locate_vbt_vbios_cbfs(&rdev) == CB_SUCCESS && |
| 255 | vbt_validate(&rdev) == CB_SUCCESS) { |
| 256 | found = true; |
| 257 | printk(BIOS_INFO, "GMA: Found valid VBT in VBIOS\n"); |
| 258 | } |
| 259 | /* |
| 260 | * Try to locate Intel VBIOS at 0xc0000. It might have been placed by |
| 261 | * Native Graphics Init as fake Option ROM or when coreboot did run the |
| 262 | * VBIOS on legacy platforms. |
| 263 | * TODO: Place generated fake VBT in CBMEM and get rid of this. |
| 264 | */ |
| 265 | else if (locate_vbt_vbios((u8 *)0xc0000, &rdev) == CB_SUCCESS && |
| 266 | vbt_validate(&rdev) == CB_SUCCESS) { |
| 267 | found = true; |
| 268 | printk(BIOS_INFO, "GMA: Found valid VBT in legacy area\n"); |
| 269 | } |
| 270 | |
| 271 | if (!found) { |
| 272 | printk(BIOS_ERR, "GMA: VBT couldn't be found\n"); |
| 273 | return CB_ERR; |
| 274 | } |
| 275 | |
| 276 | vbt = rdev_mmap_full(&rdev); |
| 277 | if (!vbt) { |
| 278 | printk(BIOS_ERR, "GMA: Error mapping VBT\n"); |
| 279 | return CB_ERR; |
| 280 | } |
| 281 | |
| 282 | if (vbt->hdr_vbt_size > region_device_sz(&rdev)) { |
| 283 | printk(BIOS_ERR, "GMA: Error mapped only a partial VBT\n"); |
| 284 | rdev_munmap(&rdev, vbt); |
| 285 | return CB_ERR; |
| 286 | } |
| 287 | |
| 288 | memset(opregion, 0, sizeof(igd_opregion_t)); |
Matt DeVillier | ebe08e0 | 2017-07-14 13:28:42 -0500 | [diff] [blame] | 289 | |
| 290 | memcpy(&opregion->header.signature, IGD_OPREGION_SIGNATURE, |
| 291 | sizeof(opregion->header.signature)); |
Matt DeVillier | 53e4195 | 2017-06-27 13:07:43 -0500 | [diff] [blame] | 292 | memcpy(opregion->header.vbios_version, vbt->coreblock_biosbuild, |
| 293 | ARRAY_SIZE(vbt->coreblock_biosbuild)); |
| 294 | /* Extended VBT support */ |
| 295 | if (vbt->hdr_vbt_size > sizeof(opregion->vbt.gvd1)) { |
| 296 | ext_vbt = cbmem_add(CBMEM_ID_EXT_VBT, vbt->hdr_vbt_size); |
| 297 | |
| 298 | if (ext_vbt == NULL) { |
| 299 | printk(BIOS_ERR, |
| 300 | "GMA: Unable to add Ext VBT to cbmem!\n"); |
| 301 | rdev_munmap(&rdev, vbt); |
| 302 | return CB_ERR; |
| 303 | } |
| 304 | |
| 305 | memcpy(ext_vbt, vbt, vbt->hdr_vbt_size); |
| 306 | opregion->mailbox3.rvda = (uintptr_t)ext_vbt; |
| 307 | opregion->mailbox3.rvds = vbt->hdr_vbt_size; |
| 308 | } else { |
| 309 | /* Raw VBT size which can fit in gvd1 */ |
| 310 | memcpy(opregion->vbt.gvd1, vbt, vbt->hdr_vbt_size); |
| 311 | } |
| 312 | |
| 313 | rdev_munmap(&rdev, vbt); |
Matt DeVillier | ebe08e0 | 2017-07-14 13:28:42 -0500 | [diff] [blame] | 314 | |
| 315 | /* 8kb */ |
| 316 | opregion->header.size = sizeof(igd_opregion_t) / 1024; |
Matt DeVillier | fd0a891 | 2017-10-19 22:44:18 -0500 | [diff] [blame] | 317 | |
| 318 | /* |
Elyes HAOUAS | 1895838 | 2018-08-07 12:23:16 +0200 | [diff] [blame] | 319 | * Left-shift version field to accommodate Intel Windows driver quirk |
Matt DeVillier | fd0a891 | 2017-10-19 22:44:18 -0500 | [diff] [blame] | 320 | * when not using a VBIOS. |
| 321 | * Required for Legacy boot + NGI, UEFI + NGI, and UEFI + GOP driver. |
| 322 | * |
| 323 | * Tested on: (platform, GPU, windows driver version) |
| 324 | * samsung/stumpy (SNB, GT2, 9.17.10.4459) |
| 325 | * google/link (IVB, GT2, 15.33.4653) |
| 326 | * google/wolf (HSW, GT1, 15.40.36.4703) |
| 327 | * google/panther (HSW, GT2, 15.40.36.4703) |
| 328 | * google/rikku (BDW, GT1, 15.40.36.4703) |
| 329 | * google/lulu (BDW, GT2, 15.40.36.4703) |
| 330 | * google/chell (SKL-Y, GT2, 15.45.21.4821) |
| 331 | * google/sentry (SKL-U, GT1, 15.45.21.4821) |
| 332 | * purism/librem13v2 (SKL-U, GT2, 15.45.21.4821) |
| 333 | * |
| 334 | * No adverse effects when using VBIOS or booting Linux. |
| 335 | */ |
| 336 | opregion->header.version = IGD_OPREGION_VERSION << 24; |
Matt DeVillier | ebe08e0 | 2017-07-14 13:28:42 -0500 | [diff] [blame] | 337 | |
| 338 | // FIXME We just assume we're mobile for now |
| 339 | opregion->header.mailboxes = MAILBOXES_MOBILE; |
| 340 | |
| 341 | // TODO Initialize Mailbox 1 |
Patrick Georgi | 0f68b23 | 2018-01-25 18:23:15 +0100 | [diff] [blame] | 342 | opregion->mailbox1.clid = 1; |
Matt DeVillier | ebe08e0 | 2017-07-14 13:28:42 -0500 | [diff] [blame] | 343 | |
| 344 | // TODO Initialize Mailbox 3 |
| 345 | opregion->mailbox3.bclp = IGD_BACKLIGHT_BRIGHTNESS; |
| 346 | opregion->mailbox3.pfit = IGD_FIELD_VALID | IGD_PFIT_STRETCH; |
| 347 | opregion->mailbox3.pcft = 0; // should be (IMON << 1) & 0x3e |
| 348 | opregion->mailbox3.cblv = IGD_FIELD_VALID | IGD_INITIAL_BRIGHTNESS; |
| 349 | opregion->mailbox3.bclm[0] = IGD_WORD_FIELD_VALID + 0x0000; |
| 350 | opregion->mailbox3.bclm[1] = IGD_WORD_FIELD_VALID + 0x0a19; |
| 351 | opregion->mailbox3.bclm[2] = IGD_WORD_FIELD_VALID + 0x1433; |
| 352 | opregion->mailbox3.bclm[3] = IGD_WORD_FIELD_VALID + 0x1e4c; |
| 353 | opregion->mailbox3.bclm[4] = IGD_WORD_FIELD_VALID + 0x2866; |
| 354 | opregion->mailbox3.bclm[5] = IGD_WORD_FIELD_VALID + 0x327f; |
| 355 | opregion->mailbox3.bclm[6] = IGD_WORD_FIELD_VALID + 0x3c99; |
| 356 | opregion->mailbox3.bclm[7] = IGD_WORD_FIELD_VALID + 0x46b2; |
| 357 | opregion->mailbox3.bclm[8] = IGD_WORD_FIELD_VALID + 0x50cc; |
| 358 | opregion->mailbox3.bclm[9] = IGD_WORD_FIELD_VALID + 0x5ae5; |
| 359 | opregion->mailbox3.bclm[10] = IGD_WORD_FIELD_VALID + 0x64ff; |
| 360 | |
Matt DeVillier | ebe08e0 | 2017-07-14 13:28:42 -0500 | [diff] [blame] | 361 | /* Write ASLS PCI register and prepare SWSCI register. */ |
| 362 | intel_gma_opregion_register((uintptr_t)opregion); |
| 363 | |
| 364 | return CB_SUCCESS; |
| 365 | } |