diff options
author | Aaron Durbin <adurbin@chromium.org> | 2015-10-07 16:03:41 -0500 |
---|---|---|
committer | Aaron Durbin <adurbin@gmail.com> | 2015-10-11 23:57:29 +0000 |
commit | b593366e349673cd4ef5b933849f78e6e958d626 (patch) | |
tree | 5489ec29157dbf096b42313c057d5a3fbe84859a /src/vendorcode/google/chromeos/vboot2/vboot_handoff.c | |
parent | ed253c8fd80573b2182aa5fd27033750cff48c0b (diff) |
vboot: prepare for x86 verstage
In order to support x86 verstage proper the work buffer
needs to live in cache-as-ram. However, after cache-as-ram
is torn down one still needs the verification results to
know which slot was selected. Though the platforms with
a dedicated SRAM can just use the work buffer in SRAM, the
x86 cache-as-ram platforms need a place to stash the
results. For that situation cbmem is employed. This works
because when cbmem is initialized cache-as-ram is still
enabled. The VBOOT_DYNAMIC_WORK_BUFFER case assumes
verified boot doesn't start until after cbmem is up. That
doesn't change, but it's a goal to get rid of that option
entirely once all other x86 platforms are moved over to
pre-romstage vboot.
BUG=chrome-os-partner:44827
BRANCH=None
TEST=Built and booted glados with pre-romstage verification
as well as VBOOT_DYNAMIC_WORK_BUFFER case.
Change-Id: I7eacd0edb2b6ca52b59b74075d17c00b50676d4c
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11821
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/vendorcode/google/chromeos/vboot2/vboot_handoff.c')
-rw-r--r-- | src/vendorcode/google/chromeos/vboot2/vboot_handoff.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/vendorcode/google/chromeos/vboot2/vboot_handoff.c b/src/vendorcode/google/chromeos/vboot2/vboot_handoff.c index bf7d6542eb..769e2679ef 100644 --- a/src/vendorcode/google/chromeos/vboot2/vboot_handoff.c +++ b/src/vendorcode/google/chromeos/vboot2/vboot_handoff.c @@ -171,3 +171,17 @@ void vboot_fill_handoff(void) rdev_munmap(&fw_main, fw_info); } + +/* + * For platforms that employ VBOOT_DYNAMIC_WORK_BUFFER, the vboot + * verification doesn't happen until after cbmem is brought online. + * Therefore, the vboot results would not be initialized so don't + * automatically add results when cbmem comes online. + */ +#if !IS_ENABLED(CONFIG_VBOOT_DYNAMIC_WORK_BUFFER) +static void vb2_fill_handoff_cbmem(int unused) +{ + vboot_fill_handoff(); +} +ROMSTAGE_CBMEM_INIT_HOOK(vb2_fill_handoff_cbmem) +#endif |