Skip to content

[Draft] optee: share TA binaries through a global UUID map - #1142

Open
Praveen K Paladugu (praveen-pk) wants to merge 4 commits into
microsoft:mainfrom
praveen-pk:global_ta_uuid
Open

[Draft] optee: share TA binaries through a global UUID map#1142
Praveen K Paladugu (praveen-pk) wants to merge 4 commits into
microsoft:mainfrom
praveen-pk:global_ta_uuid

Conversation

@praveen-pk

Copy link
Copy Markdown
Contributor

Move the TA UUID-to-binary map out of individual shim instances so TA binaries can be registered once and reused across instances. This global map is required to support Dyanamically Loading TAs and using them across sessions.

Protect the map with a spin-based RwLock and expose shim methods for storing and retrieving TA binaries.

Register the LVBS runner's embedded TA during BSP initialization and resolve new TA instances through the shared map.

@praveen-pk Praveen K Paladugu (praveen-pk) changed the title optee: share TA binaries through a global UUID map [Draft] optee: share TA binaries through a global UUID map Aug 6, 2026

@sangho2 Sangho Lee (sangho2) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your effort! Yes, we should differentiate shim-global from runner-global. I left some comments/suggestions.

Comment thread litebox_runner_lvbs/src/lib.rs
Comment thread litebox_runner_lvbs/src/lib.rs Outdated
Comment thread litebox_runner_lvbs/src/lib.rs Outdated
Comment on lines -172 to -173
/// The TA UUID to binary map for TA loading.
ta_uuid_map: TaUuidMap,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping ta_uuid_map is here is a bit concerning because we can no longer use shim's self. Instead, we could store &'static TaUuidMap here. This is an outstanding PR's direction (#1127).

Comment thread litebox_shim_optee/src/lib.rs Outdated
Comment thread litebox_shim_optee/src/lib.rs Outdated
Comment thread litebox_shim_optee/src/lib.rs Outdated
Move the TA UUID-to-binary map out of individual shim instances
so TA binaries can be registered once and reused across instances.
This global map is required to support Dyanamically Loading TAs and
using them across sessions.

Protect the map with a spin-based RwLock and expose shim methods for
storing and retrieving TA binaries.

Register the LVBS runner's embedded TA during BSP initialization and
resolve new TA instances through the shared map.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Restore TA_BINARIES, to keep supporting mulitple embedded binaries

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
TaUuidMap is already sychronized with an interior RwLock. An Arc
wrapping adds un-necessary reference counting overhead.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
This drops the need for deep copy while getting a binary.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
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

Successfully merging this pull request may close these issues.

2 participants