diff options
author | Lijian Zhao <lijian.zhao@intel.com> | 2017-05-12 17:21:57 -0700 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2017-05-16 17:49:41 +0200 |
commit | d84c8f8601d1f8fad006cb2844caadf8dbd69962 (patch) | |
tree | aa2387a77cbd6710868b151ff6c3964f82a89631 /src/soc/intel | |
parent | 6b45ee44a9bbccb4dc42ea454aa20ef7d02a9fd1 (diff) |
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@intel.com>
Reviewed-on: https://review.coreboot.org/19684
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel')
-rw-r--r-- | src/soc/intel/common/block/pcr/pcr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/pcr/pcr.c b/src/soc/intel/common/block/pcr/pcr.c index 6560a4b337..4264cdf5f9 100644 --- a/src/soc/intel/common/block/pcr/pcr.c +++ b/src/soc/intel/common/block/pcr/pcr.c @@ -18,6 +18,10 @@ #include <intelblocks/pcr.h> #include <soc/pcr_ids.h> +#if !defined(CONFIG_PCR_BASE_ADDRESS) || (CONFIG_PCR_BASE_ADDRESS == 0) +#error "PCR_BASE_ADDRESS need to be non-zero!" +#endif + static void *__pcr_reg_address(uint8_t pid, uint16_t offset) { uintptr_t reg_addr; |