mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 12:21:18 +00:00
kern: use userspace access instructions to read from tlr
This commit is contained in:
parent
1f37fbed1d
commit
cf5895e04f
1 changed files with 4 additions and 2 deletions
|
@ -68,7 +68,8 @@ _ZN3ams4kern4arch5arm6412SvcHandler64Ev:
|
||||||
|
|
||||||
/* Check if our disable count allows us to call SVCs. */
|
/* Check if our disable count allows us to call SVCs. */
|
||||||
mrs x10, tpidrro_el0
|
mrs x10, tpidrro_el0
|
||||||
ldrh w10, [x10, #(THREAD_LOCAL_REGION_DISABLE_COUNT)]
|
add x10, x10, #(THREAD_LOCAL_REGION_DISABLE_COUNT)
|
||||||
|
ldtrh w10, [x10]
|
||||||
cbz w10, 1f
|
cbz w10, 1f
|
||||||
|
|
||||||
/* It might not, so check the stack params to see if we must not allow the SVC. */
|
/* It might not, so check the stack params to see if we must not allow the SVC. */
|
||||||
|
@ -352,7 +353,8 @@ _ZN3ams4kern4arch5arm6412SvcHandler32Ev:
|
||||||
|
|
||||||
/* Check if our disable count allows us to call SVCs. */
|
/* Check if our disable count allows us to call SVCs. */
|
||||||
mrs x10, tpidrro_el0
|
mrs x10, tpidrro_el0
|
||||||
ldrh w10, [x10, #(THREAD_LOCAL_REGION_DISABLE_COUNT)]
|
add x10, x10, #(THREAD_LOCAL_REGION_DISABLE_COUNT)
|
||||||
|
ldtrh w10, [x10]
|
||||||
cbz w10, 1f
|
cbz w10, 1f
|
||||||
|
|
||||||
/* It might not, so check the stack params to see if we must not allow the SVC. */
|
/* It might not, so check the stack params to see if we must not allow the SVC. */
|
||||||
|
|
Loading…
Reference in a new issue