xref: /optee_os/core/include/kernel/tee_time.h (revision fbe66cf83199aa6a2aca9f93384cf1ad9185a5f6)
11bb92983SJerome Forissier /* SPDX-License-Identifier: BSD-2-Clause */
2b0104773SPascal Brand /*
3b0104773SPascal Brand  * Copyright (c) 2014, STMicroelectronics International N.V.
4b0104773SPascal Brand  */
5b0104773SPascal Brand 
6*fbe66cf8SEtienne Carriere #ifndef __KERNEL_TEE_TIME_H
7*fbe66cf8SEtienne Carriere #define __KERNEL_TEE_TIME_H
8b0104773SPascal Brand 
9b0104773SPascal Brand #include "tee_api_types.h"
10b0104773SPascal Brand 
11b0104773SPascal Brand TEE_Result tee_time_get_sys_time(TEE_Time *time);
122cdaaacbSJerome Forissier uint32_t tee_time_get_sys_time_protection_level(void);
13b0104773SPascal Brand TEE_Result tee_time_get_ta_time(const TEE_UUID *uuid, TEE_Time *time);
14b0104773SPascal Brand TEE_Result tee_time_get_ree_time(TEE_Time *time);
15b0104773SPascal Brand TEE_Result tee_time_set_ta_time(const TEE_UUID *uuid, const TEE_Time *time);
16889dbbbfSVictor Chong /* Releases CPU through OP-TEE RPC which switches to Normal World */
17d1aea08fSSY Chiu void tee_time_wait(uint32_t milliseconds_delay);
18889dbbbfSVictor Chong /* Busy wait */
19889dbbbfSVictor Chong void tee_time_busy_wait(uint32_t milliseconds_delay);
20b0104773SPascal Brand 
21b0104773SPascal Brand #endif
22