coreboot-kgpe-d16/src/vendorcode
Subrata Banik 2d20b68b6e vc/google/elog: Record vboot FW boot information into elog
This patch calls into vboot API (vb2api_get_fw_boot_info) to retrieve
FW slot boot information like (tries count, current boot slot, previous
boot slot, previous boot status and boot mode).

Upon retrieval of the vboot information, elog callback from ramstage
records the info into the eventlog.

Additionally, this patch refactors the existing event logging mechanism
to add newer APIs to record vboot firmware boot related information.

BUG=b:215615970
TEST=Build and boot google/kano to ChromeOS and run below command to
check the cbmem log:
Scenario 1:
localhost ~ # cbmem -c | grep VB2
[INFO ]  VB2:vb2_check_recovery() Recovery reason from previous boot:
         0x0 / 0x0
[INFO ]  VB2:vb2api_fill_boot_config() boot_mode=`Developer boot`
         VB2:vb2api_get_fw_boot_info() fw_tried=`A` fw_try_count=0
            fw_prev_tried=`A` fw_prev_result=`Success`.
....

Scenario 2:
localhost ~ # crossystem recovery_request=1
localhost ~ # cbmem -c | grep VB2
[INFO ]  VB2:vb2api_fill_boot_config() boot_mode=`Manual recovery boot`
         VB2:vb2api_fill_boot_config() recovery_reason=0x13 / 0x00
         VB2:vb2api_get_fw_boot_info() fw_tried=`A` fw_try_count=0
            fw_prev_tried=`A` fw_prev_result=`Unknown`.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I6882cd1c4dbe5e24f6460388cd1af4e4a05fc4da
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65561
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-08-02 07:06:30 +00:00
..
amd Revert "UPSTREAM: soc/amd/sabrina,vc/amd/fsp/sabrina: Add UART support for Sabrina" 2022-08-01 12:36:31 +00:00
cavium rules.h: Use more consistent naming 2022-05-16 21:52:22 +00:00
eltan vc/eltan/security/verified_boot/Makefile: add fmap_config.h dependency 2022-02-22 15:56:03 +00:00
google vc/google/elog: Record vboot FW boot information into elog 2022-08-02 07:06:30 +00:00
intel vendorcode/intel/fsp: Fix wrong license 2022-07-30 18:40:10 +00:00
mediatek mb/google: Replace some strings in regulator.c 2022-07-21 10:30:57 +00:00
siemens cbfs: Simplify load/map API names, remove type arguments 2020-12-02 22:13:17 +00:00
Makefile.inc soc/mediatek/mt8192: initialize DRAM using vendor reference code 2021-03-08 03:15:43 +00:00