160c2d1dfSJorge Ramirez-Ortizifeq ($(CFG_NXP_SE05X),y) 260c2d1dfSJorge Ramirez-Ortiz# Enable the crypto driver 360c2d1dfSJorge Ramirez-Ortiz$(call force,CFG_CRYPTO_DRIVER,y) 460c2d1dfSJorge Ramirez-OrtizCFG_CRYPTO_DRIVER_DEBUG ?= 0 560c2d1dfSJorge Ramirez-Ortiz 660c2d1dfSJorge Ramirez-Ortiz# SE050 initialization 7d5050d09SJorge Ramirez-Ortiz# Some secure elements can only be accessed over an SCP03 enabled session. 8d5050d09SJorge Ramirez-Ortiz# Some of the NXP SE05X devices fall in this category (i.e NXP SE050F). 9d5050d09SJorge Ramirez-Ortiz# Only enable this configuration to support those systems. 10d5050d09SJorge Ramirez-OrtizCFG_CORE_SCP03_ONLY ?= n 11e41e74a8SJorge Ramirez-Ortiz# Rotate the SCP03 keys during SCP03 init (does not require user intervention). 12e41e74a8SJorge Ramirez-Ortiz# CAUTION: the provisioning configuration chosen might require a stable HUK. 13e41e74a8SJorge Ramirez-OrtizCFG_CORE_SE05X_SCP03_PROVISION_ON_INIT ?= n 14d5050d09SJorge Ramirez-Ortiz# Rotate the SCP03 keys via PTA (request from Normal World). 1560c2d1dfSJorge Ramirez-OrtizCFG_CORE_SE05X_SCP03_PROVISION ?= n 16d5050d09SJorge Ramirez-Ortiz# The Provision request will rotate the SCP03 keys back to its factory settings. 175ddb11a1SJorge Ramirez-OrtizCFG_CORE_SE05X_SCP03_PROVISION_WITH_FACTORY_KEYS ?= n 18d5050d09SJorge Ramirez-Ortiz# CAUTION: Leaks the SCP03 keys that are going to be programmed on the device's 19d5050d09SJorge Ramirez-Ortiz# NVM during a provisioning operation. 20d5050d09SJorge Ramirez-OrtizCFG_CORE_SE05X_DISPLAY_SCP03_KEYS ?= n 2160c2d1dfSJorge Ramirez-Ortiz# Displays the SE050 device information on the console at boot (i.e. OEFID) 2260c2d1dfSJorge Ramirez-OrtizCFG_CORE_SE05X_DISPLAY_INFO ?= y 23d5050d09SJorge Ramirez-Ortiz# Enables SCP03 protocol during boot (does not require user intervention) 2460c2d1dfSJorge Ramirez-OrtizCFG_CORE_SE05X_SCP03_EARLY ?= y 25d5050d09SJorge Ramirez-Ortiz# CAUTION: Deletes all persistent storage (keys/certs) from the SE05X at boot 2660c2d1dfSJorge Ramirez-OrtizCFG_CORE_SE05X_INIT_NVM ?= n 276301ca1cSJorge Ramirez-Ortiz# Prevents the deletion of the secure storage object holding a reference to a 286301ca1cSJorge Ramirez-Ortiz# Secure Element (SE) Non Volatile Memory object unless there is explicit 296301ca1cSJorge Ramirez-Ortiz# confirmation from the SE that the NVM object has been removed. 306301ca1cSJorge Ramirez-OrtizCFG_CORE_SE05X_BLOCK_OBJ_DEL_ON_ERROR ?= n 31fb559031SJorge Ramirez-Ortiz# Select the SE05X applet version for aligning the built-in features 32*d99b271aSJorge Ramirez-OrtizCFG_CORE_SE05X_VER ?= 03_XX 3360c2d1dfSJorge Ramirez-Ortiz 3460c2d1dfSJorge Ramirez-Ortiz# I2C bus baudrate (depends on SoC) 3560c2d1dfSJorge Ramirez-OrtizCFG_CORE_SE05X_BAUDRATE ?= 3400000 3660c2d1dfSJorge Ramirez-Ortiz# I2C bus [0..2] (depends on board) 3760c2d1dfSJorge Ramirez-OrtizCFG_CORE_SE05X_I2C_BUS ?= 2 38613c6309SJorge Ramirez-Ortiz# I2C access via REE after TEE boot 39613c6309SJorge Ramirez-OrtizCFG_CORE_SE05X_I2C_TRAMPOLINE ?= y 4060c2d1dfSJorge Ramirez-Ortiz 4160c2d1dfSJorge Ramirez-Ortiz# Extra stacks required to support the Plug and Trust external library 4260c2d1dfSJorge Ramirez-Ortizifeq ($(shell test $(CFG_STACK_THREAD_EXTRA) -lt 8192; echo $$?), 0) 4360c2d1dfSJorge Ramirez-Ortiz$(error Error: SE050 requires CFG_STACK_THREAD_EXTRA at least 8192) 4460c2d1dfSJorge Ramirez-Ortizendif 4560c2d1dfSJorge Ramirez-Ortizifeq ($(shell test $(CFG_STACK_TMP_EXTRA) -lt 8192; echo $$?), 0) 4660c2d1dfSJorge Ramirez-Ortiz$(error Error: SE050 requires CFG_STACK_TMP_EXTRA at least 8192) 4760c2d1dfSJorge Ramirez-Ortizendif 4860c2d1dfSJorge Ramirez-Ortiz 495411b322SJorge Ramirez-Ortiz# SE05X Die Identifier 505411b322SJorge Ramirez-OrtizCFG_NXP_SE05X_DIEID_DRV ?= y 5160c2d1dfSJorge Ramirez-Ortiz 52ff0c5d42SJorge Ramirez-Ortiz# Allow a secure client to enable the SCP03 session 53ff0c5d42SJorge Ramirez-OrtizCFG_NXP_SE05X_SCP03_DRV ?= y 54ff0c5d42SJorge Ramirez-Ortizifeq ($(CFG_NXP_SE05X_SCP03_DRV),y) 55ff0c5d42SJorge Ramirez-Ortiz$(call force,CFG_SCP03_PTA,y,Mandated by CFG_NXP_SE05X_SCP03) 56ff0c5d42SJorge Ramirez-Ortizendif 57ff0c5d42SJorge Ramirez-Ortiz 5832ddbffbSJorge Ramirez-Ortiz# Allow a secure client to send APDU raw frames 5932ddbffbSJorge Ramirez-OrtizCFG_NXP_SE05X_APDU_DRV ?= y 6032ddbffbSJorge Ramirez-Ortizifeq ($(CFG_NXP_SE05X_APDU_DRV),y) 6132ddbffbSJorge Ramirez-Ortiz$(call force,CFG_APDU_PTA,y,Mandated by CFG_NXP_SE05X_APDU) 6232ddbffbSJorge Ramirez-Ortizendif 6332ddbffbSJorge Ramirez-Ortiz 6460c2d1dfSJorge Ramirez-Ortiz# Random Number Generator 6560c2d1dfSJorge Ramirez-OrtizCFG_NXP_SE05X_RNG_DRV ?= y 6660c2d1dfSJorge Ramirez-Ortizifeq ($(CFG_NXP_SE05X_RNG_DRV),y) 6760c2d1dfSJorge Ramirez-Ortiz$(call force,CFG_WITH_SOFTWARE_PRNG,n) 6860c2d1dfSJorge Ramirez-Ortizendif 6960c2d1dfSJorge Ramirez-Ortiz 7060c2d1dfSJorge Ramirez-Ortizse050-one-enabled = $(call cfg-one-enabled, \ 7160c2d1dfSJorge Ramirez-Ortiz $(foreach v,$(1), CFG_NXP_SE05X_$(v)_DRV)) 7260c2d1dfSJorge Ramirez-Ortiz# Asymmetric ciphers 7360c2d1dfSJorge Ramirez-OrtizCFG_NXP_SE05X_RSA_DRV ?= y 74a40be7ebSJorge Ramirez-OrtizCFG_NXP_SE05X_RSA_DRV_FALLBACK ?= n 754c69b1f1SJorge Ramirez-OrtizCFG_NXP_SE05X_ECC_DRV ?= y 76d8eed0c1SJorge Ramirez-OrtizCFG_NXP_SE05X_ECC_DRV_FALLBACK ?= n 774c69b1f1SJorge Ramirez-Ortiz$(call force,CFG_NXP_SE05X_ACIPHER_DRV,$(call se050-one-enabled,RSA ECC)) 7860c2d1dfSJorge Ramirez-Ortiz 7960c2d1dfSJorge Ramirez-Ortiz# Asymmetric driver 8060c2d1dfSJorge Ramirez-Ortizifeq ($(CFG_NXP_SE05X_ACIPHER_DRV),y) 8160c2d1dfSJorge Ramirez-Ortiz$(call force,CFG_CRYPTO_DRV_ACIPHER,y,Mandated by CFG_NXP_SE05X_ACIPHER_DRV) 8260c2d1dfSJorge Ramirez-Ortizendif 8360c2d1dfSJorge Ramirez-Ortiz 8460c2d1dfSJorge Ramirez-Ortiz# Asymmetric ciphers configuration 8560c2d1dfSJorge Ramirez-Ortiz# - RSA 8660c2d1dfSJorge Ramirez-Ortizifeq ($(CFG_NXP_SE05X_RSA_DRV),y) 8760c2d1dfSJorge Ramirez-Ortiz$(call force,CFG_CRYPTO_DRV_RSA,y) 8860c2d1dfSJorge Ramirez-OrtizCFG_CRYPTO_RSASSA_NA1 ?= y 8960c2d1dfSJorge Ramirez-Ortizendif 904c69b1f1SJorge Ramirez-Ortiz# - ECC 914c69b1f1SJorge Ramirez-Ortizifeq ($(CFG_NXP_SE05X_ECC_DRV),y) 924c69b1f1SJorge Ramirez-Ortiz$(call force,CFG_CRYPTO_DRV_ECC,y) 934c69b1f1SJorge Ramirez-Ortizendif 9460c2d1dfSJorge Ramirez-Ortiz 9560c2d1dfSJorge Ramirez-Ortiz# Symmetric ciphers 9660c2d1dfSJorge Ramirez-OrtizCFG_NXP_SE05X_CTR_DRV ?= y 9760c2d1dfSJorge Ramirez-Ortiz$(call force,CFG_NXP_SE05X_CIPHER_DRV,$(call se050-one-enabled,CTR)) 9860c2d1dfSJorge Ramirez-Ortiz 9960c2d1dfSJorge Ramirez-Ortiz# Symmetric driver 10060c2d1dfSJorge Ramirez-Ortizifeq ($(CFG_NXP_SE05X_CIPHER_DRV),y) 10160c2d1dfSJorge Ramirez-Ortiz$(call force,CFG_CRYPTO_DRV_CIPHER,y,Mandated by CFG_NXP_SE05X_CIPHER_DRV) 10260c2d1dfSJorge Ramirez-Ortizendif 10360c2d1dfSJorge Ramirez-Ortiz 10460c2d1dfSJorge Ramirez-Ortizendif # CFG_NXP_SE05X 105