kern: Kill KCoreLocalRegion

This commit is contained in:
Michael Scire authored and SciresM committed 2020-12-02 06:43:37 -08:00
1 parent 24d545701c
commit b0debd72a7
24 files changed
+165 -334

No files matched your search

@@ -29,6 +29,7 @@ namespace ams::kern::init {
u64 entrypoint;
u64 argument;
u64 setup_function;
u64 exception_stack;
};
}
@@ -220,16 +220,19 @@ namespace ams::kern::arch::arm64::cpu {
DataSynchronizationBarrier();
}
ALWAYS_INLINE uintptr_t GetCoreLocalRegionAddress() {
ALWAYS_INLINE uintptr_t GetCurrentThreadPointerValue() {
register uintptr_t x18 asm("x18");
__asm__ __volatile__("" : [x18]"=r"(x18));
return x18;
}
ALWAYS_INLINE void SetCoreLocalRegionAddress(uintptr_t value) {
ALWAYS_INLINE void SetCurrentThreadPointerValue(uintptr_t value) {
register uintptr_t x18 asm("x18") = value;
__asm__ __volatile__("":: [x18]"r"(x18));
SetTpidrEl1(value);
}
ALWAYS_INLINE void SetExceptionThreadStackTop(uintptr_t top) {
SetTpidrEl1(top);
}
ALWAYS_INLINE void SwitchThreadLocalRegion(uintptr_t tlr) {