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