diff options
author | Matt DeVillier <matt.devillier@gmail.com> | 2017-06-16 23:36:46 -0500 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-06-29 14:40:49 +0000 |
commit | 7c789702149a893d0c82c57edbb8705e9f6f95e9 (patch) | |
tree | 424e63f24b1ebdc206fa27efc293dd0a7c13db96 /src/northbridge/intel | |
parent | 12983db91da6b323dbab20b79a86b91e0c3cdc2c (diff) |
nb/haswell: set ASLB gnvs to OpRegion ACPI memory address
The ALSB gnvs variable is used to load the OpRegion memory
address into the ASLS register on the S3 resume path, and must
therefore first be set on the normal boot path.
This patch brings Haswell in line with SNB/IVB/Nehalem, which
already save the OpRegion address in ASLB.
Change-Id: Ie062cbfe7e7f60c2a4e2b9111f6b6da87ced7a39
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/20254
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src/northbridge/intel')
-rw-r--r-- | src/northbridge/intel/haswell/gma.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/northbridge/intel/haswell/gma.c b/src/northbridge/intel/haswell/gma.c index 76da5a0080..f22ff48707 100644 --- a/src/northbridge/intel/haswell/gma.c +++ b/src/northbridge/intel/haswell/gma.c @@ -14,6 +14,7 @@ */ #include <arch/io.h> +#include <cbmem.h> #include <console/console.h> #include <bootmode.h> #include <delay.h> @@ -24,6 +25,7 @@ #include <drivers/intel/gma/i915.h> #include <cpu/intel/haswell/haswell.h> #include <northbridge/intel/common/gma_opregion.h> +#include <southbridge/intel/lynxpoint/nvs.h> #include <stdlib.h> #include <string.h> @@ -514,12 +516,22 @@ gma_write_acpi_tables(struct device *const dev, struct acpi_rsdp *const rsdp) { igd_opregion_t *opregion = (igd_opregion_t *)current; + global_nvs_t *gnvs; if (init_igd_opregion(opregion) != CB_SUCCESS) return current; current += sizeof(igd_opregion_t); + /* GNVS has been already set up */ + gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS); + if (gnvs) { + /* IGD OpRegion Base Address */ + gnvs->aslb = (u32)(uintptr_t)opregion; + } else { + printk(BIOS_ERR, "Error: GNVS table not found.\n"); + } + gma_enable_swsci(); current = acpi_align_current(current); |