Dinesh Gehlot has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/75896?usp=email )
Change subject: soc/intel/cmd/blk/cse: Use common firmware partitionn data structure ......................................................................
soc/intel/cmd/blk/cse: Use common firmware partitionn data structure
This patch updates local define firmware partition version with common data-structure.
BUG=b:280722061 Test=Verified the changes on nissa board.
Signed-off-by: Dinesh Gehlot digehlot@google.com Change-Id: Ia27ff72a244d1f4872059c5ee7433e36fa55d963 --- M src/soc/intel/common/block/cse/cse_lite_cmos.c 1 file changed, 7 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/96/75896/1
diff --git a/src/soc/intel/common/block/cse/cse_lite_cmos.c b/src/soc/intel/common/block/cse/cse_lite_cmos.c index fa97eb2..94e31df 100644 --- a/src/soc/intel/common/block/cse/cse_lite_cmos.c +++ b/src/soc/intel/common/block/cse/cse_lite_cmos.c @@ -40,8 +40,7 @@
struct cse_fw_table { uint32_t signature; - struct fw_version cse_version; - struct fw_version ish_version; + struct cse_fw_partition_info fw_version; uint16_t checksum; } __packed;
@@ -95,8 +94,8 @@ u8 i, *p, offset = PARTITION_FW_CMOS_OFFSET;
version->signature = PARTITION_FW_SIGNATURE; - memset(&version->cse_version, 0, sizeof(struct fw_version)); - memset(&version->ish_version, 0, sizeof(struct fw_version)); + memset(&version->fw_version.cse_version, 0, sizeof(struct fw_version)); + memset(&version->fw_version.ish_version, 0, sizeof(struct fw_version)); version->checksum = compute_ip_checksum(version, offsetof(struct cse_fw_table, checksum));
for (p = (u8 *)version, i = 0; i < sizeof(*version); i++, p++) @@ -128,10 +127,10 @@
switch (fw_type) { case CSE_RW_FW: - memcpy(fw_version, &data.cse_version, sizeof(struct fw_version)); + memcpy(fw_version, &data.fw_version.cse_version, sizeof(struct fw_version)); break; case ISH_FW: - memcpy(fw_version, &data.ish_version, sizeof(struct fw_version)); + memcpy(fw_version, &data.fw_version.ish_version, sizeof(struct fw_version)); break; default: printk(BIOS_ERR, "CMOS read failed due to unsupported firmware type\n"); @@ -147,10 +146,10 @@
switch (fw_type) { case CSE_RW_FW: - memcpy(&data.cse_version, fw_version, sizeof(struct fw_version)); + memcpy(&data.fw_version.cse_version, fw_version, sizeof(struct fw_version)); break; case ISH_FW: - memcpy(&data.ish_version, fw_version, sizeof(struct fw_version)); + memcpy(&data.fw_version.ish_version, fw_version, sizeof(struct fw_version)); break; default: printk(BIOS_ERR, "CMOS write failed due to unsupported firmware type\n");