1120c43adSJerome Forissier# Default configuration values for OP-TEE core (all platforms). 2120c43adSJerome Forissier# 3120c43adSJerome Forissier# Platform-specific overrides are in core/arch/arm32/plat-*/conf.mk. 4120c43adSJerome Forissier# Some subsystem-specific defaults are not here but rather in */sub.mk. 5120c43adSJerome Forissier# 6120c43adSJerome Forissier# Configuration values may be assigned from multiple sources. 7120c43adSJerome Forissier# From higher to lower priority: 8120c43adSJerome Forissier# 9120c43adSJerome Forissier# 1. Make arguments ('make CFG_FOO=bar...') 10120c43adSJerome Forissier# 2. The file specified by $(CFG_OPTEE_CONFIG) (if defined) 11120c43adSJerome Forissier# 3. The environment ('CFG_FOO=bar make...') 12120c43adSJerome Forissier# 4. The platform-specific configuration file: core/arch/arm32/plat-*/conf.mk 13120c43adSJerome Forissier# 5. This file 14120c43adSJerome Forissier# 6. Subsystem-specific makefiles (*/sub.mk) 15120c43adSJerome Forissier# 16b5569a68SPascal Brand# Actual values used during the build are output to $(out-dir)/conf.mk 17120c43adSJerome Forissier# (CFG_* variables only). 18120c43adSJerome Forissier 19a75f2e14SJerome Forissier# Cross-compiler prefix and suffix 20a75f2e14SJerome ForissierCROSS_COMPILE ?= arm-linux-gnueabihf- 21c042fbefSJerome ForissierCROSS_COMPILE32 ?= $(CROSS_COMPILE) 22c042fbefSJerome ForissierCROSS_COMPILE64 ?= aarch64-linux-gnu- 23a75f2e14SJerome ForissierCOMPILER ?= gcc 24a75f2e14SJerome Forissier 25b09cddcaSJerome Forissier# For convenience 26b09cddcaSJerome Forissierifdef CFLAGS 27b09cddcaSJerome ForissierCFLAGS32 ?= $(CFLAGS) 28b09cddcaSJerome ForissierCFLAGS64 ?= $(CFLAGS) 29b09cddcaSJerome Forissierendif 30b09cddcaSJerome Forissier 31120c43adSJerome Forissier# Compiler warning level. 32120c43adSJerome Forissier# Supported values: undefined, 1, 2 and 3. 3 gives more warnings. 33b0104773SPascal BrandWARNS ?= 3 34b0104773SPascal Brand 35b0104773SPascal Brand# Define NOWERROR=1 so that warnings are not treated as errors 36b0104773SPascal Brand# NOWERROR=1 37b0104773SPascal Brand 38b0104773SPascal Brand# Define DEBUG=1 to compile with -g option 39b0104773SPascal Brand# DEBUG=1 40b0104773SPascal Brand 41b0104773SPascal Brand# If 1, debug mode of the tee firmware (CPU restart, Core Status) 4231908aeaSPascal BrandCFG_TEE_CORE_DEBUG ?= 0 43b0104773SPascal Brand 44e0042c88SPascal Brand# Max level of the tee core traces. 0 means disable, 4 is max. 45e0042c88SPascal Brand# Supported values: 0 (no traces) to 4 (all traces) 46b0104773SPascal Brand# If CFG_TEE_DRV_DEBUGFS is set, the level of traces to print can be 47b0104773SPascal Brand# dynamically changes via debugfs in the range 1 => CFG_TEE_CORE_LOG_LEVEL 48e0042c88SPascal BrandCFG_TEE_CORE_LOG_LEVEL ?= 1 49b0104773SPascal Brand 50b0104773SPascal Brand# TA and TEECore log level 51e0042c88SPascal Brand# Supported values: 0 (no traces) to 4 (all traces) 52b0104773SPascal Brand# If CFG_TEE_DRV_DEBUGFS is set, the level of traces to print can be 53b0104773SPascal Brand# dynamically changes via debugfs in the range 1 => CFG_TEE_TA_LOG_LEVEL 54e0042c88SPascal BrandCFG_TEE_TA_LOG_LEVEL ?= 1 55b0104773SPascal Brand 567c876f12SPascal Brand# TA enablement 577c876f12SPascal Brand# When defined to "y", TA traces are output according to 587c876f12SPascal Brand# CFG_TEE_TA_LOG_LEVEL. Otherwise, they are not output at all 597c876f12SPascal BrandCFG_TEE_CORE_TA_TRACE ?= y 60b0104773SPascal Brand 6194e8a4fcSJens Wiklander# Define TEE_Panic as a macro to help debugging panics caused by calls to 6294e8a4fcSJens Wiklander# TEE_Panic. This flag can have a different value when later compiling the 6394e8a4fcSJens Wiklander# TA 6494e8a4fcSJens WiklanderCFG_TEE_PANIC_DEBUG ?= y 6594e8a4fcSJens Wiklander 66120c43adSJerome Forissier# If 1, enable debug features in TA memory allocation. 67120c43adSJerome Forissier# Debug features include check of buffer overflow, statistics, mark/check heap 68120c43adSJerome Forissier# feature. 69b0104773SPascal BrandCFG_TEE_CORE_USER_MEM_DEBUG ?= 1 707018ae01SSY Chiu 710fcbddd4SSY Chiu# If y, enable memory leak detection feature in bget memory allocator. 720fcbddd4SSY ChiuCFG_TEE_CORE_MALLOC_DEBUG ?= n 730fcbddd4SSY ChiuCFG_TEE_TA_MALLOC_DEBUG ?= n 740fcbddd4SSY Chiu 75120c43adSJerome Forissier# PRNG configuration 767018ae01SSY Chiu# If CFG_WITH_SOFTWARE_PRNG is enabled, crypto provider provided 777018ae01SSY Chiu# software PRNG implementation is used. 787018ae01SSY Chiu# Otherwise, you need to implement hw_get_random_byte() for your platform 797018ae01SSY ChiuCFG_WITH_SOFTWARE_PRNG ?= y 80120c43adSJerome Forissier 81120c43adSJerome Forissier# Number of threads 82120c43adSJerome ForissierCFG_NUM_THREADS ?= 2 83ab35d7adSCedric Chaumont 84ab35d7adSCedric Chaumont# API implementation version 85ab35d7adSCedric ChaumontCFG_TEE_API_VERSION ?= GPD-1.1-dev 86ab35d7adSCedric Chaumont 87ab35d7adSCedric Chaumont# Implementation description (implementation-dependent) 88ab35d7adSCedric ChaumontCFG_TEE_IMPL_DESCR ?= OPTEE 89ab35d7adSCedric Chaumont 90ab35d7adSCedric Chaumont# Trusted OS implementation version 914bf425c1SJens WiklanderTEE_IMPL_VERSION ?= $(shell git describe --always --dirty=-dev 2>/dev/null || echo Unknown) 92*35c507f2SJerome Forissier# The following values are not extracted from the "git describe" output because 93*35c507f2SJerome Forissier# we might be outside of a Git environment, or the tree may have been cloned 94*35c507f2SJerome Forissier# with limited depth not including any tag, so there is really no guarantee 95*35c507f2SJerome Forissier# that TEE_IMPL_VERSION contains the major and minor revision numbers. 96*35c507f2SJerome ForissierCFG_OPTEE_REVISION_MAJOR ?= 1 97*35c507f2SJerome ForissierCFG_OPTEE_REVISION_MINOR ?= 1 98ab35d7adSCedric Chaumont 99ab35d7adSCedric Chaumont# Trusted OS implementation manufacturer name 100ab35d7adSCedric ChaumontCFG_TEE_MANUFACTURER ?= LINARO 101ab35d7adSCedric Chaumont 102ab35d7adSCedric Chaumont# Trusted firmware version 103ab35d7adSCedric ChaumontCFG_TEE_FW_IMPL_VERSION ?= FW_IMPL_UNDEF 104ab35d7adSCedric Chaumont 105ab35d7adSCedric Chaumont# Trusted OS implementation manufacturer name 106ab35d7adSCedric ChaumontCFG_TEE_FW_MANUFACTURER ?= FW_MAN_UNDEF 107ab35d7adSCedric Chaumont 108a8224611SJames Kung# Encrypted File System Support 10988e6e089SJerome Forissier# Applies to both the default and the RPMB filesystems 110c7856574SJames KungCFG_ENC_FS ?= y 111bc420748SJens Wiklander 1122ab7da0fSSY Chiu# File System Block Cache Support 11388e6e089SJerome Forissier# Does not apply to the RPMB FS 1142ab7da0fSSY ChiuCFG_FS_BLOCK_CACHE ?= n 1152ab7da0fSSY Chiu 11688e6e089SJerome Forissier# RPMB file system support 11788e6e089SJerome Forissier# When enabled, replaces the default (REE-based) FS 11888e6e089SJerome ForissierCFG_RPMB_FS ?= n 11988e6e089SJerome Forissier 12088e6e089SJerome Forissier# Device identifier used when CFG_RPMB_FS = y. 12188e6e089SJerome Forissier# The exact meaning of this value is platform-dependent. On Linux, the 12288e6e089SJerome Forissier# tee-supplicant process will open /dev/mmcblk<id>rpmb 12388e6e089SJerome ForissierCFG_RPMB_FS_DEV_ID ?= 0 12488e6e089SJerome Forissier 125bc420748SJens Wiklander# Embed public part of this key in OP-TEE OS 126bc420748SJens WiklanderTA_SIGN_KEY ?= keys/default_ta.pem 127c4553de7SJerome Forissier 128c4553de7SJerome Forissier# Include lib/libutils/isoc in the build? Most platforms need this, but some 129c4553de7SJerome Forissier# may not because they obtain the isoc functions from elsewhere 130c4553de7SJerome ForissierCFG_LIBUTILS_WITH_ISOC ?= y 131fce4cfa1SJens Wiklander 1320de9a5fbSJens Wiklander# Enables floating point support for user TAs 1330de9a5fbSJens Wiklander# ARM32: EABI defines both a soft-float ABI and a hard-float ABI, 1340de9a5fbSJens Wiklander# hard-float is basically a super set of soft-float. Hard-float 1350de9a5fbSJens Wiklander# requires all the support routines provided for soft-float, but the 1360de9a5fbSJens Wiklander# compiler may choose to optimize to not use some of them and use 1370de9a5fbSJens Wiklander# the floating-point registers instead. 1380de9a5fbSJens Wiklander# ARM64: EABI doesn't define a soft-float ABI, everything is hard-float (or 1390de9a5fbSJens Wiklander# nothing with ` -mgeneral-regs-only`) 1400de9a5fbSJens Wiklander# With CFG_TA_FLOAT_SUPPORT enabled TA code is free use floating point types 1410de9a5fbSJens WiklanderCFG_TA_FLOAT_SUPPORT ?= y 142923c1f34SJens Wiklander 143923c1f34SJens Wiklander# Enable stack unwinding for aborts from kernel mode if CFG_TEE_CORE_DEBUG 144923c1f34SJens Wiklander# is enabled 145923c1f34SJens Wiklanderifeq ($(CFG_TEE_CORE_DEBUG),1) 146923c1f34SJens WiklanderCFG_CORE_UNWIND ?= y 147923c1f34SJens Wiklanderendif 1486fbac37eSJens Wiklander 1496fbac37eSJens Wiklander# Enable support for dynamically loaded user TAs 1506fbac37eSJens WiklanderCFG_WITH_USER_TA ?= y 151