aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Kung <kong1191@gmail.com>2015-01-07 00:09:03 +0800
committerJames Kung <kong1191@gmail.com>2015-02-26 15:59:16 +0800
commit4462386ed7d8178faf39b9af6520a64008debc82 (patch)
tree78958e18883f1162a2d2fbc52401edc56d8fd137
parent7eaee2d7837a4565fd745cd0993c9c67608a6c13 (diff)
OP-TEE BenchmarkHEADmaster
- Print CNTVCT value for smc call performance measurement - Enable/disable trace performance by CFG_TEE_TRACE_PERFORMANCE option in mk/config.mk - Fix compile warning message issue that will happen when compiling libutee and change log level to 0 - Add new tee implemented property "ext.tee.arm.genericTimerInfo" to get generic timer info for secure system call perforamnce analysis - Rename tee_time_arm_cntpct.c to tee_time_arm_generic_timer.c - Update .travis.yml to test CFG_TEE_TRACE_PERFORMANCE=y and CFG_TEE_TA_LOG_LEVEL=0 - Add new crypto abstraction API for base64 encode/decode function Signed-off-by: James Kung <kong1191@gmail.com> Tested-by: James Kung <kong1191@gmail.com> (QEMU, FVP)
-rw-r--r--.travis.yml6
-rw-r--r--core/arch/arm32/include/arm32.h30
-rw-r--r--core/arch/arm32/kernel/sub.mk8
-rw-r--r--core/arch/arm32/kernel/tee_time.c13
-rw-r--r--core/arch/arm32/kernel/tee_time_arm_generic_timer.c (renamed from core/arch/arm32/kernel/tee_time_arm_cntpct.c)12
-rw-r--r--core/arch/arm32/plat-stm/conf.mk4
-rw-r--r--core/arch/arm32/plat-sunxi/conf.mk2
-rw-r--r--core/arch/arm32/plat-vexpress/conf.mk2
-rw-r--r--core/arch/arm32/tee/entry.c25
-rw-r--r--core/include/kernel/tee_time.h2
-rw-r--r--core/include/tee/tee_cryp_provider.h11
-rw-r--r--core/lib/libtomcrypt/src/tee_ltc_provider.c51
-rw-r--r--core/lib/libtomcrypt/sub.mk4
-rw-r--r--core/tee/tee_svc.c24
-rw-r--r--lib/libutee/assert.c3
-rw-r--r--lib/libutee/include/utee_types.h8
-rw-r--r--lib/libutee/tee_api_property.c9
-rw-r--r--mk/config.mk5
18 files changed, 199 insertions, 20 deletions
diff --git a/.travis.yml b/.travis.yml
index 37423ea..a265fc6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -40,11 +40,17 @@ script:
- PLATFORM=vexpress-fvp make -j8 all
- CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1 PLATFORM=vexpress PLATFORM_FLAVOR=fvp make -j8 all
- CFG_TEE_CORE_LOG_LEVEL=0 DEBUG=0 PLATFORM=vexpress PLATFORM_FLAVOR=fvp make -j8 all
+ - CFG_TEE_TA_LOG_LEVEL=0 PLATFORM=vexpress PLATFORM_FLAVOR=fvp make -j8 all
+ - CFG_TEE_TRACE_PERFORMANCE=y PLATFORM=vexpress PLATFORM_FLAVOR=fvp make -j8 all
+ - CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_TRACE_PERFORMANCE=y PLATFORM=vexpress PLATFORM_FLAVOR=fvp make -j8 all
# QEMU
- PLATFORM=vexpress-qemu make -j8 all
- CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1 PLATFORM=vexpress PLATFORM_FLAVOR=qemu make -j8 all
- CFG_TEE_CORE_LOG_LEVEL=0 DEBUG=0 PLATFORM=vexpress PLATFORM_FLAVOR=qemu make -j8 all
+ - CFG_TEE_TA_LOG_LEVEL=0 PLATFORM=vexpress PLATFORM_FLAVOR=qemu make -j8 all
+ - CFG_TEE_TRACE_PERFORMANCE=y PLATFORM=vexpress PLATFORM_FLAVOR=qemu make -j8 all
+ - CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_TRACE_PERFORMANCE=y PLATFORM=vexpress PLATFORM_FLAVOR=qemu make -j8 all
# QEMU-virt
- PLATFORM=vexpress-qemu_virt make -j8 all
diff --git a/core/arch/arm32/include/arm32.h b/core/arch/arm32/include/arm32.h
index d6a12ac..273d610 100644
--- a/core/arch/arm32/include/arm32.h
+++ b/core/arch/arm32/include/arm32.h
@@ -491,21 +491,39 @@ static inline void write_nsacr(uint32_t nsacr)
);
}
+static inline uint64_t read_cntvct(void)
+{
+ uint64_t cntvct;
+
+ asm volatile ("mrrc p15, 1, %Q[cntvct], %R[cntvct], c14"
+ : [cntvct] "=r" (cntvct)
+ );
+
+ return cntvct;
+}
+
static inline uint64_t read_cntpct(void)
{
- uint64_t val;
+ uint64_t cntpct;
- asm volatile("mrrc p15, 0, %Q0, %R0, c14" : "=r" (val));
- return val;
+ asm volatile ("mrrc p15, 0, %Q[cntpct], %R[cntpct], c14"
+ : [cntpct] "=r" (cntpct)
+ );
+
+ return cntpct;
}
static inline uint32_t read_cntfrq(void)
{
- uint32_t frq;
+ uint32_t cntfrq;
- asm volatile("mrc p15, 0, %0, c14, c0, 0" : "=r" (frq));
- return frq;
+ asm volatile ("mrc p15, 0, %[cntfrq], c14, c0, 0"
+ : [cntfrq] "=r" (cntfrq)
+ );
+
+ return cntfrq;
}
+
#endif /*ASM*/
#endif /*ARM32_H*/
diff --git a/core/arch/arm32/kernel/sub.mk b/core/arch/arm32/kernel/sub.mk
index 7f3190e..07258fc 100644
--- a/core/arch/arm32/kernel/sub.mk
+++ b/core/arch/arm32/kernel/sub.mk
@@ -1,14 +1,14 @@
srcs-y += tee_ta_manager.c
srcs-y += tee_time.c
-srcs-$(WITH_SECURE_TIME_SOURCE_CNTPCT) += tee_time_arm_cntpct.c
-srcs-$(WITH_SECURE_TIME_SOURCE_RTT) += tee_time_rtt.c
-srcs-$(WITH_SECURE_TIME_SOURCE_REE) += tee_time_ree.c
+srcs-$(CFG_SECURE_TIME_SOURCE_ARM_GENERIC_TIMER) += tee_time_arm_generic_timer.c
+srcs-$(CFG_SECURE_TIME_SOURCE_RTT) += tee_time_rtt.c
+srcs-$(CFG_SECURE_TIME_SOURCE_REE) += tee_time_ree.c
srcs-y += tee_time_unpg.c
srcs-y += tz_proc.S
srcs-y += tz_ssvce.S
-srcs-$(WITH_PL310) += tz_ssvce_pl310.S
+srcs-$(CFG_WITH_PL310) += tz_ssvce_pl310.S
srcs-y += tee_l2cc_mutex.c
srcs-y += thread_asm.S
diff --git a/core/arch/arm32/kernel/tee_time.c b/core/arch/arm32/kernel/tee_time.c
index e343bda..1005736 100644
--- a/core/arch/arm32/kernel/tee_time.c
+++ b/core/arch/arm32/kernel/tee_time.c
@@ -34,6 +34,7 @@
#include <sm/teesmc.h>
#include <kernel/tee_rpc.h>
#include <mm/core_mmu.h>
+#include <arm32.h>
struct time_source _time_source;
@@ -146,3 +147,15 @@ exit:
tee_ta_set_current_session(sess);
return res;
}
+
+int tee_time_get_generic_timer_info(struct generic_timer_info *timer_info)
+{
+ if (timer_info == NULL)
+ return -1;
+
+ timer_info->counter_frequency = read_cntfrq();
+ timer_info->counter_value = read_cntvct();
+
+ return 0;
+}
+
diff --git a/core/arch/arm32/kernel/tee_time_arm_cntpct.c b/core/arch/arm32/kernel/tee_time_arm_generic_timer.c
index 4f6aef3..be9df40 100644
--- a/core/arch/arm32/kernel/tee_time_arm_cntpct.c
+++ b/core/arch/arm32/kernel/tee_time_arm_generic_timer.c
@@ -31,6 +31,7 @@
#include <kernel/time_source.h>
#include <mm/core_mmu.h>
#include <utee_defines.h>
+#include <arm32.h>
#include <assert.h>
#include <stdint.h>
@@ -40,13 +41,14 @@
static uint32_t do_div(uint64_t *dividend, uint32_t divisor)
{
mpa_word_t remainder = 0, n0, n1;
+
n0 = (*dividend) & UINT_MAX;
n1 = ((*dividend) >> WORD_SIZE) & UINT_MAX;
*dividend = __mpa_div_dword(n0, n1, divisor, &remainder);
return remainder;
}
-static TEE_Result arm_cntpct_get_sys_time(TEE_Time *time)
+static TEE_Result arm_generic_timer_get_sys_time(TEE_Time *time)
{
uint64_t cntpct = read_cntpct();
uint32_t cntfrq = read_cntfrq();
@@ -60,9 +62,9 @@ static TEE_Result arm_cntpct_get_sys_time(TEE_Time *time)
return TEE_SUCCESS;
}
-static const struct time_source arm_cntpct_time_source = {
- .name = "arm cntpct",
- .get_sys_time = arm_cntpct_get_sys_time,
+static const struct time_source arm_generic_timer_time_source = {
+ .name = "arm generic timer",
+ .get_sys_time = arm_generic_timer_get_sys_time,
};
-REGISTER_TIME_SOURCE(arm_cntpct_time_source)
+REGISTER_TIME_SOURCE(arm_generic_timer_time_source)
diff --git a/core/arch/arm32/plat-stm/conf.mk b/core/arch/arm32/plat-stm/conf.mk
index 7453268..11c380c 100644
--- a/core/arch/arm32/plat-stm/conf.mk
+++ b/core/arch/arm32/plat-stm/conf.mk
@@ -12,8 +12,8 @@ core-platform-subdirs += \
$(addprefix $(arch-dir)/, kernel mm sm tee sta) $(platform-dir)
libutil_with_isoc := y
-WITH_PL310 := y
-WITH_SECURE_TIME_SOURCE_REE := y
+CFG_WITH_PL310 := y
+CFG_SECURE_TIME_SOURCE_REE := y
CFG_CACHE_API := y
include mk/config.mk
diff --git a/core/arch/arm32/plat-sunxi/conf.mk b/core/arch/arm32/plat-sunxi/conf.mk
index 7b94bab..e8a7fc4 100644
--- a/core/arch/arm32/plat-sunxi/conf.mk
+++ b/core/arch/arm32/plat-sunxi/conf.mk
@@ -19,7 +19,7 @@ core-platform-cppflags += \
endif
libutil_with_isoc := y
-WITH_SECURE_TIME_SOURCE_CNTPCT := y
+CFG_SECURE_TIME_SOURCE_ARM_GENERIC_TIMER := y
include mk/config.mk
diff --git a/core/arch/arm32/plat-vexpress/conf.mk b/core/arch/arm32/plat-vexpress/conf.mk
index 94e1703..2bbdb7d 100644
--- a/core/arch/arm32/plat-vexpress/conf.mk
+++ b/core/arch/arm32/plat-vexpress/conf.mk
@@ -21,7 +21,7 @@ CFG_PM_DEBUG ?= n
libutil_with_isoc := y
libtomcrypt_with_optimize_size := y
-WITH_SECURE_TIME_SOURCE_CNTPCT := y
+CFG_SECURE_TIME_SOURCE_ARM_GENERIC_TIMER := y
WITH_UART_DRV := y
WITH_GIC_DRV := y
CFG_HWSUPP_MEM_PERM_PXN := y
diff --git a/core/arch/arm32/tee/entry.c b/core/arch/arm32/tee/entry.c
index 59ce594..e3ed6dd 100644
--- a/core/arch/arm32/tee/entry.c
+++ b/core/arch/arm32/tee/entry.c
@@ -317,6 +317,27 @@ static void entry_cancel(struct thread_smc_args *args,
}
+#ifdef CFG_TEE_TRACE_PERFORMANCE
+
+static inline void print_cntvct_with_message(uint32_t cmd __unused,
+ const char *msg __unused)
+{
+ uint32_t cntvct_low, cntvct_high;
+
+ __asm__ volatile("mrrc p15, 1, %0, %1, c14"
+ : "=r"(cntvct_low), "=r"(cntvct_high));
+
+ MSG("%s, cmd=%d, cntvct=0x%x%08x", msg, cmd, cntvct_high, cntvct_low);
+}
+
+#else
+
+static inline void print_cntvct_with_message(uint32_t cmd __unused,
+ const char *msg __unused)
+{
+}
+
+#endif
static void tee_entry_call_with_arg(struct thread_smc_args *args)
{
@@ -351,6 +372,8 @@ static void tee_entry_call_with_arg(struct thread_smc_args *args)
}
if (args->a0 == TEESMC32_CALL_WITH_ARG) {
+ print_cntvct_with_message(arg32->cmd,
+ "TEECore: receiving smc call");
switch (arg32->cmd) {
case TEESMC_CMD_OPEN_SESSION:
entry_open_session(args, arg32, num_params);
@@ -368,6 +391,8 @@ static void tee_entry_call_with_arg(struct thread_smc_args *args)
EMSG("Unknown cmd 0x%x\n", arg32->cmd);
args->a0 = TEESMC_RETURN_EBADCMD;
}
+ print_cntvct_with_message(arg32->cmd,
+ "TEECore: finish smc call");
} else {
EMSG("Unknown fastcall cmd 0x%x\n", arg32->cmd);
args->a0 = TEESMC_RETURN_EBADCMD;
diff --git a/core/include/kernel/tee_time.h b/core/include/kernel/tee_time.h
index 2045620..0be2877 100644
--- a/core/include/kernel/tee_time.h
+++ b/core/include/kernel/tee_time.h
@@ -28,6 +28,7 @@
#ifndef TEE_TIME_H
#define TEE_TIME_H
+#include <utee_types.h>
#include "tee_api_types.h"
#define TEE_TIME_BOOT_TICKS_HZ 10UL
@@ -40,5 +41,6 @@ TEE_Result tee_time_get_ta_time(const TEE_UUID *uuid, TEE_Time *time);
TEE_Result tee_time_get_ree_time(TEE_Time *time);
TEE_Result tee_time_set_ta_time(const TEE_UUID *uuid, const TEE_Time *time);
void tee_time_wait(uint32_t milliseconds_delay);
+int tee_time_get_generic_timer_info(struct generic_timer_info *timer_info);
#endif
diff --git a/core/include/tee/tee_cryp_provider.h b/core/include/tee/tee_cryp_provider.h
index 0140d98..45b0b69 100644
--- a/core/include/tee/tee_cryp_provider.h
+++ b/core/include/tee/tee_cryp_provider.h
@@ -243,6 +243,16 @@ struct acipher_ops {
const uint8_t *sig, size_t sig_len);
};
+/* Encode/Decode operations */
+
+struct codec_ops {
+ TEE_Result (*base64_encode)(const uint8_t *in, uint32_t inlen,
+ uint8_t *out, uint32_t *outlen);
+ TEE_Result (*base64_decode)(const uint8_t *in, uint32_t inlen,
+ uint8_t *out, uint32_t *outlen);
+};
+
+
/* Cryptographic Provider API */
struct crypto_ops {
/* Human-readable provider name */
@@ -254,6 +264,7 @@ struct crypto_ops {
struct mac_ops mac;
struct authenc_ops authenc;
struct acipher_ops acipher;
+ struct codec_ops codec;
struct bignum_ops bignum;
};
diff --git a/core/lib/libtomcrypt/src/tee_ltc_provider.c b/core/lib/libtomcrypt/src/tee_ltc_provider.c
index 58fa7a0..bca29d3 100644
--- a/core/lib/libtomcrypt/src/tee_ltc_provider.c
+++ b/core/lib/libtomcrypt/src/tee_ltc_provider.c
@@ -2232,6 +2232,49 @@ static void authenc_final(void *ctx, uint32_t algo)
}
#endif /* _CFG_CRYPTO_WITH_AUTHENC */
+/******************************************************************************
+ * ENCODE/DECODE functions
+ ******************************************************************************/
+
+#if defined(_CFG_CRYPTO_WITH_CODEC)
+static TEE_Result base64_encode_wrapper(const uint8_t *in, uint32_t inlen,
+ uint8_t *out, uint32_t *outlen)
+{
+ TEE_Result res = TEE_SUCCESS;
+ int ret;
+
+ ret = base64_encode(in, (unsigned long)inlen,
+ out, (unsigned long *)outlen);
+ if (ret != CRYPT_OK) {
+ if (ret == CRYPT_BUFFER_OVERFLOW)
+ res = TEE_ERROR_SHORT_BUFFER;
+ else
+ res = TEE_ERROR_GENERIC;
+ }
+
+ return res;
+}
+
+static TEE_Result base64_decode_wrapper(const uint8_t *in, uint32_t inlen,
+ uint8_t *out, uint32_t *outlen)
+{
+ TEE_Result res = TEE_SUCCESS;
+ int ret;
+
+ ret = base64_decode(in, (unsigned long)inlen,
+ out, (unsigned long *)outlen);
+ if (ret != CRYPT_OK) {
+ if (ret == CRYPT_BUFFER_OVERFLOW)
+ res = TEE_ERROR_SHORT_BUFFER;
+ else if (ret == CRYPT_INVALID_PACKET)
+ res = TEE_ERROR_BAD_FORMAT;
+ else
+ res = TEE_ERROR_GENERIC;
+ }
+
+ return res;
+}
+#endif /* _CFG_CRYPTO_WITH_CODEC */
static TEE_Result tee_ltc_init(void)
{
@@ -2281,6 +2324,14 @@ struct crypto_ops crypto_ops = {
.update_payload = authenc_update_payload,
},
#endif
+#if defined(_CFG_CRYPTO_WITH_CODEC)
+ .codec = {
+#if defined(CFG_CRYPTO_BASE64)
+ .base64_encode = base64_encode_wrapper,
+ .base64_decode = base64_decode_wrapper,
+#endif
+ },
+#endif
#if defined(_CFG_CRYPTO_WITH_ACIPHER)
.acipher = {
#if defined(CFG_CRYPTO_RSA)
diff --git a/core/lib/libtomcrypt/sub.mk b/core/lib/libtomcrypt/sub.mk
index 1754f9a..0287945 100644
--- a/core/lib/libtomcrypt/sub.mk
+++ b/core/lib/libtomcrypt/sub.mk
@@ -35,6 +35,9 @@ CFG_CRYPTO_DH ?= y
CFG_CRYPTO_CCM ?= y
CFG_CRYPTO_GCM ?= y
+# Encode/Decode
+CFG_CRYPTO_BASE64 ?= y
+
endif
ifeq ($(CFG_WITH_PAGER),y)
@@ -77,6 +80,7 @@ _CFG_CRYPTO_WITH_HASH := $(call cryp-one-enabled, MD5 SHA1 SHA224 SHA256 SHA384
_CFG_CRYPTO_WITH_MAC := $(call cryp-one-enabled, HMAC CMAC CBC_MAC)
_CFG_CRYPTO_WITH_CBC := $(call cryp-one-enabled, CBC CBC_MAC)
_CFG_CRYPTO_WITH_ASN1 := $(call cryp-one-enabled, RSA DSA)
+_CFG_CRYPTO_WITH_CODEC := $(call cryp-one-enabled, BASE64)
cppflags-lib-$(libtomcrypt_with_optimize_size) += -DLTC_SMALL_CODE -DLTC_NO_FAST
diff --git a/core/tee/tee_svc.c b/core/tee/tee_svc.c
index 93177d0..b321d85 100644
--- a/core/tee/tee_svc.c
+++ b/core/tee/tee_svc.c
@@ -33,6 +33,7 @@
#include <utee_types.h>
#include <tee/tee_svc.h>
#include <tee/tee_cryp_utl.h>
+#include <tee/tee_cryp_provider.h>
#include <mm/tee_mmu.h>
#include <mm/tee_mm.h>
#include <kernel/tee_rpc.h>
@@ -44,6 +45,8 @@
#include <kernel/trace_ta.h>
#include <kernel/chip_services.h>
+#define MAX_BASE64_BUFFER_SIZE 120
+
#if (CFG_TRACE_LEVEL == TRACE_FLOW)
void tee_svc_trace_syscall(int num)
{
@@ -120,6 +123,10 @@ TEE_Result tee_svc_sys_get_property(uint32_t prop, tee_uaddr_t buf, size_t blen)
static const uint32_t ta_time_prot_lvl = 100;
struct tee_ta_session *sess;
TEE_Result res;
+ uint8_t base64_buf[MAX_BASE64_BUFFER_SIZE];
+ uint32_t base64_buf_size = MAX_BASE64_BUFFER_SIZE;
+ struct generic_timer_info timer_info;
+ bool ret;
res = tee_ta_get_current_session(&sess);
if (res != TEE_SUCCESS)
@@ -194,6 +201,23 @@ TEE_Result tee_svc_sys_get_property(uint32_t prop, tee_uaddr_t buf, size_t blen)
&ta_time_prot_lvl,
sizeof(ta_time_prot_lvl));
+ case UTEE_PROP_TEE_GENERIC_TIMER_INFO:
+ if (blen < sizeof(timer_info))
+ return TEE_ERROR_SHORT_BUFFER;
+
+ ret = tee_time_get_generic_timer_info(&timer_info);
+ if (ret != 0)
+ return TEE_ERROR_BAD_PARAMETERS;
+
+ res = crypto_ops.codec.base64_encode((uint8_t *)&timer_info,
+ sizeof(timer_info), base64_buf, &base64_buf_size);
+
+ if (ret != 0)
+ return TEE_ERROR_SHORT_BUFFER;
+ else
+ return tee_svc_copy_to_user(sess, (void *)buf,
+ base64_buf, base64_buf_size);
+
case UTEE_PROP_CLIENT_ID:
if (blen < sizeof(TEE_Identity))
return TEE_ERROR_SHORT_BUFFER;
diff --git a/lib/libutee/assert.c b/lib/libutee/assert.c
index 0888f73..60a321f 100644
--- a/lib/libutee/assert.c
+++ b/lib/libutee/assert.c
@@ -28,7 +28,8 @@
#include <tee_internal_api.h>
#include <tee_internal_api_extensions.h>
-void _assert_log(const char *expr, const char *file, int line)
+void _assert_log(const char *expr __unused, const char *file __unused,
+ int line __unused)
{
EMSG("Assertion '%s' failed at %s:%d", expr, file, line);
}
diff --git a/lib/libutee/include/utee_types.h b/lib/libutee/include/utee_types.h
index 315d15b..ab8d41e 100644
--- a/lib/libutee/include/utee_types.h
+++ b/lib/libutee/include/utee_types.h
@@ -28,12 +28,15 @@
#ifndef UTEE_TYPES_H
#define UTEE_TYPES_H
+#include <stdint.h>
+
enum utee_property {
UTEE_PROP_TEE_API_VERSION = 0,
UTEE_PROP_TEE_DESCR,
UTEE_PROP_TEE_DEV_ID,
UTEE_PROP_TEE_SYS_TIME_PROT_LEVEL,
UTEE_PROP_TEE_TA_TIME_PROT_LEVEL,
+ UTEE_PROP_TEE_GENERIC_TIMER_INFO,
UTEE_PROP_CLIENT_ID,
UTEE_PROP_TA_APP_ID,
};
@@ -55,4 +58,9 @@ enum utee_cache_operation {
TEE_CACHEINVALIDATE,
};
+struct generic_timer_info {
+ uint32_t counter_frequency;
+ uint64_t counter_value;
+};
+
#endif /* UTEE_TYPES_H */
diff --git a/lib/libutee/tee_api_property.c b/lib/libutee/tee_api_property.c
index 2ede30d..1560924 100644
--- a/lib/libutee/tee_api_property.c
+++ b/lib/libutee/tee_api_property.c
@@ -125,6 +125,13 @@ static TEE_Result propget_gpd_tee_arith_max_big_int_size(struct prop_value *pv)
return TEE_SUCCESS;
}
+static TEE_Result propget_ext_tee_generic_timer_info(struct prop_value *pv)
+{
+ pv->type = USER_TA_PROP_TYPE_BINARY_BLOCK;
+ return utee_get_property(UTEE_PROP_TEE_GENERIC_TIMER_INFO,
+ &pv->u.str_val, sizeof(pv->u.str_val));
+}
+
static const struct prop_set propset_current_ta[] = {
{"gpd.ta.appID", propget_gpd_ta_app_id},
};
@@ -148,6 +155,8 @@ static const struct prop_set propset_implementation[] = {
{"gpd.tee.TAPersistentTime.protectionLevel",
propget_gpd_tee_ta_time_protection_level},
{"gpd.tee.arith.maxBigIntSize", propget_gpd_tee_arith_max_big_int_size},
+ {"ext.tee.arm.genericTimerInfo",
+ propget_ext_tee_generic_timer_info},
};
static const size_t propset_implementation_len =
diff --git a/mk/config.mk b/mk/config.mk
index 8013c5a..758588d 100644
--- a/mk/config.mk
+++ b/mk/config.mk
@@ -32,3 +32,8 @@ CFG_TEE_TA_LOG_LEVEL?=1
# marck/check heap feature
# Enabling this could decrease efficiency
CFG_TEE_CORE_USER_MEM_DEBUG?=1
+
+# CFG_TEE_TRACE_PERFORMANCE
+# If 'y', TEECore will print CNTVCT (virtual counter) register values to console
+# after receiving SMC call and before returning to normal world
+CFG_TEE_TRACE_PERFORMANCE?=n