Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/83257?usp=email )
Change subject: soc/intel/cmn/cse: Make ME firmware version query function static ......................................................................
soc/intel/cmn/cse: Make ME firmware version query function static
This change modifies the get_me_fw_version() function to be statically scoped within src/soc/intel/common/block/cse/cse.c, as it is only used by the print_me_fw_version() function in the same file.
The function declaration is also removed from intelblocks/cse.h.
The order of the function definitions in cse.c was also changed to be more logical, with the now static helper function get_me_fw_version() defined first, before it is used.
TEST=Able to build google/rex.
Change-Id: Idd3a6431cfa824227361c7ed4f0d5300f1d04846 Signed-off-by: Subrata Banik subratabanik@google.com --- M src/soc/intel/common/block/cse/cse.c M src/soc/intel/common/block/include/intelblocks/cse.h 2 files changed, 18 insertions(+), 22 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/83257/1
diff --git a/src/soc/intel/common/block/cse/cse.c b/src/soc/intel/common/block/cse/cse.c index d78b8a0..e4d57e1 100644 --- a/src/soc/intel/common/block/cse/cse.c +++ b/src/soc/intel/common/block/cse/cse.c @@ -861,23 +861,8 @@ return resp.status; }
-void print_me_fw_version(void *unused) -{ - struct me_fw_ver_resp resp = {0}; - - /* Ignore if UART debugging is disabled */ - if (!CONFIG(CONSOLE_SERIAL)) - return; - - if (get_me_fw_version(&resp) == CB_SUCCESS) { - printk(BIOS_DEBUG, "ME: Version: %d.%d.%d.%d\n", resp.code.major, - resp.code.minor, resp.code.hotfix, resp.code.build); - return; - } - printk(BIOS_DEBUG, "ME: Version: Unavailable\n"); -} - -enum cb_err get_me_fw_version(struct me_fw_ver_resp *resp) +/* Queries and gets ME firmware version */ +static enum cb_err get_me_fw_version(struct me_fw_ver_resp *resp) { const struct mkhi_hdr fw_ver_msg = { .group_id = MKHI_GROUP_ID_GEN, @@ -924,6 +909,22 @@ return CB_SUCCESS; }
+void print_me_fw_version(void *unused) +{ + struct me_fw_ver_resp resp = {0}; + + /* Ignore if UART debugging is disabled */ + if (!CONFIG(CONSOLE_SERIAL)) + return; + + if (get_me_fw_version(&resp) == CB_SUCCESS) { + printk(BIOS_DEBUG, "ME: Version: %d.%d.%d.%d\n", resp.code.major, + resp.code.minor, resp.code.hotfix, resp.code.build); + return; + } + printk(BIOS_DEBUG, "ME: Version: Unavailable\n"); +} + void cse_trigger_vboot_recovery(enum csme_failure_reason reason) { printk(BIOS_DEBUG, "cse: CSE status registers: HFSTS1: 0x%x, HFSTS2: 0x%x " diff --git a/src/soc/intel/common/block/include/intelblocks/cse.h b/src/soc/intel/common/block/include/intelblocks/cse.h index 3db1324..552eb7b 100644 --- a/src/soc/intel/common/block/include/intelblocks/cse.h +++ b/src/soc/intel/common/block/include/intelblocks/cse.h @@ -444,11 +444,6 @@ void print_me_fw_version(void *unused);
/* - * Queries and gets ME firmware version - */ -enum cb_err get_me_fw_version(struct me_fw_ver_resp *resp); - -/* * Checks current working operation state is normal or not. * Returns true if CSE's current working state is normal, otherwise false. */