fw_config: Convert fw_config to a 64-bit field
We all knew this was coming, 32 bits is never enough. Doing this early so that it doesn't affect too much code yet. Take care of every usage of fw_config throughout the codebase so the conversion is all done at once. BUG=b:169668368 TEST=Hacked up this code to OR 0x1_000_0000 with CBI-sourced FW_CONFIG and verify the console print contained that bit. Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Change-Id: I6f2065d347eafa0ef7b346caeabdc3b626402092 Reviewed-on: https://review.coreboot.org/c/coreboot/+/45939 Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
@@ -841,9 +841,16 @@ int google_chromeec_cbi_get_sku_id(uint32_t *id)
|
||||
return cbi_get_uint32(id, CBI_TAG_SKU_ID);
|
||||
}
|
||||
|
||||
int google_chromeec_cbi_get_fw_config(uint32_t *fw_config)
|
||||
int google_chromeec_cbi_get_fw_config(uint64_t *fw_config)
|
||||
{
|
||||
return cbi_get_uint32(fw_config, CBI_TAG_FW_CONFIG);
|
||||
uint32_t config;
|
||||
|
||||
if (cbi_get_uint32(&config, CBI_TAG_FW_CONFIG))
|
||||
return -1;
|
||||
|
||||
/* FIXME: Yet to determine source of other 32 bits... */
|
||||
*fw_config = (uint64_t)config;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int google_chromeec_cbi_get_oem_id(uint32_t *id)
|
||||
|
@@ -83,7 +83,7 @@ int google_chromeec_reboot(int dev_idx, enum ec_reboot_cmd type, uint8_t flags);
|
||||
*/
|
||||
int google_chromeec_cbi_get_oem_id(uint32_t *id);
|
||||
int google_chromeec_cbi_get_sku_id(uint32_t *id);
|
||||
int google_chromeec_cbi_get_fw_config(uint32_t *fw_config);
|
||||
int google_chromeec_cbi_get_fw_config(uint64_t *fw_config);
|
||||
int google_chromeec_cbi_get_dram_part_num(char *buf, size_t bufsize);
|
||||
int google_chromeec_cbi_get_oem_name(char *buf, size_t bufsize);
|
||||
/* version may be stored in CBI as a smaller integer width, but the EC code
|
||||
|
Reference in New Issue
Block a user