UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 20784

6.3/6.2 EDK, PowerPC Boot Code - For very small sbss sections, the sbss initialization code overwrites the entire PPC memory space

Description

Keywords: boot code

Urgency: Standard

General Description:
PowerPC Boot Code - For very small sbss sections, the sbss initialization code overwrites the entire PPC memory space.

Solution

The "crt0.s" file must be updated. Here are the steps necessary to update the boot code:

1. Create a new directory in the project directory called "bsp".

2. Copy the "standalone_v1_00_a" directory from the EDK installation:

c:\EDK\sw\lib\bsp\standalone_v1_00_a\

to the "bsp" directory.

3. Open the "crt0.S" file in the following directory:

project_directory\bsp\standalone_v1_00_a\src\ppc405

4. Add the lines in BOLD shown below:

subf 8,6,7 /* number of bytes to zero */
srwi. 9,8,2 /* number of words to zero */
beq .Lenclbss /* Check if the number of bytes was less than 4 */
mtctr 9
li 0,0 /* zero to clear memory */
addi 6,6,-4 /* adjust so we can use stwu */
.Lloopsbss:
stwu 0,4(6) /* zero sbss */
bdnz .Lloopsbss
.Lenclsbss:

.Lstclbss:
/* clear bss */
lwz 6,.Lbss_start(5) /* calculate beginning of the BSS */
lwz 7,.Lbss_end(5) /* calculate end of the BSS */

cmplw 1,6,7
bc 4,4,.Lenclbss

subf 8,6,7 /* number of bytes to zero */
srwi. 9,8,2 /* number of words to zero */
beq .Lenclsbss /* Check if the number of bytes was less than 4 */
mtctr 9
li 0,0 /* zero to clear memory */
addi 6,6,-4 /* adjust so we can use stwu */

5. Close and reopen the project.

6. Rerun LibGen by selecting Tools -> Generate Libraries.

This issue has been resolved in the EDK 7.1 release.
AR# 20784
Date Created 02/09/2005
Last Updated 04/12/2007
Status Archive
Type General Article