Skip to content

Compatibility with the new SSA convention#33

Merged
fritzalder merged 33 commits intosancus-tee:masterfrom
fritzalder:irq_ssa
Oct 8, 2021
Merged

Compatibility with the new SSA convention#33
fritzalder merged 33 commits intosancus-tee:masterfrom
fritzalder:irq_ssa

Conversation

@fritzalder
Copy link
Copy Markdown
Member

These are small changes in the linker and the sm_entry and sm_exit stubs to make the linker compatible with the upcoming SSA changes (see sancus-tee/sancus-core#24 )

The linker contains SSA labels for:

  • ssa_base which is also ssa_pc
  • ssa_sp which is at ssa_base-2
  • ssa_end which is at ssa_base-28

Additionally, the linker also has a ssa_thread_id which lies above the SSA at ssa_base+2 for later compatibility when adding actual threading to the SSAs. This can be removed if you find it unclean to add this now.

Also, since we technically only need ssa_base from now on, we could refactor all stubs to recalculate the SP or PC etc from ssa_base on instead of keeping the ssa_sp and ssa_pc labels. But I am not sure whether sm_pc is needed elsewhere so I refrained from renaming it.

Loading
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.

SM entry/exit atomicity Sanity-check untrusted arguments in trusted sm_entry/exit stubs

2 participants