summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform/ring0
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-01-21 13:56:48 -0800
committergVisor bot <gvisor-bot@google.com>2020-01-21 13:56:48 -0800
commit16694ad2bad01a370d470ec24ff82d819790696c (patch)
tree5ed1ad77d5a43e8e9fbb393badcfa9cb7b41b505 /pkg/sentry/platform/ring0
parentd46c397a1cd38f1e2aa5c864c1bb8594fb87bb63 (diff)
parent3e0062480650ded910ef6bc80883668da89e2ef8 (diff)
Merge pull request #1274 from lubinszARM:pr_ring0_4
PiperOrigin-RevId: 290811598
Diffstat (limited to 'pkg/sentry/platform/ring0')
-rw-r--r--pkg/sentry/platform/ring0/entry_arm64.s10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/sentry/platform/ring0/entry_arm64.s b/pkg/sentry/platform/ring0/entry_arm64.s
index da07815ff..22af98a18 100644
--- a/pkg/sentry/platform/ring0/entry_arm64.s
+++ b/pkg/sentry/platform/ring0/entry_arm64.s
@@ -544,6 +544,16 @@ TEXT ·El0_sync(SB),NOSPLIT,$0
B el0_invalid
el0_svc:
+ WORD $0xd538d092 //MRS TPIDR_EL1, R18
+
+ MOVD $0, CPU_ERROR_CODE(RSV_REG) // Clear error code.
+
+ MOVD $1, R3
+ MOVD R3, CPU_ERROR_TYPE(RSV_REG) // Set error type to user.
+
+ MOVD $Syscall, R3
+ MOVD R3, CPU_VECTOR_CODE(RSV_REG)
+
B ·Halt(SB)
el0_da: