Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/83398?usp=email )
Change subject: soc/intel/cmn/cse: Refine boot partition logging ......................................................................
soc/intel/cmn/cse: Refine boot partition logging
This patch ensures CSE boot partition (RO/RW) version information only log when the status is "success". If the status is not successful, log an error message indicating the failure and status code.
This change avoids logging potentially incorrect version information when the boot partition is not valid.
BUG=b:305898363 TEST=Builds successfully for google/rex variants.
Change-Id: I1932302b145326a1131d64b04af1cbfd6d050b7b Signed-off-by: Subrata Banik subratabanik@google.com --- M src/soc/intel/common/block/cse/cse_lite.c 1 file changed, 10 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/98/83398/1
diff --git a/src/soc/intel/common/block/cse/cse_lite.c b/src/soc/intel/common/block/cse/cse_lite.c index 6c4fed7..0917897 100644 --- a/src/soc/intel/common/block/cse/cse_lite.c +++ b/src/soc/intel/common/block/cse/cse_lite.c @@ -271,18 +271,22 @@
/* Log version info of RO & RW partitions */ cse_bp = cse_get_bp_entry(RO); - printk(BIOS_DEBUG, "cse_lite: %s version = %d.%d.%d.%d (Status=0x%x, Start=0x%x, End=0x%x)\n", + if (cse_bp->status == BP_STATUS_SUCCESS) + printk(BIOS_DEBUG, "cse_lite: %s version = %d.%d.%d.%d (Start=0x%x, End=0x%x)\n", GET_BP_STR(RO), cse_bp->fw_ver.major, cse_bp->fw_ver.minor, cse_bp->fw_ver.hotfix, cse_bp->fw_ver.build, - cse_bp->status, cse_bp->start_offset, - cse_bp->end_offset); + cse_bp->start_offset, cse_bp->end_offset); + else + printk(BIOS_ERR, "cse_lite: %s status=0x%x\n", GET_BP_STR(RO), cse_bp->status);
cse_bp = cse_get_bp_entry(RW); - printk(BIOS_DEBUG, "cse_lite: %s version = %d.%d.%d.%d (Status=0x%x, Start=0x%x, End=0x%x)\n", + if (cse_bp->status == BP_STATUS_SUCCESS) + printk(BIOS_DEBUG, "cse_lite: %s version = %d.%d.%d.%d (Start=0x%x, End=0x%x)\n", GET_BP_STR(RW), cse_bp->fw_ver.major, cse_bp->fw_ver.minor, cse_bp->fw_ver.hotfix, cse_bp->fw_ver.build, - cse_bp->status, cse_bp->start_offset, - cse_bp->end_offset); + cse_bp->start_offset, cse_bp->end_offset); + else + printk(BIOS_ERR, "cse_lite: %s status=0x%x\n", GET_BP_STR(RW), cse_bp->status); }
/*