diff options
author | Subrata Banik <subratabanik@google.com> | 2024-07-09 23:44:53 +0530 |
---|---|---|
committer | Subrata Banik <subratabanik@google.com> | 2024-07-11 15:25:29 +0000 |
commit | e94d29a02bf50c1cc9bd9340375134832d3ad4a2 (patch) | |
tree | aa5adb683b8f8a18501724e834c3eefc3967aac0 /src/soc/intel/common/block | |
parent | 24d81018eadbb5488966ee3d794cb8b09f3f15be (diff) |
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>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83398
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Diffstat (limited to 'src/soc/intel/common/block')
-rw-r--r-- | src/soc/intel/common/block/cse/cse_lite.c | 16 |
1 files changed, 10 insertions, 6 deletions
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); } /* |