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>
diff --git a/src/vendorcode/google/chromeos/gnvs.c b/src/vendorcode/google/chromeos/gnvs.c
index 62d19d6..024dbe3 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 @@
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 @@
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)