Add OP-TEE GetSystemTime and revise LVBS platform Instant#987
Open
sangho2 wants to merge 1 commit into
Open
Conversation
GetSystemTime and revise LVBS platform Instant
|
🤖 SemverChecks 🤖 Click for details |
wdcui
reviewed
Jul 1, 2026
| } | ||
| } | ||
| // Persistent time was never set by this TA; report it per the spec. | ||
| TeeTimeCategory::TaPersistent => return Err(TeeResult::TimeNotSet), |
Member
There was a problem hiding this comment.
What syscall is for a TA to set its persistent time?
Contributor
Author
There was a problem hiding this comment.
There is set_ta_time that our OP-TEE shim doesn't support. Basically, this function stores an offset value in persistent storage. TeeTimeCategory::TaPersistent is expected to use this stored value.
wdcui
reviewed
Jul 1, 2026
| Err(err) => { | ||
| // TODO: this seems like the wrong kind of error for OPTEE. | ||
| ctx.rax = (err.as_neg() as isize).reinterpret_as_unsigned(); | ||
| ctx.rax = TeeResult::from(err) as usize; |
Member
There was a problem hiding this comment.
The fix in this line is not specific to this PR?
Contributor
Author
There was a problem hiding this comment.
True. we can separate this if necessary.
wdcui
approved these changes
Jul 1, 2026
wdcui
left a comment
Member
There was a problem hiding this comment.
LGTM. I left some comments for your reference. Thanks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds OP-TEE
GetSystemTimeand revises the LVBS platform'sInstant. The OP-TEE system time is per-instance monotonic time. Also, it now uses Hyper-V's partition reference-counter tick that is a monotonic, frequency-invariant counter.