mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-29 05:55:16 -04:00
kern: bump svc limit to 192 from 128
This commit is contained in:
parent
46612156f4
commit
4b9e7c7d27
10 changed files with 100 additions and 30 deletions
|
@ -13,6 +13,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <mesosphere/kern_select_assembly_offsets.h>
|
||||
|
||||
/* ams::kern::arch::arm64::EL1IrqExceptionHandler() */
|
||||
.section .text._ZN3ams4kern4arch5arm6422EL1IrqExceptionHandlerEv, "ax", %progbits
|
||||
|
@ -99,7 +100,7 @@ _ZN3ams4kern4arch5arm6422EL0IrqExceptionHandlerEv:
|
|||
str x23, [sp, #(8 * 34)]
|
||||
|
||||
/* Invoke KInterruptManager::HandleInterrupt(bool user_mode). */
|
||||
ldr x18, [sp, #(0x120 + 0x28)]
|
||||
ldr x18, [sp, #(0x120 + THREAD_STACK_PARAMETERS_CUR_THREAD)]
|
||||
mov x0, #1
|
||||
bl _ZN3ams4kern4arch5arm6417KInterruptManager15HandleInterruptEb
|
||||
|
||||
|
@ -196,7 +197,7 @@ _ZN3ams4kern4arch5arm6430EL0SynchronousExceptionHandlerEv:
|
|||
str x23, [sp, #(8 * 34)]
|
||||
|
||||
/* Call ams::kern::arch::arm64::HandleException(ams::kern::arch::arm64::KExceptionContext *) */
|
||||
ldr x18, [sp, #(0x120 + 0x28)]
|
||||
ldr x18, [sp, #(0x120 + THREAD_STACK_PARAMETERS_CUR_THREAD)]
|
||||
mov x0, sp
|
||||
bl _ZN3ams4kern4arch5arm6415HandleExceptionEPNS2_17KExceptionContextE
|
||||
|
||||
|
@ -440,7 +441,7 @@ _ZN3ams4kern4arch5arm6425FpuAccessExceptionHandlerEv:
|
|||
stp x20, x21, [sp, #(8 * 32)]
|
||||
|
||||
/* Invoke the FPU context switch handler. */
|
||||
ldr x18, [sp, #(0x120 + 0x28)]
|
||||
ldr x18, [sp, #(0x120 + THREAD_STACK_PARAMETERS_CUR_THREAD)]
|
||||
bl _ZN3ams4kern4arch5arm6423FpuContextSwitchHandlerEv
|
||||
|
||||
/* Restore registers that we saved. */
|
||||
|
@ -554,7 +555,7 @@ _ZN3ams4kern4arch5arm6421EL0SystemErrorHandlerEv:
|
|||
str x23, [sp, #(8 * 34)]
|
||||
|
||||
/* Invoke ams::kern::arch::arm64::HandleException(ams::kern::arch::arm64::KExceptionContext *). */
|
||||
ldr x18, [sp, #(0x120 + 0x28)]
|
||||
ldr x18, [sp, #(0x120 + THREAD_STACK_PARAMETERS_CUR_THREAD)]
|
||||
mov x0, sp
|
||||
bl _ZN3ams4kern4arch5arm6415HandleExceptionEPNS2_17KExceptionContextE
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <mesosphere/kern_select_assembly_offsets.h>
|
||||
|
||||
#define SAVE_THREAD_CONTEXT(ctx, tmp0, tmp1, done_label) \
|
||||
/* Save the callee save registers + SP and cpacr. */ \
|
||||
|
@ -148,11 +149,11 @@ _ZN3ams4kern10KScheduler12ScheduleImplEv:
|
|||
and x2, x2, #~(0x1000-1)
|
||||
|
||||
/* Check if the thread has terminated. We can do this by checking the DPC flags for DpcFlag_Terminated. */
|
||||
ldurb w3, [x2, #-0x20]
|
||||
ldurb w3, [x2, #-(THREAD_STACK_PARAMETERS_SIZE - THREAD_STACK_PARAMETERS_DPC_FLAGS)]
|
||||
tbnz w3, #1, 3f
|
||||
|
||||
/* The current thread hasn't terminated, so we want to save its context. */
|
||||
ldur x2, [x2, #-0x10]
|
||||
ldur x2, [x2, #-(THREAD_STACK_PARAMETERS_SIZE - THREAD_STACK_PARAMETERS_CONTEXT)]
|
||||
SAVE_THREAD_CONTEXT(x2, x4, x5, 2f)
|
||||
|
||||
2: /* We're done saving this thread's context, so we need to unlock it. */
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <mesosphere/kern_select_assembly_offsets.h>
|
||||
|
||||
/* ams::kern::arch::arm64::UserModeThreadStarter() */
|
||||
.section .text._ZN3ams4kern4arch5arm6421UserModeThreadStarterEv, "ax", %progbits
|
||||
|
@ -26,7 +27,7 @@ _ZN3ams4kern4arch5arm6421UserModeThreadStarterEv:
|
|||
/* | KExceptionContext (size 0x120) | KThread::StackParameters (size 0x30) | */
|
||||
|
||||
/* Clear the disable count for this thread's stack parameters. */
|
||||
str wzr, [sp, #(0x120 + 0x18)]
|
||||
strh wzr, [sp, #(0x120 + THREAD_STACK_PARAMETERS_DISABLE_COUNT)]
|
||||
|
||||
/* Call ams::kern::arch::arm64::OnThreadStart() */
|
||||
bl _ZN3ams4kern4arch5arm6413OnThreadStartEv
|
||||
|
@ -78,7 +79,7 @@ _ZN3ams4kern4arch5arm6427SupervisorModeThreadStarterEv:
|
|||
ldp x0, x1, [sp], #0x10
|
||||
|
||||
/* Clear the disable count for this thread's stack parameters. */
|
||||
str wzr, [sp, #(0x18)]
|
||||
strh wzr, [sp, #(THREAD_STACK_PARAMETERS_DISABLE_COUNT)]
|
||||
|
||||
/* Mask I bit in DAIF */
|
||||
msr daifclr, #2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue