Minor reboot patch changes
This commit is contained in:
parent
c73fec46e6
commit
336ab6a64c
@ -53,12 +53,13 @@ arm11_entrypoint_addr equ 0x1FFFFFFC
|
|||||||
ldr r6, [r6, #0x28]
|
ldr r6, [r6, #0x28]
|
||||||
blx r6
|
blx r6
|
||||||
|
|
||||||
; Copy the low TID (in UTF-16) of the wanted firm to the 5th byte of the payload
|
; Copy the low TID (in UTF-16) of the wanted firm
|
||||||
ldr r0, =low_tid_addr
|
ldr r0, =low_tid_addr
|
||||||
add r1, r8, #0x1A
|
add r1, r8, #0x1A
|
||||||
mov r2, #0x10
|
mov r2, #0x10
|
||||||
bl memcpy16
|
bl memcpy16
|
||||||
|
|
||||||
|
; Copy argv[0]
|
||||||
ldr r0, =fname_addr
|
ldr r0, =fname_addr
|
||||||
adr r1, fname
|
adr r1, fname
|
||||||
mov r2, #42
|
mov r2, #42
|
||||||
@ -110,9 +111,6 @@ fopen: .ascii "OPEN"
|
|||||||
fname: .ascii "FILE"
|
fname: .ascii "FILE"
|
||||||
.endarea
|
.endarea
|
||||||
|
|
||||||
.pool
|
|
||||||
nand_mount: .dcw "nand"
|
|
||||||
|
|
||||||
.align 4
|
.align 4
|
||||||
kernelcode_start:
|
kernelcode_start:
|
||||||
|
|
||||||
@ -147,10 +145,11 @@ nand_mount: .dcw "nand"
|
|||||||
add r3, r5,lsl #5
|
add r3, r5,lsl #5
|
||||||
add r3, r5,lsl #4
|
add r3, r5,lsl #4
|
||||||
ldmia r3, {r6-r8}
|
ldmia r3, {r6-r8}
|
||||||
mov r0, r7
|
cmp r8, #0
|
||||||
add r1, r4, r6
|
movne r0, r7
|
||||||
mov r2, r8
|
addne r1, r4, r6
|
||||||
bl memcpy32
|
movne r2, r8
|
||||||
|
blne memcpy32
|
||||||
add r5, #1
|
add r5, #1
|
||||||
cmp r5, #3
|
cmp r5, #3
|
||||||
blo load_section_loop
|
blo load_section_loop
|
||||||
@ -171,8 +170,6 @@ nand_mount: .dcw "nand"
|
|||||||
bx lr
|
bx lr
|
||||||
|
|
||||||
memcpy32:
|
memcpy32:
|
||||||
cmp r2, #0
|
|
||||||
bxeq lr
|
|
||||||
add r2, r0, r2
|
add r2, r0, r2
|
||||||
copy_loop32:
|
copy_loop32:
|
||||||
ldr r3, [r1], #4
|
ldr r3, [r1], #4
|
||||||
|
Reference in New Issue
Block a user