summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/sgx/test_encl_bootstrap.S
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/sgx/test_encl_bootstrap.S')
-rw-r--r--tools/testing/selftests/sgx/test_encl_bootstrap.S6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/sgx/test_encl_bootstrap.S b/tools/testing/selftests/sgx/test_encl_bootstrap.S
index 82fb0dfcbd23..03ae0f57e29d 100644
--- a/tools/testing/selftests/sgx/test_encl_bootstrap.S
+++ b/tools/testing/selftests/sgx/test_encl_bootstrap.S
@@ -45,6 +45,12 @@ encl_entry:
# TCS #2. By adding the value of encl_stack to it, we get
# the absolute address for the stack.
lea (encl_stack)(%rbx), %rax
+ jmp encl_entry_core
+encl_dyn_entry:
+ # Entry point for dynamically created TCS page expected to follow
+ # its stack directly.
+ lea -1(%rbx), %rax
+encl_entry_core:
xchg %rsp, %rax
push %rax