From 959eb162bbaf8e94d8eae5450bb2740d82f78b5c Mon Sep 17 00:00:00 2001 From: Wim Vervoorn Date: Wed, 13 Nov 2019 16:57:22 +0100 Subject: mb/facebook/fbg1701: Changed the order of the verify_lists Changed the order of the verify lists and updated the comments to reflect the order of execution. This makes the list easier to understand and maintain. BUG=N/A TEST=tested on fbg1701 Change-Id: Ia656fbf07e5d42bafd328eaba69b660e5a1e4f1a Signed-off-by: Wim Vervoorn Reviewed-on: https://review.coreboot.org/c/coreboot/+/36817 Reviewed-by: Patrick Georgi Reviewed-by: Frans Hendriks Tested-by: build bot (Jenkins) --- .../facebook/fbg1701/board_verified_boot.c | 41 ++++++++++++---------- 1 file changed, 22 insertions(+), 19 deletions(-) (limited to 'src/mainboard/facebook/fbg1701/board_verified_boot.c') diff --git a/src/mainboard/facebook/fbg1701/board_verified_boot.c b/src/mainboard/facebook/fbg1701/board_verified_boot.c index 685515bbca..a4d18e74c0 100644 --- a/src/mainboard/facebook/fbg1701/board_verified_boot.c +++ b/src/mainboard/facebook/fbg1701/board_verified_boot.c @@ -34,17 +34,6 @@ const verify_item_t bootblock_verify_list[] = { { VERIFY_TERMINATOR, NULL, { { NULL, 0 } }, 0, 0 } }; -/* The FSP is already checked in romstage */ -static const verify_item_t ram_stage_additional_list[] = { - { VERIFY_FILE, OP_ROM_VBT, { { NULL, CBFS_TYPE_RAW } }, - HASH_IDX_OPROM, MBOOT_PCR_INDEX_2 }, - { VERIFY_FILE, "logo.bmp", { { NULL, CBFS_TYPE_RAW } }, - HASH_IDX_LOGO, MBOOT_PCR_INDEX_2 }, - { VERIFY_FILE, "fallback/dsdt.aml", { { NULL, CBFS_TYPE_RAW } }, - HASH_IDX_DSDT, MBOOT_PCR_INDEX_2 }, - { VERIFY_TERMINATOR, NULL, { { NULL, 0 } }, 0, 0 } -}; - /* * The items used by the romstage. Bootblock and PublicKey are added here to make sure they * are measured @@ -71,13 +60,6 @@ const verify_item_t romstage_verify_list[] = { { VERIFY_TERMINATOR, NULL, { { NULL, 0 } }, 0, 0 } }; -/* The items used by the ramstage */ -const verify_item_t ramstage_verify_list[] = { - { VERIFY_FILE, RAMSTAGE, { { ram_stage_additional_list, - CBFS_TYPE_STAGE } }, HASH_IDX_RAM_STAGE, MBOOT_PCR_INDEX_0 }, - { VERIFY_TERMINATOR, NULL, { { NULL, 0 } }, 0, 0 } -}; - /* The items used by the postcar stage */ const verify_item_t postcar_verify_list[] = { { VERIFY_FILE, POSTCAR, { { NULL, CBFS_TYPE_STAGE } }, @@ -85,7 +67,27 @@ const verify_item_t postcar_verify_list[] = { { VERIFY_TERMINATOR, NULL, { { NULL, 0 } }, 0, 0 } }; -/* RAMSTAGE */ +/* + * The items used by the ramstage. FSP and microcode are already checked in the + * romstage verify list + */ +static const verify_item_t ram_stage_additional_list[] = { + { VERIFY_FILE, OP_ROM_VBT, { { NULL, CBFS_TYPE_RAW } }, + HASH_IDX_OPROM, MBOOT_PCR_INDEX_2 }, + { VERIFY_FILE, "logo.bmp", { { NULL, CBFS_TYPE_RAW } }, + HASH_IDX_LOGO, MBOOT_PCR_INDEX_2 }, + { VERIFY_FILE, "fallback/dsdt.aml", { { NULL, CBFS_TYPE_RAW } }, + HASH_IDX_DSDT, MBOOT_PCR_INDEX_2 }, + { VERIFY_TERMINATOR, NULL, { { NULL, 0 } }, 0, 0 } +}; + +const verify_item_t ramstage_verify_list[] = { + { VERIFY_FILE, RAMSTAGE, { { ram_stage_additional_list, + CBFS_TYPE_STAGE } }, HASH_IDX_RAM_STAGE, MBOOT_PCR_INDEX_0 }, + { VERIFY_TERMINATOR, NULL, { { NULL, 0 } }, 0, 0 } +}; + +/* items used by the payload */ const verify_item_t payload_verify_list[] = { { VERIFY_FILE, PAYLOAD, { { NULL, CBFS_TYPE_SELF | VERIFIED_BOOT_COPY_BLOCK } }, HASH_IDX_PAYLOAD, @@ -93,6 +95,7 @@ const verify_item_t payload_verify_list[] = { { VERIFY_TERMINATOR, NULL, { { NULL, 0 } }, 0, 0 } }; +/* list of allowed options roms */ const verify_item_t oprom_verify_list[] = { { VERIFY_TERMINATOR, NULL, { { NULL, 0 } }, 0, 0 } }; -- cgit v1.2.3