From 30974bc2f5f4764425e69256782cca03b290c4f4 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 20 Mar 2014 14:28:17 -0500 Subject: vboot: allow for non-memory-mapped VBOOT regions Depending on the platform the underlying regions vboot requires may not be accessible through a memory-mapped interface. Allow for non-memory-mapped regions by providing a region request abstraction. There is then only a few touch points in the code to provide compile-time decision making no how to obtain a region. For the vblocks a temporary area is allocated from cbmem. They are then read from the SPI into the temporarily buffer. BUG=chrome-os-partner:27094 BRANCH=None TEST=Built and booted a rambi with vboot verification. Original-Change-Id: I828a7c36387a8eb573c5a0dd020fe9abad03d902 Original-Signed-off-by: Aaron Durbin Original-Reviewed-on: https://chromium-review.googlesource.com/190924 Original-Reviewed-by: Hung-Te Lin (cherry picked from commit aee0280bbfe110eae88aa297b433c1038c6fe8a3) Signed-off-by: Marc Jones Change-Id: Ia020d1eebad753da950342656cd11b84e9a85376 Reviewed-on: http://review.coreboot.org/7709 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/vendorcode/google/chromeos/Makefile.inc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/vendorcode/google/chromeos/Makefile.inc') diff --git a/src/vendorcode/google/chromeos/Makefile.inc b/src/vendorcode/google/chromeos/Makefile.inc index d02c09ff5e..678c4ee97c 100644 --- a/src/vendorcode/google/chromeos/Makefile.inc +++ b/src/vendorcode/google/chromeos/Makefile.inc @@ -43,6 +43,10 @@ ramstage-y += vboot_handoff.c romstage-y += vboot_loader.c rmodules_$(ARCH-romstage-y)-y += vboot_wrapper.c +ifneq ($(CONFIG_SPI_FLASH_MEMORY_MAPPED),y) +VBOOT_MAKEFLAGS = REGION_READ=1 +endif + VB_LIB = $(obj)/external/vboot_reference/vboot_fw.a # Currently, vboot comes into picture only during the romstage, thus # is compiled for being used in romstage only. Since, we are splitting @@ -83,6 +87,7 @@ $(VB_LIB): CC="$(CC_romstage)" \ CFLAGS="$(VBOOT_CFLAGS)" \ make -C $(VB_SOURCE) \ + $(VBOOT_MAKEFLAGS) \ BUILD=../$(dir $(VB_LIB)) \ V=$(V) \ fwlib -- cgit v1.2.3