Patch kernel stack check instead of the whole error_handler

This commit is contained in:
Maschell 2023-11-25 16:41:54 +01:00
parent 50f00958d8
commit 962c388fe3
1 changed files with 3 additions and 2 deletions

View File

@ -74,8 +74,9 @@ int _main() {
/* Save the request handle so we can reply later */
*(volatile u32 *) 0x0012F000 = *(volatile u32 *) 0x1016AD18;
/* Patch kernel_error_handler to BX LR immediately */
*(volatile u32 *) 0x08129A24 = 0xE12FFF1E;
// patch kernel thread stack check
*(volatile uint32_t *) 0x0812c138 = 0xe3a00000; // mov r0, #0
*(volatile uint32_t *) 0x0812c13c = 0xe12fff1e; // bx lr
void *pset_fault_behavior = (void *) 0x081298BC;
kernel_memcpy(pset_fault_behavior, (void *) repairData_set_fault_behavior, sizeof(repairData_set_fault_behavior));