summaryrefslogtreecommitdiff
path: root/src/vendorcode
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2021-02-12 18:46:57 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2021-02-17 22:58:32 +0000
commit9e74c42b1f76604da0c904b4e9e860e31330da0e (patch)
treed579fe308b643cd0b44993715e369398293cffd1 /src/vendorcode
parentfca179775708686d05dc732ad33099963ff4a75e (diff)
downloadcoreboot-9e74c42b1f76604da0c904b4e9e860e31330da0e.tar.xz
vc/google/chromeos: Account for GNVS allocated early
We have adjusted allocation order such that GNVS is available before ME hash needs to be stored. Change-Id: I8428dd85f44935938a118a682767f2f8d6d539ab Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50610 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/vendorcode')
-rw-r--r--src/vendorcode/google/chromeos/gnvs.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/vendorcode/google/chromeos/gnvs.c b/src/vendorcode/google/chromeos/gnvs.c
index 62d19d6d51..024dbe3bfa 100644
--- a/src/vendorcode/google/chromeos/gnvs.c
+++ b/src/vendorcode/google/chromeos/gnvs.c
@@ -14,7 +14,6 @@
#include "gnvs.h"
static chromeos_acpi_t *chromeos_acpi;
-static u32 me_hash_saved[8];
static size_t chromeos_vpd_region(const char *region, uintptr_t *base)
{
@@ -35,9 +34,6 @@ void chromeos_init_chromeos_acpi(chromeos_acpi_t *init)
chromeos_acpi = init;
- /* Copy saved ME hash into NVS */
- memcpy(chromeos_acpi->mehh, me_hash_saved, sizeof(chromeos_acpi->mehh));
-
vpd_size = chromeos_vpd_region("RO_VPD", &vpd_base);
if (vpd_size && vpd_base) {
chromeos_acpi->vpd_ro_base = vpd_base;
@@ -56,12 +52,9 @@ void chromeos_set_me_hash(u32 *hash, int len)
if ((len*sizeof(u32)) > sizeof(chromeos_acpi->mehh))
return;
- /* Copy to NVS or save until it is ready */
+ /* Copy to NVS. */
if (chromeos_acpi)
- /* This does never happen! */
memcpy(chromeos_acpi->mehh, hash, len*sizeof(u32));
- else
- memcpy(me_hash_saved, hash, len*sizeof(u32));
}
chromeos_acpi_t *chromeos_get_chromeos_acpi(void)