summaryrefslogtreecommitdiff
path: root/src/vendorcode/google
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2016-07-26 10:13:56 -0700
committerFurquan Shaikh <furquan@google.com>2016-07-28 00:40:20 +0200
commitbaf88d370353771d9b48da0aac5bafd45da26042 (patch)
treef378d1da588dfc4db0d694eeb828f5f0227e44eb /src/vendorcode/google
parent0d9cd92efb8b1bf2f9ef75d241040fb6955f4930 (diff)
downloadcoreboot-baf88d370353771d9b48da0aac5bafd45da26042.tar.xz
chromeos/gnvs: Clean up use of vboot handoff
BUG=chrome-os-partner:55639 Change-Id: I40a28f921499ddf43d8b423f5192ac93b40254c1 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/15903 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'src/vendorcode/google')
-rw-r--r--src/vendorcode/google/chromeos/gnvs.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/vendorcode/google/chromeos/gnvs.c b/src/vendorcode/google/chromeos/gnvs.c
index 1f13d1c195..8a5cc64182 100644
--- a/src/vendorcode/google/chromeos/gnvs.c
+++ b/src/vendorcode/google/chromeos/gnvs.c
@@ -20,14 +20,12 @@
#include <cbmem.h>
#include <console/console.h>
#include <elog.h>
-
-#include "chromeos.h"
-#include "gnvs.h"
-#if CONFIG_VBOOT
#include <vboot/vbnv.h>
#include <vboot/vboot_common.h>
#include <vboot_struct.h>
-#endif
+
+#include "chromeos.h"
+#include "gnvs.h"
chromeos_acpi_t *vboot_data = NULL;
static u32 me_hash_saved[8];
@@ -39,18 +37,11 @@ void chromeos_init_vboot(chromeos_acpi_t *chromeos)
/* Copy saved ME hash into NVS */
memcpy(vboot_data->mehh, me_hash_saved, sizeof(vboot_data->mehh));
-#if CONFIG_VBOOT
- /* Save the vdat from the vboot handoff structure. Downstream software
- * consumes the data located in the ACPI table. Ensure it reflects
- * the shared data from VbInit() and VbSelectFirmware(). */
struct vboot_handoff *vboot_handoff;
- vboot_handoff = cbmem_find(CBMEM_ID_VBOOT_HANDOFF);
-
- if (vboot_handoff != NULL)
+ if (vboot_get_handoff_info((void **)&vboot_handoff, NULL) == 0)
memcpy(&chromeos->vdat[0], &vboot_handoff->shared_data[0],
ARRAY_SIZE(chromeos->vdat));
-#endif
chromeos_ram_oops_init(chromeos);
}