Open 173210 opened 9 years ago
I assume it is essential since it should be recoverd from the corrupted svc8 call.
I got it. But, the inline assembly has different problem.
movs r0, #0
But arm11_kernel_exec has its own return value. So They should be modified as this:
__asm__ ("movs r0, %0\t\n"
"ldr pc, [sp], #4\t\n",
: "r"(arm11_kernel_exec()));
A large portion of the code originates from yifanlu's Spider3DSTools ARM11-kernel branch, so to be honest I'm not sure what's good in there and what's bad. I might take a look at it and try to get it safer/polished up a bit more though, but the entire repo is a mess in general and could probably do with a good amount of adjustment.
https://github.com/shinyquagsire23/bootstrap/blob/1c55c0b333659f6b5cc60556c4121eb6d0e88447/bootstrap.c#L248 To fix this, we should remove arm11_kernel_stub and call arm11_kernel_exec directly.