Sridhar Siricilla has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48494 )
Change subject: soc/inte/common: Replace #if macro with if C-language constuct ......................................................................
soc/inte/common: Replace #if macro with if C-language constuct
This patch modifies CSE Lite driver to use 'if' C-lanugage construct instead of #if macro.
TEST=Built the code for drawcia
Signed-off-by: Sridhar Siricilla sridhar.siricilla@intel.com Change-Id: Iecd5cf56ecd280de920f479e174762fe6b4164b0 --- M src/soc/intel/common/block/cse/Kconfig M src/soc/intel/common/block/cse/cse_lite.c 2 files changed, 6 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/48494/1
diff --git a/src/soc/intel/common/block/cse/Kconfig b/src/soc/intel/common/block/cse/Kconfig index d3b7288..c562ea3 100644 --- a/src/soc/intel/common/block/cse/Kconfig +++ b/src/soc/intel/common/block/cse/Kconfig @@ -29,7 +29,6 @@ This config will enable CSE RW firmware update feature and also will be used ensure all the required configs are provided by mainboard.
-if SOC_INTEL_CSE_RW_UPDATE config SOC_INTEL_CSE_FMAP_NAME string "Name of CSE Region in FMAP" default "SI_ME" @@ -75,4 +74,3 @@ This config contains the Intel CSE RW version of the blob that is provided by SOC_INTEL_CSE_RW_FILE config and the version must be set in the format major.minor.hotfix.build (ex: 14.0.40.1209). -endif diff --git a/src/soc/intel/common/block/cse/cse_lite.c b/src/soc/intel/common/block/cse/cse_lite.c index d173b6a..c7dac38 100644 --- a/src/soc/intel/common/block/cse/cse_lite.c +++ b/src/soc/intel/common/block/cse/cse_lite.c @@ -429,7 +429,6 @@ return cse_boot_to_rw(cse_bp_info); }
-#if CONFIG(SOC_INTEL_CSE_RW_UPDATE) static const struct fw_version *cse_get_bp_entry_version(enum boot_partition_id bp, const struct cse_bp_info *bp_info) { @@ -772,7 +771,6 @@
return 0; } -#endif
void cse_fw_sync(void *unused) { @@ -801,12 +799,12 @@ * If SOC_INTEL_CSE_RW_UPDATE is defined , then trigger CSE firmware update. The driver * triggers recovery if CSE CBFS RW metadata or CSE CBFS RW blob is not available. */ -#if CONFIG(SOC_INTEL_CSE_RW_UPDATE) - uint8_t rv; - rv = cse_fw_update(&cse_bp_info.bp_info); - if (rv) - cse_trigger_recovery(rv); -#endif + if (CONFIG(SOC_INTEL_CSE_RW_UPDATE)) { + uint8_t rv; + rv = cse_fw_update(&cse_bp_info.bp_info); + if (rv) + cse_trigger_recovery(rv); + }
if (!cse_boot_to_rw(&cse_bp_info.bp_info)) { printk(BIOS_ERR, "cse_lite: Failed to switch to RW\n");
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48494 )
Change subject: soc/inte/common: Replace #if macro with if C-language constuct ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48494/1/src/soc/intel/common/block/... File src/soc/intel/common/block/cse/Kconfig:
https://review.coreboot.org/c/coreboot/+/48494/1/src/soc/intel/common/block/... PS1, Line 33: " add if SOC_INTEL_CSE_RW_UPDATE here so that this does not show up in the menu if SOC_INTEL_CSE_RW_UPDATE is not selected. Same for the rest of the configs below.
Sridhar Siricilla has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48494 )
Change subject: soc/inte/common: Replace #if macro with if C-language constuct ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48494/1/src/soc/intel/common/block/... File src/soc/intel/common/block/cse/Kconfig:
https://review.coreboot.org/c/coreboot/+/48494/1/src/soc/intel/common/block/... PS1, Line 33: "
add if SOC_INTEL_CSE_RW_UPDATE here so that this does not show up in the menu if SOC_INTEL_CSE_RW_UP […]
If we add SOC_INTEL_CSE_RW_UPDATE flag as dependent, then we have to introduce #if macros in the CSE Lite driver.
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48494 )
Change subject: soc/inte/common: Replace #if macro with if C-language constuct ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48494/1/src/soc/intel/common/block/... File src/soc/intel/common/block/cse/Kconfig:
https://review.coreboot.org/c/coreboot/+/48494/1/src/soc/intel/common/block/... PS1, Line 33: "
If we add SOC_INTEL_CSE_RW_UPDATE flag as dependent, then we have to introduce #if macros in the CSE […]
I am referring to the prompt only. Not to the config option. Adding it to the prompt will ensure that it is not visible in menuconfig. But, it is still defined and allows you to drop the #if macros.
Hello V Sowmya, build bot (Jenkins), Furquan Shaikh, Jamie Ryu, Rizwan Qureshi, Tim Wawrzynczak, Sugnan Prabhu S, Krishna P Bhat D, Patrick Rudolph, Karthik Ramasubramanian,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48494
to look at the new patch set (#2).
Change subject: soc/inte/common: Replace #if macro with if C-language constuct ......................................................................
soc/inte/common: Replace #if macro with if C-language constuct
This patch modifies CSE Lite driver to use 'if' C-lanugage construct instead of #if macro and adds 'if SOC_INTEL_CSE_RW_UPDATE' to the prompts of CSE Update related KConfigs to prevent appearing them in the menu.
TEST=Built the code for drawcia
Signed-off-by: Sridhar Siricilla sridhar.siricilla@intel.com Change-Id: Iecd5cf56ecd280de920f479e174762fe6b4164b0 --- M src/soc/intel/common/block/cse/Kconfig M src/soc/intel/common/block/cse/cse_lite.c 2 files changed, 13 insertions(+), 20 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/48494/2
Sridhar Siricilla has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48494 )
Change subject: soc/inte/common: Replace #if macro with if C-language constuct ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48494/1/src/soc/intel/common/block/... File src/soc/intel/common/block/cse/Kconfig:
https://review.coreboot.org/c/coreboot/+/48494/1/src/soc/intel/common/block/... PS1, Line 33: "
I am referring to the prompt only. Not to the config option. […]
Got it ...Thanks!
Hello V Sowmya, build bot (Jenkins), Furquan Shaikh, Jamie Ryu, Rizwan Qureshi, Tim Wawrzynczak, Sugnan Prabhu S, Krishna P Bhat D, Patrick Rudolph, Karthik Ramasubramanian,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48494
to look at the new patch set (#3).
Change subject: soc/inte/common: Replace #if macro with if C-language constuct ......................................................................
soc/inte/common: Replace #if macro with if C-language constuct
This patch modifies CSE Lite driver to use 'if' C-lanugage construct instead of #if macro and adds 'if SOC_INTEL_CSE_RW_UPDATE' to the prompts of CSE Update related KConfigs to prevent appearing them in the menu.
TEST=Built the code for drawcia
Signed-off-by: Sridhar Siricilla sridhar.siricilla@intel.com Change-Id: Iecd5cf56ecd280de920f479e174762fe6b4164b0 --- M src/soc/intel/common/block/cse/Kconfig M src/soc/intel/common/block/cse/cse_lite.c 2 files changed, 13 insertions(+), 19 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/48494/3
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48494 )
Change subject: soc/inte/common: Replace #if macro with if C-language constuct ......................................................................
Patch Set 3: Code-Review+2
Sridhar Siricilla has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48494 )
Change subject: soc/inte/common: Replace #if macro with if C-language constuct ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48494/1/src/soc/intel/common/block/... File src/soc/intel/common/block/cse/Kconfig:
https://review.coreboot.org/c/coreboot/+/48494/1/src/soc/intel/common/block/... PS1, Line 33: "
Got it ... […]
Done
Karthik Ramasubramanian has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48494 )
Change subject: soc/inte/common: Replace #if macro with if C-language constuct ......................................................................
Patch Set 4: Code-Review+2
Tim Wawrzynczak has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48494 )
Change subject: soc/inte/common: Replace #if macro with if C-language constuct ......................................................................
soc/inte/common: Replace #if macro with if C-language constuct
This patch modifies CSE Lite driver to use 'if' C-lanugage construct instead of #if macro and adds 'if SOC_INTEL_CSE_RW_UPDATE' to the prompts of CSE Update related KConfigs to prevent appearing them in the menu.
TEST=Built the code for drawcia
Signed-off-by: Sridhar Siricilla sridhar.siricilla@intel.com Change-Id: Iecd5cf56ecd280de920f479e174762fe6b4164b0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/48494 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Karthik Ramasubramanian kramasub@google.com Reviewed-by: Furquan Shaikh furquan@google.com --- M src/soc/intel/common/block/cse/Kconfig M src/soc/intel/common/block/cse/cse_lite.c 2 files changed, 13 insertions(+), 19 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved Karthik Ramasubramanian: Looks good to me, approved
diff --git a/src/soc/intel/common/block/cse/Kconfig b/src/soc/intel/common/block/cse/Kconfig index d3b7288..fec112b 100644 --- a/src/soc/intel/common/block/cse/Kconfig +++ b/src/soc/intel/common/block/cse/Kconfig @@ -29,50 +29,46 @@ This config will enable CSE RW firmware update feature and also will be used ensure all the required configs are provided by mainboard.
-if SOC_INTEL_CSE_RW_UPDATE config SOC_INTEL_CSE_FMAP_NAME - string "Name of CSE Region in FMAP" + string "Name of CSE Region in FMAP" if SOC_INTEL_CSE_RW_UPDATE default "SI_ME" help Name of CSE region in FMAP
config SOC_INTEL_CSE_RW_A_FMAP_NAME - string "Location of CSE RW A in FMAP" - depends on SOC_INTEL_CSE_LITE_SKU + string "Location of CSE RW A in FMAP" if SOC_INTEL_CSE_RW_UPDATE default "ME_RW_A" help Name of CSE RW A region in FMAP
config SOC_INTEL_CSE_RW_B_FMAP_NAME - string "Location of CSE RW B in FMAP" - depends on SOC_INTEL_CSE_LITE_SKU + string "Location of CSE RW B in FMAP" if SOC_INTEL_CSE_RW_UPDATE default "ME_RW_B" help Name of CSE RW B region in FMAP
config SOC_INTEL_CSE_RW_CBFS_NAME - string "CBFS entry name for CSE RW blob" + string "CBFS entry name for CSE RW blob" if SOC_INTEL_CSE_RW_UPDATE default "me_rw" help CBFS entry name for Intel CSE CBFS RW blob
config SOC_INTEL_CSE_RW_METADATA_CBFS_NAME - string "CBFS name for CSE RW metadata file" + string "CBFS name for CSE RW metadata file" if SOC_INTEL_CSE_RW_UPDATE default "me_rw.metadata" help CBFS name for Intel CSE CBFS RW metadata file
config SOC_INTEL_CSE_RW_FILE - string "Intel CSE CBFS RW path and filename" + string "Intel CSE CBFS RW path and filename" if SOC_INTEL_CSE_RW_UPDATE default "" help Intel CSE CBFS RW blob path and file name
config SOC_INTEL_CSE_RW_VERSION - string "Intel CSE RW firmware version" + string "Intel CSE RW firmware version" if SOC_INTEL_CSE_RW_UPDATE default "" help This config contains the Intel CSE RW version of the blob that is provided by SOC_INTEL_CSE_RW_FILE config and the version must be set in the format major.minor.hotfix.build (ex: 14.0.40.1209). -endif diff --git a/src/soc/intel/common/block/cse/cse_lite.c b/src/soc/intel/common/block/cse/cse_lite.c index 8e89723..1d261ea 100644 --- a/src/soc/intel/common/block/cse/cse_lite.c +++ b/src/soc/intel/common/block/cse/cse_lite.c @@ -429,7 +429,6 @@ return cse_boot_to_rw(cse_bp_info); }
-#if CONFIG(SOC_INTEL_CSE_RW_UPDATE) static const struct fw_version *cse_get_bp_entry_version(enum boot_partition_id bp, const struct cse_bp_info *bp_info) { @@ -775,7 +774,6 @@
return 0; } -#endif
void cse_fw_sync(void *unused) { @@ -804,12 +802,12 @@ * If SOC_INTEL_CSE_RW_UPDATE is defined , then trigger CSE firmware update. The driver * triggers recovery if CSE CBFS RW metadata or CSE CBFS RW blob is not available. */ -#if CONFIG(SOC_INTEL_CSE_RW_UPDATE) - uint8_t rv; - rv = cse_fw_update(&cse_bp_info.bp_info); - if (rv) - cse_trigger_recovery(rv); -#endif + if (CONFIG(SOC_INTEL_CSE_RW_UPDATE)) { + uint8_t rv; + rv = cse_fw_update(&cse_bp_info.bp_info); + if (rv) + cse_trigger_recovery(rv); + }
if (!cse_boot_to_rw(&cse_bp_info.bp_info)) { printk(BIOS_ERR, "cse_lite: Failed to switch to RW\n");