aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMark Horvath <mark.horvath@arm.com>2020-09-23 11:52:25 +0200
committerSoby Mathew <soby.mathew@arm.com>2020-12-10 10:54:43 +0000
commite86399b9344e17568afeaee3318507da929a2337 (patch)
tree47b9245b79326b404edc7021eef96f3f43d47106 /lib
parent90605b58048deabe49456d29a93c9debeaeb95fe (diff)
downloadtrusted-firmware-m-e86399b9344e17568afeaee3318507da929a2337.tar.gz
Platform: Add support for CC312 HW in Musca-B1 Secure Enclave
PID values updated to recognize the CC312 HW in Musca-B1 Secure Enclave. Change-Id: I30d3409a8ccdd7551d9ae9581a46126d8b4fddb8 Signed-off-by: Mark Horvath <mark.horvath@arm.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/cc_lib.c4
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/hal/cc_hal_plat.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/cc_lib.c b/lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/cc_lib.c
index 7fc7ee107..c9e284929 100644
--- a/lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/cc_lib.c
+++ b/lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/cc_lib.c
@@ -117,6 +117,7 @@ static CClibRetCode_t VerifyPidVal(void)
uint32_t pidReg[CC_BSV_PID_SIZE_WORDS] = {0};
uint32_t pidVal1[CC_BSV_PID_SIZE_WORDS] = {CC_BSV_PID_0_VAL, CC_BSV_PID_1_VAL, CC_BSV_PID_2_VAL, CC_BSV_PID_3_VAL, CC_BSV_PID_4_VAL};
uint32_t pidVal2[CC_BSV_PID_SIZE_WORDS] = {CC_BSV_PID_0_VAL, CC_BSV_PID_1_VAL, CC_BSV_PID_2_1_VAL, CC_BSV_PID_3_VAL, CC_BSV_PID_4_VAL};
+ uint32_t pidVal3[CC_BSV_PID_SIZE_WORDS] = {CC_BSV_PID_0_VAL, CC_BSV_PID_1_VAL, CC_BSV_PID_2_2_VAL, CC_BSV_PID_3_VAL, CC_BSV_PID_4_VAL};
pidReg[0] = CC_HAL_READ_REGISTER(CC_REG_OFFSET(HOST_RGF, PERIPHERAL_ID_0));
pidReg[1] = CC_HAL_READ_REGISTER(CC_REG_OFFSET(HOST_RGF, PERIPHERAL_ID_1));
@@ -125,7 +126,8 @@ static CClibRetCode_t VerifyPidVal(void)
pidReg[4] = CC_HAL_READ_REGISTER(CC_REG_OFFSET(HOST_RGF, PERIPHERAL_ID_4));
if ((CC_PalMemCmp((uint8_t*)pidVal1, (uint8_t*)pidReg, sizeof(pidVal1)) != 0) &&
- (CC_PalMemCmp((uint8_t*)pidVal2, (uint8_t*)pidReg, sizeof(pidVal2)) != 0)) {
+ (CC_PalMemCmp((uint8_t*)pidVal2, (uint8_t*)pidReg, sizeof(pidVal2)) != 0) &&
+ (CC_PalMemCmp((uint8_t*)pidVal3, (uint8_t*)pidReg, sizeof(pidVal3)) != 0)) {
return CC_LIB_RET_EINVAL_PIDR;
}
diff --git a/lib/ext/cryptocell-312-runtime/host/src/hal/cc_hal_plat.h b/lib/ext/cryptocell-312-runtime/host/src/hal/cc_hal_plat.h
index 21dd81f14..38aa6d811 100644
--- a/lib/ext/cryptocell-312-runtime/host/src/hal/cc_hal_plat.h
+++ b/lib/ext/cryptocell-312-runtime/host/src/hal/cc_hal_plat.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2020, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -30,6 +30,7 @@
#define CC_BSV_PID_2_1_VAL 0x0000002BUL
+#define CC_BSV_PID_2_2_VAL 0x0000001BUL
/* Component ID registers values */
#define CC_BSV_CID_0_VAL 0x0DUL