; check SRC of the main firware (0x2000) ; check reset buttom ; ; load uncompression code to SDRAM ; if RESET load from 0x03000 ; if no RESET load from 0x20000 ; if uncompression return 1 - then switch memory and start from 0 ; ; 00000324 : ; creck SRC of the upgrdable firware 324: e92d4010 stmdb sp!, {r4, lr} 328: e3a01ae0 mov r1, #917504 ; 0xe0000 32c: e3a00b80 mov r0, #131072 ; 0x20000 330: ebffffd6 bl 290 334: e1a02000 mov r2, r0 338: e3520000 cmp r2, #0 ; 0x0 33c: 1a000003 bne 350 ; check RESET to FACTORY CONFIG buttom 340: ebffffc9 bl 26c 344: e1a03000 mov r3, r0 348: e3530000 cmp r3, #0 ; 0x0 34c: 0a000009 beq 378 00000350 : 350: e3a01cd0 mov r1, #53248 ; 0xd000 354: e3a00dc0 mov r0, #12288 ; 0x3000 358: ebffffcc bl 290 35c: e1a03000 mov r3, r0 360: e3530000 cmp r3, #0 ; 0x0 364: 0a000001 beq 370 368: ebffffbe bl 268 ; goto endless loop 36c: ea000002 b 37c 00000370 : 370: e3a04dc0 mov r4, #12288 ; 0x3000 374: ea000000 b 37c 00000378 : 378: e3a04b80 mov r4, #131072 ; 0x20000 0000037c : ; ;relocate program segment 0x1800-0x3000 to 0x20300000-0x20301800 ; 37c: e59f1044 ldr r1, [pc, #68] ; 3c8 (0x20300000) 380: e3a02d60 mov r2, #6144 ; 0x1800 384: e3a00d60 mov r0, #6144 ; 0x1800 388: ebffffd4 bl 2e0 ; 38c: e59f2038 ldr r2, [pc, #56] ; 3cc (0x00002f50) 390: e59f3038 ldr r3, [pc, #56] ; 3d0 (0x202fe800) 394: e0822003 add r2, r2, r3 ; <- 0x20301750 (copy of0x2f50 398: e1a00004 mov r0, r4 39c: e3a01580 mov r1, #536870912 ; 0x20000000 3a0: e1a0c002 mov ip, r2 ; uncompress image 3a4: eb000362 bl 1134 ; the same as call 0x2f50 3a8: e1a01000 mov r1, r0 3ac: e3510000 cmp r1, #0 ; 0x0 3b0: 0a000000 beq 3b8 ; switch memory 3b4: ebffff23 bl 48 ; switch memory!!!! 000003b8 : 3b8: e8bd4010 ldmia sp!, {r4, lr} 3bc: e12fff1e bx lr 3c0: 880000b8 3c4: aabbbbaa 3c8: 20300000 3cc: 00002f50 3d0: 202fe800