[coreboot-gerrit] Change in coreboot[master]: soc/intel/common: Add sanity check of PCR_BASE_ADDRESS
Lijian Zhao (Code Review)
gerrit at coreboot.org
Sat May 13 02:37:11 CEST 2017
Lijian Zhao has uploaded a new change for review. ( https://review.coreboot.org/19684 )
Change subject: soc/intel/common: Add sanity check of PCR_BASE_ADDRESS
......................................................................
soc/intel/common: Add sanity check of PCR_BASE_ADDRESS
PCR_BASE_ADRESS may be zero if SOC Kconfig didn't define the non zero
default value.
TEST=Remove the PCR_BASE_ADDRESS config in Apollolake Kconfig file and
build.
BUG=None
Change-Id: I396aa1a3e89507c90e17229a986de5d2c0887c9c
Signed-off-by: Lijian Zhao <lijian.zhao at intel.com>
---
M src/soc/intel/common/block/pcr/pcr.c
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/19684/1
diff --git a/src/soc/intel/common/block/pcr/pcr.c b/src/soc/intel/common/block/pcr/pcr.c
index 6560a4b..ccd7d4d 100644
--- a/src/soc/intel/common/block/pcr/pcr.c
+++ b/src/soc/intel/common/block/pcr/pcr.c
@@ -24,6 +24,9 @@
/* Create an address based off of port id and offset. */
reg_addr = CONFIG_PCR_BASE_ADDRESS;
+ #if(CONFIG_PCR_BASE_ADDRESS ==0)
+ #error "PCR_BASE_ADDRESS need to be non-zero!"
+ #endif
reg_addr += ((uintptr_t)pid) << PCR_PORTID_SHIFT;
reg_addr += (uintptr_t)offset;
--
To view, visit https://review.coreboot.org/19684
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I396aa1a3e89507c90e17229a986de5d2c0887c9c
Gerrit-PatchSet: 1
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Lijian Zhao <lijian.zhao at intel.com>
More information about the coreboot-gerrit
mailing list