diff options
author | Tamas Ban <tamas.ban@arm.com> | 2019-11-21 13:48:05 +0000 |
---|---|---|
committer | David Vincze <david.vincze@arm.com> | 2019-11-28 16:05:09 +0100 |
commit | dbfea70f960ec48aec7b799e7cba6a3eab151216 (patch) | |
tree | c316139ecd530da0448488e1cb6040960d33db4b | |
parent | f0dc21c02b697e893a54d4e61f266b33a19173a8 (diff) | |
download | trusted-firmware-m-dbfea70f960ec48aec7b799e7cba6a3eab151216.tar.gz |
CC312: Make public LCS and ROTPK getter functions
By default the LCS and ROTPK getter functions are internal in CC312
runtime library. This change is a workaround to use them as public
interface because these functionalities needed by TF-M:
- get hash of ROTPK: MCUBoot validates the ROTPK key
- get LCS: Attestation service include the device LCS to EAT token
Change-Id: If7d0fafc77a5aac6e0f7c61040122263ffa8798d
Signed-off-by: Raef Coles <raef.coles@arm.com>
4 files changed, 14 insertions, 11 deletions
diff --git a/lib/ext/cryptocell-312-runtime/codesafe/src/secure_boot_debug/platform/stage/rt/cc3x/secureboot_stage_defs.h b/lib/ext/cryptocell-312-runtime/codesafe/src/secure_boot_debug/platform/stage/rt/cc3x/secureboot_stage_defs.h index b7b0844ad1..c721b1fe22 100644 --- a/lib/ext/cryptocell-312-runtime/codesafe/src/secure_boot_debug/platform/stage/rt/cc3x/secureboot_stage_defs.h +++ b/lib/ext/cryptocell-312-runtime/codesafe/src/secure_boot_debug/platform/stage/rt/cc3x/secureboot_stage_defs.h @@ -26,7 +26,7 @@ extern "C" #include "crypto_driver.h" #include "bsv_hw_defs.h" #include "sbrt_int_func.h" -#include "mbedtls_cc_mng.h" +#include "mbedtls_cc_mng_int.h" #include "pka_hw_defs.h" extern unsigned long gCcRegBase; diff --git a/lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/Makefile b/lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/Makefile index 10c9d3e1cf..bf93ff51e0 100755 --- a/lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/Makefile +++ b/lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/Makefile @@ -52,6 +52,14 @@ PUBLIC_INCLUDES += $(MBEDTLS_ALT_API)/cc_ecc_internal.h $(CC_API_3x)/mbedtls_cc_ PUBLIC_INCLUDES += $(MANAGEMENT_INCLUDES)/mbedtls_cc_mng.h $(MANAGEMENT_INCLUDES)/mbedtls_cc_mng_error.h PUBLIC_INCLUDES += $(SHARED_INCDIR)/cc_util/mbedtls_cc_util_key_derivation.h $(SHARED_INCDIR)/cc_util/mbedtls_cc_util_key_derivation_defs.h $(SHARED_INCDIR)/cc_util/mbedtls_cc_util_defs.h PUBLIC_INCLUDES += $(SHARED_INCDIR)/cc_util/cc_util_error.h +PUBLIC_INCLUDES += $(SHARED_INCDIR)/cc_regs.h +PUBLIC_INCLUDES += $(SHARED_INCDIR)/cc_bitops.h +PUBLIC_INCLUDES += $(SHARED_INCDIR)/../hw/include/dx_host.h +PUBLIC_INCLUDES += $(SHARED_INCDIR)/../hw/include/dx_nvm.h +PUBLIC_INCLUDES += $(SHARED_INCDIR)/../hw/include/dx_reg_common.h +PUBLIC_INCLUDES += $(SHARED_INCDIR)/../hw/include/musca_b1/dx_reg_base_host.h +PUBLIC_INCLUDES += $(HOST_PROJ_ROOT)/src/cc_mng/mbedtls_cc_mng_int.h +PUBLIC_INCLUDES += $(HOST_PROJ_ROOT)/src/hal/cc_hal_plat.h PUBLIC_INCLUDES += $(SHARED_INCDIR)/proj/cc3x/cc_general_defs.h $(SHARED_INCDIR)/proj/cc3x/cc_ecpki_domains_defs.h $(SHARED_INCDIR)/proj/cc3x/cc_sram_map.h PUBLIC_INCLUDES += $(SHARED_INCDIR)/proj/cc3x/cc_pka_hw_plat_defs.h diff --git a/lib/ext/cryptocell-312-runtime/host/src/cc_mng/mbedtls_cc_mng_int.h b/lib/ext/cryptocell-312-runtime/host/src/cc_mng/mbedtls_cc_mng_int.h index ae42b18227..ea51539807 100644 --- a/lib/ext/cryptocell-312-runtime/host/src/cc_mng/mbedtls_cc_mng_int.h +++ b/lib/ext/cryptocell-312-runtime/host/src/cc_mng/mbedtls_cc_mng_int.h @@ -24,6 +24,11 @@ typedef enum { }mbedtls_mng_pubKeyType_t; /************************ Defines ******************************/ +#define CC_MNG_LCS_CM 0x0 /*! Chip manufacturer (CM LCS). */ +#define CC_MNG_LCS_DM 0x1 /*! Device manufacturer (DM LCS). */ +#define CC_MNG_LCS_SEC_ENABLED 0x5 /*! Security enabled (Secure LCS). */ +#define CC_MNG_LCS_RMA 0x7 /*! RMA (RMA LCS). */ + #define CC_MNG_INVALID_REG_VAL 0xFFFFFFFF #define CC_MNG_OEM_RMA_SHFT 30 diff --git a/lib/ext/cryptocell-312-runtime/shared/include/cc_mng/mbedtls_cc_mng.h b/lib/ext/cryptocell-312-runtime/shared/include/cc_mng/mbedtls_cc_mng.h index 4c4691b0b0..afef5a1593 100644 --- a/lib/ext/cryptocell-312-runtime/shared/include/cc_mng/mbedtls_cc_mng.h +++ b/lib/ext/cryptocell-312-runtime/shared/include/cc_mng/mbedtls_cc_mng.h @@ -34,16 +34,6 @@ extern "C" /* *********************** Defines ***************************** */ -/* LCS. */ -/*! Chip manufacturer (CM LCS). */ -#define CC_MNG_LCS_CM 0x0 -/*! Device manufacturer (DM LCS). */ -#define CC_MNG_LCS_DM 0x1 -/*! Security enabled (Secure LCS). */ -#define CC_MNG_LCS_SEC_ENABLED 0x5 -/*! RMA (RMA LCS). */ -#define CC_MNG_LCS_RMA 0x7 - /* *********************** Macros ***************************** */ |