Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34622 )
Change subject: vboot: Unify options to force display init ......................................................................
vboot: Unify options to force display init
We used to let implementations for display init that honor display_init_required() explicitly declare that by selecting VBOOT_MUST_REQUEST_DISPLAY. However, to allow the user to force display initialization, it's simpler to invert this Kconfig option.
The new Kconfig VBOOT_FORCE_DISPLAY_INIT has the same effect as ALWAYS_RUN_OPROM for VGA OpRoms. Thus, we can also remove the latter.
The inversion adds a little Kconfig noise. However, this can be reduced in the future by honoring display_init_required() where it should be.
Change-Id: I52288b0d5f33cd11d84e609e039dc4ea16ff7bdf Signed-off-by: Nico Huber nico.h@gmx.de --- M src/device/Kconfig M src/device/pci_device.c M src/drivers/aspeed/ast2050/Kconfig M src/drivers/emulation/qemu/Kconfig M src/drivers/xgi/z9s/Kconfig M src/lib/bootmode.c M src/mainboard/google/daisy/Kconfig M src/mainboard/google/kahlee/Kconfig M src/mainboard/google/oak/Kconfig M src/mainboard/google/peach_pit/Kconfig M src/northbridge/intel/gm45/Kconfig M src/northbridge/intel/haswell/Kconfig M src/northbridge/intel/i945/Kconfig M src/northbridge/intel/nehalem/Kconfig M src/northbridge/intel/pineview/Kconfig M src/northbridge/intel/sandybridge/Kconfig M src/northbridge/intel/x4x/Kconfig M src/security/vboot/Kconfig M src/security/vboot/vboot_logic.c 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/cannonlake/Kconfig M src/soc/intel/icelake/Kconfig M src/soc/intel/skylake/Kconfig M src/soc/mediatek/mt8173/Kconfig M src/soc/mediatek/mt8183/Kconfig M src/soc/nvidia/tegra124/Kconfig M src/soc/nvidia/tegra210/Kconfig M src/soc/qualcomm/sdm845/Kconfig M src/soc/rockchip/rk3288/Kconfig M src/soc/rockchip/rk3399/Kconfig 33 files changed, 51 insertions(+), 43 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/22/34622/1
diff --git a/src/device/Kconfig b/src/device/Kconfig index e605bc2..d1037da 100644 --- a/src/device/Kconfig +++ b/src/device/Kconfig @@ -139,13 +139,6 @@ are needed for the kernel's display driver to know how a piece of hardware is configured to be used.
-config ALWAYS_RUN_OPROM - def_bool n - depends on VGA_ROM_RUN && ALWAYS_LOAD_OPROM - help - Always uncondtionally run the option regardless of other - policies. - config ON_DEVICE_ROM_LOAD bool "Load Option ROMs on PCI devices" default n if PAYLOAD_SEABIOS diff --git a/src/device/pci_device.c b/src/device/pci_device.c index 7786043..98ec6fc 100644 --- a/src/device/pci_device.c +++ b/src/device/pci_device.c @@ -707,11 +707,6 @@ if (should_run >= 0) return should_run;
- if (CONFIG(ALWAYS_RUN_OPROM)) { - should_run = 1; - return should_run; - } - /* Don't run VGA option ROMs, unless we have to print * something on the screen before the kernel is loaded. */ diff --git a/src/drivers/aspeed/ast2050/Kconfig b/src/drivers/aspeed/ast2050/Kconfig index 337b181..137abd7 100644 --- a/src/drivers/aspeed/ast2050/Kconfig +++ b/src/drivers/aspeed/ast2050/Kconfig @@ -3,3 +3,10 @@ select DRIVERS_ASPEED_AST_COMMON select HAVE_VGA_TEXT_FRAMEBUFFER select MAINBOARD_HAS_NATIVE_VGA_INIT + +if DRIVERS_ASPEED_AST2050 + +config VBOOT + select VBOOT_FORCE_DISPLAY_INIT if MAINBOARD_DO_NATIVE_VGA_INIT + +endif diff --git a/src/drivers/emulation/qemu/Kconfig b/src/drivers/emulation/qemu/Kconfig index 58daaa44..5ab487f 100644 --- a/src/drivers/emulation/qemu/Kconfig +++ b/src/drivers/emulation/qemu/Kconfig @@ -13,14 +13,19 @@ vga (cirrus) is *not* supported, so you have to pick another one explicitly via 'qemu -vga $card'.
+if DRIVERS_EMULATION_QEMU_BOCHS + config DRIVERS_EMULATION_QEMU_BOCHS_XRES int "bochs vga xres" default 800 depends on LINEAR_FRAMEBUFFER - depends on DRIVERS_EMULATION_QEMU_BOCHS
config DRIVERS_EMULATION_QEMU_BOCHS_YRES int "bochs vga yres" default 600 depends on LINEAR_FRAMEBUFFER - depends on DRIVERS_EMULATION_QEMU_BOCHS + +config VBOOT + select VBOOT_FORCE_DISPLAY_INIT + +endif diff --git a/src/drivers/xgi/z9s/Kconfig b/src/drivers/xgi/z9s/Kconfig index b8000c1..98ad1a1 100644 --- a/src/drivers/xgi/z9s/Kconfig +++ b/src/drivers/xgi/z9s/Kconfig @@ -1,3 +1,10 @@ config DRIVERS_XGI_Z9S bool select DRIVERS_XGI_Z79_COMMON + +if DRIVERS_XGI_Z9S + +config VBOOT + select VBOOT_FORCE_DISPLAY_INIT if MAINBOARD_DO_NATIVE_VGA_INIT + +endif diff --git a/src/lib/bootmode.c b/src/lib/bootmode.c index 2465966..69ac520 100644 --- a/src/lib/bootmode.c +++ b/src/lib/bootmode.c @@ -35,10 +35,6 @@ { /* For vboot, always honor VBOOT_WD_FLAG_DISPLAY_INIT. */ if (CONFIG(VBOOT)) { - /* Must always select MUST_REQUEST_DISPLAY when using this - function. */ - if (!CONFIG(VBOOT_MUST_REQUEST_DISPLAY)) - dead_code(); return vboot_get_working_data()->flags & VBOOT_WD_FLAG_DISPLAY_INIT; } diff --git a/src/mainboard/google/daisy/Kconfig b/src/mainboard/google/daisy/Kconfig index 55e0978..b1e8bd8 100644 --- a/src/mainboard/google/daisy/Kconfig +++ b/src/mainboard/google/daisy/Kconfig @@ -32,6 +32,7 @@ select MAINBOARD_HAS_TPM1
config VBOOT + select VBOOT_FORCE_DISPLAY_INIT select VBOOT_VBNV_EC
config MAINBOARD_DIR diff --git a/src/mainboard/google/kahlee/Kconfig b/src/mainboard/google/kahlee/Kconfig index b675f33..7437edc 100644 --- a/src/mainboard/google/kahlee/Kconfig +++ b/src/mainboard/google/kahlee/Kconfig @@ -17,7 +17,6 @@ bool select SOC_AMD_STONEYRIDGE_FT4 select ALWAYS_LOAD_OPROM - select ALWAYS_RUN_OPROM select BOARD_ROMSIZE_KB_16384 select DRIVERS_I2C_GENERIC select DRIVERS_I2C_HID @@ -101,6 +100,7 @@
config VBOOT select EC_GOOGLE_CHROMEEC_SWITCHES + select VBOOT_FORCE_DISPLAY_INIT select VBOOT_LID_SWITCH
config VBOOT_VBNV_OFFSET diff --git a/src/mainboard/google/oak/Kconfig b/src/mainboard/google/oak/Kconfig index c383fa4..99d206c 100644 --- a/src/mainboard/google/oak/Kconfig +++ b/src/mainboard/google/oak/Kconfig @@ -46,6 +46,7 @@
config VBOOT select EC_GOOGLE_CHROMEEC_SWITCHES + select VBOOT_FORCE_DISPLAY_INIT select VBOOT_VBNV_FLASH
config MAINBOARD_DIR diff --git a/src/mainboard/google/peach_pit/Kconfig b/src/mainboard/google/peach_pit/Kconfig index 75f0f0a..6dc414f 100644 --- a/src/mainboard/google/peach_pit/Kconfig +++ b/src/mainboard/google/peach_pit/Kconfig @@ -30,6 +30,7 @@ select MISSING_BOARD_RESET
config VBOOT + select VBOOT_FORCE_DISPLAY_INIT select VBOOT_VBNV_EC
config MAINBOARD_DIR diff --git a/src/northbridge/intel/gm45/Kconfig b/src/northbridge/intel/gm45/Kconfig index c3d2482..d3b7a9b 100644 --- a/src/northbridge/intel/gm45/Kconfig +++ b/src/northbridge/intel/gm45/Kconfig @@ -51,4 +51,7 @@ hex default 0x100000
+config VBOOT + select VBOOT_FORCE_DISPLAY_INIT if MAINBOARD_USE_LIBGFXINIT + endif diff --git a/src/northbridge/intel/haswell/Kconfig b/src/northbridge/intel/haswell/Kconfig index 3678cb8..9937e99 100644 --- a/src/northbridge/intel/haswell/Kconfig +++ b/src/northbridge/intel/haswell/Kconfig @@ -44,7 +44,7 @@ and back to the RW region after the binary is done.
config VBOOT - select VBOOT_MUST_REQUEST_DISPLAY + select VBOOT_FORCE_DISPLAY_INIT if MAINBOARD_USE_LIBGFXINIT select VBOOT_STARTS_IN_ROMSTAGE if !HASWELL_VBOOT_IN_BOOTBLOCK
config VGA_BIOS_ID diff --git a/src/northbridge/intel/i945/Kconfig b/src/northbridge/intel/i945/Kconfig index b151e8f..4a7b2a8 100644 --- a/src/northbridge/intel/i945/Kconfig +++ b/src/northbridge/intel/i945/Kconfig @@ -90,4 +90,7 @@ hex default 0x100000
+config VBOOT + select VBOOT_FORCE_DISPLAY_INIT if MAINBOARD_DO_NATIVE_VGA_INIT + endif diff --git a/src/northbridge/intel/nehalem/Kconfig b/src/northbridge/intel/nehalem/Kconfig index 02b6e80..2b3b2a1 100644 --- a/src/northbridge/intel/nehalem/Kconfig +++ b/src/northbridge/intel/nehalem/Kconfig @@ -54,4 +54,7 @@ hex default 0x10000
+config VBOOT + select VBOOT_FORCE_DISPLAY_INIT if MAINBOARD_USE_LIBGFXINIT + endif diff --git a/src/northbridge/intel/pineview/Kconfig b/src/northbridge/intel/pineview/Kconfig index 37959dd..bf5cafa 100644 --- a/src/northbridge/intel/pineview/Kconfig +++ b/src/northbridge/intel/pineview/Kconfig @@ -50,4 +50,7 @@ hex default 0x80000
+config VBOOT + select VBOOT_FORCE_DISPLAY_INIT if MAINBOARD_USE_LIBGFXINIT + endif diff --git a/src/northbridge/intel/sandybridge/Kconfig b/src/northbridge/intel/sandybridge/Kconfig index 53725ca..d7810c8 100644 --- a/src/northbridge/intel/sandybridge/Kconfig +++ b/src/northbridge/intel/sandybridge/Kconfig @@ -26,6 +26,7 @@ if NORTHBRIDGE_INTEL_SANDYBRIDGE
config VBOOT + select VBOOT_FORCE_DISPLAY_INIT if MAINBOARD_USE_LIBGFXINIT select VBOOT_STARTS_IN_ROMSTAGE
config USE_NATIVE_RAMINIT diff --git a/src/northbridge/intel/x4x/Kconfig b/src/northbridge/intel/x4x/Kconfig index ce43936..703e2133 100644 --- a/src/northbridge/intel/x4x/Kconfig +++ b/src/northbridge/intel/x4x/Kconfig @@ -51,4 +51,7 @@ hex default 0x100000
+config VBOOT + select VBOOT_FORCE_DISPLAY_INIT if MAINBOARD_USE_LIBGFXINIT + endif diff --git a/src/security/vboot/Kconfig b/src/security/vboot/Kconfig index ea1f738..7c06ce5 100644 --- a/src/security/vboot/Kconfig +++ b/src/security/vboot/Kconfig @@ -154,15 +154,15 @@ reboots caused after vboot verification is run. e.g. reboots caused by FSP components on Intel platforms.
-config VBOOT_MUST_REQUEST_DISPLAY - bool - default y if VGA_ROM_RUN - default n +config VBOOT_FORCE_DISPLAY_INIT + bool "Force display initialization" + default y if !CHROMEOS help - Set this option to indicate to vboot that this platform will skip its - display initialization on a normal (non-recovery, non-developer) boot. - Unless display is specifically requested, the video option ROM is not - loaded, and any other native display initialization code is not run. + Set this option to indicate to vboot that display initialization shall + always be performed, even on a normal (non-recovery, non-developer) + boot. Without this option, unless display is specifically requested, + the video option ROM is not loaded, and any other native display + initialization code is not run.
config VBOOT_HAS_REC_HASH_SPACE bool diff --git a/src/security/vboot/vboot_logic.c b/src/security/vboot/vboot_logic.c index 2468f5f..165facc 100644 --- a/src/security/vboot/vboot_logic.c +++ b/src/security/vboot/vboot_logic.c @@ -359,7 +359,7 @@ ctx.flags |= VB2_CONTEXT_NOFAIL_BOOT;
/* Mainboard/SoC always initializes display. */ - if (!CONFIG(VBOOT_MUST_REQUEST_DISPLAY)) + if (CONFIG(VBOOT_FORCE_DISPLAY_INIT)) ctx.flags |= VB2_CONTEXT_DISPLAY_INIT;
/* Do early init (set up secdata and NVRAM, load GBB) */ diff --git a/src/soc/intel/apollolake/Kconfig b/src/soc/intel/apollolake/Kconfig index cf3d244..796d406 100644 --- a/src/soc/intel/apollolake/Kconfig +++ b/src/soc/intel/apollolake/Kconfig @@ -117,7 +117,6 @@
config VBOOT select VBOOT_SEPARATE_VERSTAGE - select VBOOT_MUST_REQUEST_DISPLAY select VBOOT_SAVE_RECOVERY_REASON_ON_REBOOT select VBOOT_STARTS_IN_BOOTBLOCK select VBOOT_VBNV_CMOS diff --git a/src/soc/intel/baytrail/Kconfig b/src/soc/intel/baytrail/Kconfig index 4b816a2..2a576ce 100644 --- a/src/soc/intel/baytrail/Kconfig +++ b/src/soc/intel/baytrail/Kconfig @@ -42,7 +42,6 @@ select CPU_HAS_L2_ENABLE_MSR
config VBOOT - select VBOOT_MUST_REQUEST_DISPLAY select VBOOT_STARTS_IN_ROMSTAGE
config BOOTBLOCK_CPU_INIT diff --git a/src/soc/intel/braswell/Kconfig b/src/soc/intel/braswell/Kconfig index 7887156..6afaf9b 100644 --- a/src/soc/intel/braswell/Kconfig +++ b/src/soc/intel/braswell/Kconfig @@ -63,7 +63,6 @@ default 0x8000
config VBOOT - select VBOOT_MUST_REQUEST_DISPLAY select VBOOT_STARTS_IN_ROMSTAGE
config MMCONF_BASE_ADDRESS diff --git a/src/soc/intel/broadwell/Kconfig b/src/soc/intel/broadwell/Kconfig index bf6b78c..bfe9519 100644 --- a/src/soc/intel/broadwell/Kconfig +++ b/src/soc/intel/broadwell/Kconfig @@ -81,7 +81,6 @@ and back to the RW region after the binary is done.
config VBOOT - select VBOOT_MUST_REQUEST_DISPLAY select VBOOT_STARTS_IN_ROMSTAGE if !BROADWELL_VBOOT_IN_BOOTBLOCK
config MMCONF_BASE_ADDRESS diff --git a/src/soc/intel/cannonlake/Kconfig b/src/soc/intel/cannonlake/Kconfig index f859cd5..77f589e 100644 --- a/src/soc/intel/cannonlake/Kconfig +++ b/src/soc/intel/cannonlake/Kconfig @@ -244,7 +244,6 @@
config VBOOT select VBOOT_SEPARATE_VERSTAGE - select VBOOT_MUST_REQUEST_DISPLAY select VBOOT_SAVE_RECOVERY_REASON_ON_REBOOT select VBOOT_STARTS_IN_BOOTBLOCK select VBOOT_VBNV_CMOS diff --git a/src/soc/intel/icelake/Kconfig b/src/soc/intel/icelake/Kconfig index 99000bb..e43feb1 100644 --- a/src/soc/intel/icelake/Kconfig +++ b/src/soc/intel/icelake/Kconfig @@ -156,7 +156,6 @@
config VBOOT select VBOOT_SEPARATE_VERSTAGE - select VBOOT_MUST_REQUEST_DISPLAY select VBOOT_SAVE_RECOVERY_REASON_ON_REBOOT select VBOOT_STARTS_IN_BOOTBLOCK select VBOOT_VBNV_CMOS diff --git a/src/soc/intel/skylake/Kconfig b/src/soc/intel/skylake/Kconfig index f36d5ca..e253596 100644 --- a/src/soc/intel/skylake/Kconfig +++ b/src/soc/intel/skylake/Kconfig @@ -108,7 +108,6 @@
config VBOOT select VBOOT_SEPARATE_VERSTAGE - select VBOOT_MUST_REQUEST_DISPLAY select VBOOT_SAVE_RECOVERY_REASON_ON_REBOOT select VBOOT_STARTS_IN_BOOTBLOCK select VBOOT_VBNV_CMOS diff --git a/src/soc/mediatek/mt8173/Kconfig b/src/soc/mediatek/mt8173/Kconfig index 6476d42..958d41f 100644 --- a/src/soc/mediatek/mt8173/Kconfig +++ b/src/soc/mediatek/mt8173/Kconfig @@ -14,7 +14,6 @@ if SOC_MEDIATEK_MT8173
config VBOOT - select VBOOT_MUST_REQUEST_DISPLAY select VBOOT_STARTS_IN_BOOTBLOCK select VBOOT_SEPARATE_VERSTAGE
diff --git a/src/soc/mediatek/mt8183/Kconfig b/src/soc/mediatek/mt8183/Kconfig index c60cdea..dd710a8 100644 --- a/src/soc/mediatek/mt8183/Kconfig +++ b/src/soc/mediatek/mt8183/Kconfig @@ -12,7 +12,6 @@ if SOC_MEDIATEK_MT8183
config VBOOT - select VBOOT_MUST_REQUEST_DISPLAY select VBOOT_STARTS_IN_BOOTBLOCK select VBOOT_SEPARATE_VERSTAGE
diff --git a/src/soc/nvidia/tegra124/Kconfig b/src/soc/nvidia/tegra124/Kconfig index c962aea..cc06486 100644 --- a/src/soc/nvidia/tegra124/Kconfig +++ b/src/soc/nvidia/tegra124/Kconfig @@ -16,7 +16,6 @@ if SOC_NVIDIA_TEGRA124
config VBOOT - select VBOOT_MUST_REQUEST_DISPLAY select VBOOT_STARTS_IN_BOOTBLOCK select VBOOT_SEPARATE_VERSTAGE
diff --git a/src/soc/nvidia/tegra210/Kconfig b/src/soc/nvidia/tegra210/Kconfig index 0e1efd7..1c99bd6 100644 --- a/src/soc/nvidia/tegra210/Kconfig +++ b/src/soc/nvidia/tegra210/Kconfig @@ -16,7 +16,6 @@ config VBOOT select VBOOT_STARTS_IN_BOOTBLOCK select VBOOT_SEPARATE_VERSTAGE - select VBOOT_MUST_REQUEST_DISPLAY
config MAINBOARD_DO_DSI_INIT bool "Use dsi graphics interface" diff --git a/src/soc/qualcomm/sdm845/Kconfig b/src/soc/qualcomm/sdm845/Kconfig index dbe025e..e2eadbb 100644 --- a/src/soc/qualcomm/sdm845/Kconfig +++ b/src/soc/qualcomm/sdm845/Kconfig @@ -15,7 +15,6 @@ config VBOOT select VBOOT_SEPARATE_VERSTAGE select VBOOT_RETURN_FROM_VERSTAGE - select VBOOT_MUST_REQUEST_DISPLAY select VBOOT_STARTS_IN_BOOTBLOCK
config SDM845_QSPI diff --git a/src/soc/rockchip/rk3288/Kconfig b/src/soc/rockchip/rk3288/Kconfig index 3aebab9..01c3f95 100644 --- a/src/soc/rockchip/rk3288/Kconfig +++ b/src/soc/rockchip/rk3288/Kconfig @@ -33,7 +33,6 @@ if SOC_ROCKCHIP_RK3288
config VBOOT - select VBOOT_MUST_REQUEST_DISPLAY select VBOOT_STARTS_IN_BOOTBLOCK select VBOOT_SEPARATE_VERSTAGE select VBOOT_RETURN_FROM_VERSTAGE diff --git a/src/soc/rockchip/rk3399/Kconfig b/src/soc/rockchip/rk3399/Kconfig index 7e3c44b..0424664 100644 --- a/src/soc/rockchip/rk3399/Kconfig +++ b/src/soc/rockchip/rk3399/Kconfig @@ -17,7 +17,6 @@ config VBOOT select VBOOT_SEPARATE_VERSTAGE select VBOOT_RETURN_FROM_VERSTAGE - select VBOOT_MUST_REQUEST_DISPLAY select VBOOT_STARTS_IN_BOOTBLOCK
config PMIC_BUS