diff options
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2017-10-30 17:20:18 +0100 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-11-04 00:33:26 +0000 |
commit | 0781cbe1d33e62a26a234962bc271209cc22c931 (patch) | |
tree | 99aca77e0aab82cd3c869f333a6ff33fd63f391d /src/soc/intel/broadwell/include | |
parent | 7bd4715a7016b3228df877d625cf26a3694cfebe (diff) | |
download | coreboot-0781cbe1d33e62a26a234962bc271209cc22c931.tar.xz |
sb and soc: Enforce correct offset of member "chromeos" in global_nvs_t
The padding has recently been broken in commit 90ebf96df5
("soc/intel/skylake: Add GNVS variables and include SGX ASL") and fixed
again in commit af88398887 ("soc/intel/skylake: Fix broken GNVS offset
for chromeos"). Avoid this bug in the future.
Change-Id: I1bf3027bba239c8747ad26a3130a7e047d3b8c94
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/22229
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/soc/intel/broadwell/include')
-rw-r--r-- | src/soc/intel/broadwell/include/soc/nvs.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/soc/intel/broadwell/include/soc/nvs.h b/src/soc/intel/broadwell/include/soc/nvs.h index a7d6d7c9fc..b40ffc4d20 100644 --- a/src/soc/intel/broadwell/include/soc/nvs.h +++ b/src/soc/intel/broadwell/include/soc/nvs.h @@ -17,11 +17,12 @@ #ifndef _BROADWELL_NVS_H_ #define _BROADWELL_NVS_H_ +#include <commonlib/helpers.h> #include <compiler.h> -#include <vendorcode/google/chromeos/gnvs.h> #include <soc/device_nvs.h> +#include <vendorcode/google/chromeos/gnvs.h> -typedef struct { +typedef struct global_nvs_t { /* Miscellaneous */ u16 osys; /* 0x00 - Operating System */ u8 smif; /* 0x02 - SMI function call ("TRAP") */ @@ -58,6 +59,7 @@ typedef struct { /* Device specific (0x1000) */ device_nvs_t dev; } __packed global_nvs_t; +check_member(global_nvs_t, chromeos, 0x100); void acpi_create_gnvs(global_nvs_t *gnvs); #ifdef __SMM__ |