Seems to be a bug in mbx8xx BSP

Leon Pollak leonp at plris.com
Tue Jun 18 07:15:25 UTC 2002


Hello,
	I think that there is a bug in the file 
c/src.lib.libbsp/powerpc/mbx8xx/startup/start.S. 
The bssclr computes in r5 the length of the area to be zeroed.
The line 
	sub r5,r5,r4
seems to be missing
------------------------------------------
/*
 * bssclr - zero out bss
 */
bssclr:
	lis	r3, base_addr at ha
	addi	r3, r3, base_addr at l
        lwz     r4, bss_addr-base_addr(r3)      /* Start of bss */
        lwz     r5, bss_length-base_addr(r3)    /* Length of bss */
	
	sub   r5,r5,r4	/* <<<<<<<<<<<<< Is absent <<<<<<< */

        rlwinm. r5,r5,30,0x3FFFFFFF             /* form length/4 */
        beqlr                                   /* no bss - return */
        mtctr   r5                              /* set ctr reg */

        li      r5,0x0000                       /* r5 = 0 */
clear_bss:
-------------------------------------------

Also, I am not able to run cdtest sample. Can someone acknowledge successive 
run of it on this BSP?

Thanks.
-- 
leonp at plris dot com



More information about the users mailing list