[coreboot-gerrit] Change in coreboot[master]: vboot: Disallow separate verstage after romstage, try to cla...

Julius Werner (Code Review) gerrit at coreboot.org
Sat Mar 25 03:31:09 CET 2017


Hello Aaron Durbin, build bot (Jenkins), Patrick Georgi, Furquan Shaikh,

I'd like you to reexamine a change.  Please visit

    https://review.coreboot.org/18983

to look at the new patch set (#2).

Change subject: vboot: Disallow separate verstage after romstage, try to clarify logic
......................................................................

vboot: Disallow separate verstage after romstage, try to clarify logic

No board has ever tried to combine CONFIG_SEPARATE_VERSTAGE with
CONFIG_VBOOT_STARTS_IN_ROMSTAGE. There are probably many reasons why
this wouldn't work (e.g. x86 CAR migration logic currently always
assumes verstage code to run pre-migration). It would also not really
make sense: the reason we use separate verstages is to decrease
bootblock size (mitigating the boot speed cost of slow boot ROM SPI
drivers) and to allow the SRAM-saving RETURN_FROM_VERSTAGE trick,
neither of which would apply to the after-romstage case. It is better to
just forbid that case explicitly and give programmers more guarantees
about what the verstage is (e.g. now the assumption that it runs pre-RAM
is always valid).

Since Kconfig dependencies aren't always guaranteed in the face of
'select' statements, also add some explicit compile-time assertions to
the vboot code. We can simplify some of the loader logic which now no
longer needs to provide for the forbidden case. In addition, also try to
make some of the loader logic more readable by writing it in a more
functional style that allows us to put more assertions about which cases
should be unreachable in there, which will hopefully make it more robust
and fail-fast with future changes (e.g. addition of new stages).

Change-Id: Iaf60040af4eff711d9b80ee0e5950ce05958b3aa
Signed-off-by: Julius Werner <jwerner at chromium.org>
---
M src/arch/x86/assembly_entry.S
M src/arch/x86/bootblock_simple.c
M src/arch/x86/car.ld
M src/ec/google/chromeec/Kconfig
M src/include/memlayout.h
M src/lib/Makefile.inc
M src/mainboard/google/auron/Kconfig
M src/mainboard/google/beltino/Kconfig
M src/mainboard/google/butterfly/Kconfig
M src/mainboard/google/chell/Kconfig
M src/mainboard/google/cosmos/Kconfig
M src/mainboard/google/cyan/Kconfig
M src/mainboard/google/daisy/Kconfig
M src/mainboard/google/eve/Kconfig
M src/mainboard/google/fizz/Kconfig
M src/mainboard/google/foster/Kconfig
M src/mainboard/google/gale/Kconfig
M src/mainboard/google/glados/Kconfig
M src/mainboard/google/gru/Kconfig
M src/mainboard/google/jecht/Kconfig
M src/mainboard/google/lars/Kconfig
M src/mainboard/google/link/Kconfig
M src/mainboard/google/nyan/Kconfig
M src/mainboard/google/nyan_big/Kconfig
M src/mainboard/google/nyan_blaze/Kconfig
M src/mainboard/google/oak/Kconfig
M src/mainboard/google/parrot/Kconfig
M src/mainboard/google/peach_pit/Kconfig
M src/mainboard/google/poppy/Kconfig
M src/mainboard/google/purin/Kconfig
M src/mainboard/google/rambi/Kconfig
M src/mainboard/google/reef/Kconfig
M src/mainboard/google/rotor/Kconfig
M src/mainboard/google/slippy/Kconfig
M src/mainboard/google/smaug/Kconfig
M src/mainboard/google/storm/Kconfig
M src/mainboard/google/stout/Kconfig
M src/mainboard/google/veyron/Kconfig
M src/mainboard/google/veyron_mickey/Kconfig
M src/mainboard/google/veyron_rialto/Kconfig
M src/mainboard/intel/baskingridge/Kconfig
M src/mainboard/intel/emeraldlake2/Kconfig
M src/mainboard/intel/galileo/Kconfig
M src/mainboard/intel/kblrvp/Kconfig
M src/mainboard/intel/kunimitsu/Kconfig
M src/mainboard/intel/strago/Kconfig
M src/mainboard/intel/wtm2/Kconfig
M src/mainboard/samsung/lumpy/Kconfig
M src/mainboard/samsung/stumpy/Kconfig
M src/northbridge/intel/haswell/Kconfig
M src/northbridge/intel/sandybridge/Kconfig
M src/soc/broadcom/cygnus/Kconfig
M src/soc/intel/apollolake/Kconfig
M src/soc/intel/baytrail/Kconfig
M src/soc/intel/braswell/Kconfig
M src/soc/intel/broadwell/Kconfig
M src/soc/intel/quark/romstage/fsp1_1.c
M src/soc/intel/skylake/Kconfig
M src/soc/marvell/armada38x/Kconfig
M src/soc/marvell/bg4cd/Kconfig
M src/soc/marvell/mvmap2315/Kconfig
M src/soc/mediatek/mt8173/Kconfig
M src/soc/nvidia/tegra124/Kconfig
M src/soc/nvidia/tegra210/Kconfig
M src/soc/qualcomm/ipq40xx/Kconfig
M src/soc/qualcomm/ipq806x/Kconfig
M src/soc/rockchip/rk3288/Kconfig
M src/soc/rockchip/rk3399/Kconfig
M src/soc/samsung/exynos5250/Kconfig
M src/soc/samsung/exynos5420/Kconfig
M src/vboot/Kconfig
M src/vboot/Makefile.inc
M src/vboot/bootmode.c
M src/vboot/vboot_handoff.c
M src/vboot/vboot_loader.c
M src/vboot/vboot_logic.c
M src/vboot/verstage.c
M src/vendorcode/google/chromeos/Kconfig
M src/vendorcode/google/chromeos/Makefile.inc
D src/vendorcode/google/chromeos/chromeos.c
80 files changed, 528 insertions(+), 492 deletions(-)


  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/83/18983/2
-- 
To view, visit https://review.coreboot.org/18983
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iaf60040af4eff711d9b80ee0e5950ce05958b3aa
Gerrit-PatchSet: 2
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Julius Werner <jwerner at chromium.org>
Gerrit-Reviewer: Aaron Durbin <adurbin at chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan at google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi at google.com>
Gerrit-Reviewer: build bot (Jenkins)



More information about the coreboot-gerrit mailing list