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>
This commit is contained in:
@@ -271,18 +271,22 @@ static void cse_print_boot_partition_info(void)
|
|||||||
|
|
||||||
/* Log version info of RO & RW partitions */
|
/* Log version info of RO & RW partitions */
|
||||||
cse_bp = cse_get_bp_entry(RO);
|
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,
|
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->fw_ver.hotfix, cse_bp->fw_ver.build,
|
||||||
cse_bp->status, cse_bp->start_offset,
|
cse_bp->start_offset, cse_bp->end_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);
|
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,
|
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->fw_ver.hotfix, cse_bp->fw_ver.build,
|
||||||
cse_bp->status, cse_bp->start_offset,
|
cse_bp->start_offset, cse_bp->end_offset);
|
||||||
cse_bp->end_offset);
|
else
|
||||||
|
printk(BIOS_ERR, "cse_lite: %s status=0x%x\n", GET_BP_STR(RW), cse_bp->status);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user