This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: redboot cyg_start routine
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: Satish Kumar <satish at bvt dot sc dot sanyo dot co dot jp>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Mon, 14 Jul 2003 09:14:41 +0200
- Subject: Re: [ECOS] redboot cyg_start routine
- References: <20030714155432.7AAE.SATISH@bvt.sc.sanyo.co.jp>
> 3000463c [0xebffff87] bl do_version
> 30004640 [0xe59f81ac] ldr r8,0x300047f4 ; = #0x00004940
> 30004644 [0xe24b902c] sub r9,r11,#0x2c
> 30004648 [0xe3570000] cmp r7,#0
> 3000464c [0x0a000002] beq 0x3000465c ; (cyg_start + 0x118)
> 30004650 [0xe59f01a0] ldr r0,0x300047f8 ; = #0x30008494
> 30004654 [0xebfffe7b] bl diag_printf
> 30004658 [0xe3a07000] mov r7,#0
> 3000465c [0xe59f4198] ldr r4,0x300047fc ; = #0x00003244
> 30004660 [0xe3a06001] mov r6,#1
> 30004664 [0xe1a00004] mov r0,r4
> 30004668 [0xe3a01c01] mov r1,#0x100
> 3000466c [0xe3a0200a] mov r2,#0xa
> 30004670 [0xe5886000] str r6,[r8,#0]
> 30004674 [0xeb00042e] bl _rb_gets
> 30004678 [0xe3a03000] mov r3,#0
> 3000467c [0xe3700001] cmn r0,#1
> 30004680 [0xe5883000] str r3,[r8,#0]
> 30004684 [0x0affffef] beq 0x30004648 ; (cyg_start + 0x104)
> 30004688 [0xe1500003] * cmp r0,r3
> 3000468c [0x0a000027] beq 0x30004730 ; (cyg_start + 0x1ec)
>
>
> the problem is i see a indefinite loop in the assembly code i.e at
> address 30004684 which branches to the address 30004648 always
> unconditionally..can some one justify this..?
beq = branch if equal.
So its a conditional branch.
Andrew
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss