coreboot/src/security
Wonkyu Kim bf330f2dd0 security/vboot: Back up CMOS data later boot phase
Introduce POSTPONE_SPI_ACCESS to save CMOS data in a later boot phase
to avoid flash access delay by other boot controllers.

Intel has pre-CPU boot controllers (e.g. CSE) which load non-CPU
firmwares. Boot-critical firmwares are loaded before CPU reset and
non-boot-critical firmwares are loaded during CPU boot. If another
controller accesses SPI to load firmwares, reading SPI by CPU is ok,
but writing to SPI for saving CMOS data can take ~30ms sometimes.
Saving CMOS data usually takes less than 1ms.


Before this change, sometimes it delays like below:
BS: callback (0x7386f908) @ src/security/vboot/vbnv_cmos.c:122 (32 ms)
After this change, the delay is less than 1 ms:
BS: callback (0x7386f908) @ src/security/vboot/vbnv_cmos.c:122 (0 ms)

TEST
1. Enable DEBUG_BOOT_STATE
2. Check time
BS: callback (0x7386f908) @ src/security/vboot/vbnv_cmos.c:120 (0 ms)

Signed-off-by: Wonkyu Kim <wonkyu.kim@intel.com>
Change-Id: I8836c14601beb56c614605b9840c8506d6d8536c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87738
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-06-05 13:36:19 +00:00
..
intel arch/x86: Unify GDT entries 2025-05-08 12:29:24 +00:00
lockdown ec, lib, security, sb: Add SPDX license headers to Kconfig files 2024-02-18 02:00:21 +00:00
memory drivers/efi/uefi_capsules.c: coalesce and store UEFI capsules 2024-08-30 15:48:25 +00:00
tpm drivers/mrc_cache: Measure MRC cache as runtime data 2025-05-10 22:50:41 +00:00
vboot security/vboot: Back up CMOS data later boot phase 2025-06-05 13:36:19 +00:00
Kconfig
Makefile.mk device, security: Rename Makefiles from .inc to .mk 2024-01-24 10:13:21 +00:00