thermosphere: properly implement guest timer stuff

This commit is contained in:
TuxSH
2020-01-12 21:51:50 +00:00
parent 388c245ce4
commit 68a1ce6dd2
12 changed files with 180 additions and 53 deletions

View File

@@ -39,6 +39,8 @@ _startCommon:
msr daifset, 0b1111
msr spsel, #1
mrs x20, cntpct_el0
// Set sctlr_el2 ASAP to disable mmu/caching if not already done.
mov x1, #0x0838
movk x1, #0x30C5,lsl #16
@@ -69,12 +71,13 @@ _startCommon:
// Save x18, reserve space for exception frame
stp x18, xzr, [sp, #-0x10]!
sub sp, sp, #0x120
sub sp, sp, #0x140
dsb sy
isb
mov x0, sp
mov x1, x20
bl thermosphereMain
dsb sy