User Manual

A-2 EP7309/11/12 Users Manual - DS508UM4
Copyright Cirrus Logic, Inc. 2003
Boot Code
A
0000003C E3110501 TST r1, #Hw_URXFE1
00000040 1AFFFFFC BNE uart_ready_loop
00000044
00000044 ;;; Read the data, store it, and accumulate checksum
00000044 E59C0480 LDR r0, [r12, #Hw_UARTDR1] ; Read data
00000048 E4C80001 STRB r0, [r8], #1 ; Save it in memory
0000004C E1580009 CMP r8, r9
00000050 BAFFFFF8 BLT uart_ready_loop ; Do more if end of buffer not reached
00000054
00000054 ;;; All received, send end flag
00000054
00000054 E3A0003E MOV r0, #EndFlag
00000058 E5CC0480 STRB r0, [r12, #Hw_UARTDR1] ; Send reply
0000005C
0000005C
0000005C
0000005C ;;; Having loaded all the bytes, do the right thing to finish.
0000005C ;;;
0000005C
0000005C E55807FD LDRB r0, [r8, #(3-ImageSize)]
00000060 E35000FF CMP r0, #BootImageFlagByte
00000064
00000064
00000064 01A0F00E MOVEQ pc, r14 ; Return to caller for secure image
00000068
00000068
00000068
00000068
00000068 E28CAB09 ADD r10, r12, #WWWWWWWWWW ; R10 = 0x80002400 (also XXXXXX)
0000006C E58AC080 STR r12, [r10, #(ZZZZZZZZZZZ - YYYYYYYYYY)]
00000070 E248FB02 SUB pc, r8, #ImageSize ; Branch to 0x10000000
00000074
00000074
00000074 ;;; Put a checksum here so this part can be verified, too.
00000074 ;;; Have to pad the tail out to 31 words, then the checksum.
00000074
00000074 0000000000ALIGN 128, -4 ; Align just before end of 128-byte tail
0000007C uart_checksum
0000007C 436B74AB DCD 0x436b74ab
00000080
00000080 ASSERT (. - start_of_rom) = 640 ; Check that it’s in the right place
00000080
00000080 END