From e94d29a02bf50c1cc9bd9340375134832d3ad4a2 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Tue, 9 Jul 2024 23:44:53 +0530 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/83398 Tested-by: build bot (Jenkins) Reviewed-by: Nick Vaccaro --- src/soc/intel/common/block/cse/cse_lite.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/soc/intel') diff --git a/src/soc/intel/common/block/cse/cse_lite.c b/src/soc/intel/common/block/cse/cse_lite.c index 6c4fed7c41..0917897e30 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 @@ static void cse_print_boot_partition_info(void) /* 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); } /* -- cgit v1.2.3