coreboot-kgpe-d16/src/include
Julius Werner 73d042bd90 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@chromium.org>
Reviewed-on: https://review.coreboot.org/18983
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
2017-03-28 22:17:35 +02:00
..
boot lib: add common write_tables() implementation 2016-04-21 20:49:05 +02:00
console src/include: Wrap lines at 80 columns 2017-03-13 17:23:37 +01:00
cpu cpu/x86: add a barrier with timeout 2017-03-19 21:40:08 +01:00
device src/include: Wrap lines at 80 columns 2017-03-13 17:23:37 +01:00
pc80 src/include: Wrap lines at 80 columns 2017-03-13 17:23:37 +01:00
smp src/include: Add space after comma 2017-03-09 17:19:16 +01:00
superio tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
sys commonlib: Prepare code to be included in cbfstool builds. 2016-01-06 01:11:32 +01:00
tpm_lite cr50: add unmarshaling of vendor commands and process 'enable_update' 2017-03-23 23:49:58 +01:00
adainit.h Add option to use Ada code in ramstage 2016-11-06 17:28:13 +01:00
antirollback.h src/vboot: mark factory_initialze_tpm() as static 2016-11-11 18:53:33 +01:00
assert.h src/include: Move trailing statements to next line 2017-03-09 17:16:35 +01:00
b64_decode.h lib: add base64 decoder 2015-04-22 08:50:54 +02:00
base3.h tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
bcd.h tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
boardid.h tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
boot_device.h lib/boot_device: add RW boot device construct 2016-08-19 03:07:05 +02:00
bootblock_common.h src/include: Move storage class to beginning of declaration 2017-03-13 17:19:45 +01:00
bootmem.h lib/bootmem: allow architecture specific bootmem ranges 2016-04-21 20:46:45 +02:00
bootmode.h vboot: Add new function for logging recovery mode switches 2016-11-14 20:13:26 +01:00
bootstate.h src/include: Remove space after function name 2017-03-13 17:19:16 +01:00
cbfs.h src/include: Wrap lines at 80 columns 2017-03-13 17:23:37 +01:00
cbmem.h src/include: Move storage class to beginning of declaration 2017-03-13 17:19:45 +01:00
delay.h src/include: Fix unsigned warnings 2017-03-09 17:16:09 +01:00
edid.h edid: Fix a function signature 2016-09-08 23:19:06 +02:00
elog.h elog: Add all EC event codes 2017-03-09 18:04:50 +01:00
endian.h tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
fallback.h pc80: Move set_boot_successful() 2016-12-13 19:15:22 +01:00
fmap.h lib/fmap: provide RW region device support 2016-08-19 18:17:04 +02:00
gic.h src/include: Capitalize CPU, RAM and ROM 2016-07-31 18:30:16 +02:00
gpio.h lib/gpio: add pullup & pulldown gpio_base2_value() variants 2016-07-07 20:44:36 +02:00
halt.h lib: add poweroff() declaration 2016-07-15 08:35:15 +02:00
imd.h cbmem: add coreboot table records for each cbmem entry 2015-11-03 00:19:46 +01:00
inttypes.h
ip_checksum.h src/include: Wrap lines at 80 columns 2017-03-13 17:23:37 +01:00
kconfig.h
lib.h lib: remove ulzma() 2016-07-01 23:55:16 +02:00
main_decl.h arches: lib: add main_decl.h for main() declaration 2016-02-11 23:29:08 +01:00
memlayout.h vboot: Disallow separate verstage after romstage, try to clarify logic 2017-03-28 22:17:35 +02:00
memory_info.h src/include: Include stdint.h since struct dimm_info uses it 2017-03-01 16:57:34 +01:00
memrange.h src/include: Indent code using tabs 2017-03-09 17:18:42 +01:00
nhlt.h src/include: Wrap lines at 80 columns 2017-03-13 17:23:37 +01:00
option.h
program_loading.h ACPI S3: Remove HIGH_MEMORY_SAVE where possible 2016-11-09 20:52:07 +01:00
random.h arch/x86: add functions to generate random numbers 2017-02-20 04:46:10 +01:00
reg_script.h src/include: Remove space after function name 2017-03-13 17:19:16 +01:00
region_file.h lib: add region file support 2016-12-08 16:10:28 +01:00
reset.h src/include: Improve code formatting 2016-09-05 12:28:32 +02:00
rmodule.h src/include: Remove space after function name 2017-03-13 17:19:16 +01:00
romstage_handoff.h lib: put romstage_handoff implementation in own compilation unit 2016-12-01 08:16:47 +01:00
rtc.h src/include: Open brace on same line as enum or struct 2017-03-12 15:46:23 +01:00
rules.h Stage rules.h: Add ENV_LIBAGESA 2017-03-07 00:43:20 +01:00
sar.h chromeos: Implement locating and decoding wifi sar data from VPD 2017-01-09 18:16:10 +01:00
sdram_mode.h src/include: Remove spaces before tabs 2017-03-12 15:45:37 +01:00
smbios.h src/include: Wrap lines at 80 columns 2017-03-13 17:23:37 +01:00
spd.h src/include: Wrap lines at 80 columns 2017-03-13 17:23:37 +01:00
spd_bin.h ddr3 spd: move accessor code into lib/spd_bin.c 2017-02-10 18:04:33 +01:00
spd_ddr2.h src/include: Wrap lines at 80 columns 2017-03-13 17:23:37 +01:00
spi-generic.h spi: Add function callback to get configuration of SPI bus 2017-02-16 08:40:47 +01:00
spi_flash.h drivers/spi: provide a mechanism to obtain the SPI flash boot device 2016-12-08 16:11:01 +01:00
stage_cache.h arch/x86: cache postcar in stage cache 2016-12-01 08:17:19 +01:00
stddef.h stddef.h: fix zeroptr's definition 2016-04-15 16:18:57 +02:00
stdlib.h src/include: Add space after comma 2017-03-09 17:19:16 +01:00
string.h src/include: Move assignment out of if condition 2017-03-13 17:20:43 +01:00
swab.h src/include: Remove unnecessary typecast 2017-03-13 17:20:15 +01:00
symbols.h src/include: Remove spaces before ( and after ) 2017-03-12 15:45:26 +01:00
thread.h src/include: Move storage class to beginning of declaration 2017-03-13 17:19:45 +01:00
timer.h src/include: Indent code using tabs 2017-03-09 17:18:42 +01:00
timestamp.h src/include: Wrap lines at 80 columns 2017-03-13 17:23:37 +01:00
tpm.h tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
trace.h src/include: Remove spaces before ( and after ) 2017-03-12 15:45:26 +01:00
types.h tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
vbe.h src/include: Wrap lines at 80 columns 2017-03-13 17:23:37 +01:00
version.h build.h: remove variable for the builduser, -hostname and -domain 2015-03-09 17:53:16 +01:00
watchdog.h src/include: Add parenthesis around macros 2017-03-10 22:28:35 +01:00
wrdd.h Remove extra newlines from the end of all coreboot files. 2016-07-31 18:19:33 +02:00