Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inquire about the operation of the TEE_GetSystemTime function #7157

Open
hyunsYang opened this issue Nov 29, 2024 · 3 comments
Open

inquire about the operation of the TEE_GetSystemTime function #7157

hyunsYang opened this issue Nov 29, 2024 · 3 comments

Comments

@hyunsYang
Copy link

hyunsYang commented Nov 29, 2024

I am testing TEE_GetSystemTime in a QEMU environment.

According to the TEE Intercore API Spec 1.3, it should be able to get the value "Filled with the number of seconds and milliseconds since midnight on January 1, 1970, UTC" when using the TEE_GetSystemTime function.

However, When I check the results of the TEE_GetSystemTime function, return the time as long as it has been since the boot.

What should I check to get the time as in the Spec?

@etienne-lms
Copy link
Contributor

To get an effective real-time origin, you need a platform that has some RTC capabilities and that is provisioned with a reliable time origin, either from non-secure world (protection level 100) or from secure world (protection level 1000).

@hyunsYang
Copy link
Author

Thank you for your response.
I have an additional question.
Do I need RTC capabilities to maintain persistence when using TEE_SetTAPersistentTime and TEE_GetTAPersistentTime?

@etienne-lms
Copy link
Contributor

Indeed you would need a RTC to have persistence of TAPersistentTime. But that is not enough. Current OP-TEE does not well manages persistent time, especially the TA ones. We would need to save a time reference per TA in the persistent secure storage area (likely when TEE_SetTAPersistentTime() is called) which is currently not implemented.
Contributions are welcome.

To reach TAPersistentTime level 1000, you need the RTC to be secure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants