Currently we need offsets for the svc handler for versions 4.1-9.2 on all old 3DS kernels so that we can get the proper patching offsets to give us access to SVC 0x7B. The following code snippet demonstrates the patch needed:
ROM:FFF02244 loc_0_FFF02244 ; CODE XREF: svc_handler+28j
ROM:FFF02244 LDR R8, [R8,R9,LSL#2]
ROM:FFF02248 ADD R10, SP, R9,LSR#3
ROM:FFF0224C MOV R11, #1
ROM:FFF02250 LDRB R10, [R10,#0x20]
ROM:FFF02254 AND LR, R9, #7
ROM:FFF02258 TST R10, R11,LSL LR
ROM:FFF0225C LDRB R10, [SP,#0x18+arg_18+1]
ROM:FFF02260 BEQ loc_0_FFF02210 <- change this to NOP
ROM:FFF02264 CMP R10, #0
ROM:FFF02268 BEQ loc_0_FFF022A4 <- and this one
ROM:FFF0226C MOV LR, #0
Once the NOP is in place, the usermode app will be able to call SVC 0x7B and other previously unavailable SVCs.
We also need to make sure we patch back the original offsets properly, and find a proper offset for 4.x since the current offset is flawed.
Currently we need offsets for the svc handler for versions 4.1-9.2 on all old 3DS kernels so that we can get the proper patching offsets to give us access to SVC 0x7B. The following code snippet demonstrates the patch needed:
Once the NOP is in place, the usermode app will be able to call SVC 0x7B and other previously unavailable SVCs.
We also need to make sure we patch back the original offsets properly, and find a proper offset for 4.x since the current offset is flawed.