Commit 3bfcc9d7 authored by Usama Arif's avatar Usama Arif Committed by Alexei Fedorov
Browse files

plat/arm: common: add guard for arm_get_rotpk_info_regs



Only define arm_get_rotpk_info_regs if ROTPK is in registers,
i.e. (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_REGS_ID). This will
allow platform build without definition of TZ_PUB_KEY_HASH_BASE
if dedicated registers for ROTPK are not available on the platform.

Change-Id: I74ee2d5007f5d876a031a1efca20ebee2dede0c7
Signed-off-by: default avatarUsama Arif <usama.arif@arm.com>
parent eeb77da6
...@@ -47,8 +47,11 @@ uintptr_t nv_cntr_base_addr[MAX_NV_CTR_IDS] = { ...@@ -47,8 +47,11 @@ uintptr_t nv_cntr_base_addr[MAX_NV_CTR_IDS] = {
extern unsigned char arm_rotpk_header[], arm_rotpk_hash_end[]; extern unsigned char arm_rotpk_header[], arm_rotpk_hash_end[];
#if (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_REGS_ID) || ARM_CRYPTOCELL_INTEG
static unsigned char rotpk_hash_der[ARM_ROTPK_HEADER_LEN + ARM_ROTPK_HASH_LEN]; static unsigned char rotpk_hash_der[ARM_ROTPK_HEADER_LEN + ARM_ROTPK_HASH_LEN];
#endif
#if (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_REGS_ID)
/* /*
* Return the ROTPK hash stored in dedicated registers. * Return the ROTPK hash stored in dedicated registers.
*/ */
...@@ -85,6 +88,7 @@ int arm_get_rotpk_info_regs(void **key_ptr, unsigned int *key_len, ...@@ -85,6 +88,7 @@ int arm_get_rotpk_info_regs(void **key_ptr, unsigned int *key_len,
*flags = ROTPK_IS_HASH; *flags = ROTPK_IS_HASH;
return 0; return 0;
} }
#endif
#if (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_DEVEL_RSA_ID) || \ #if (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_DEVEL_RSA_ID) || \
(ARM_ROTPK_LOCATION_ID == ARM_ROTPK_DEVEL_ECDSA_ID) (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_DEVEL_ECDSA_ID)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment