[U-Boot-Users] ep7312 address problem

pure lau purechy at hotmail.com
Thu Jul 31 10:44:30 CEST 2003


Hi all:

    Now I am working on a EP7312 board with uboot and
I have been blocked by a unknown problem for several 
week.Before descride the problem,let me intrduce my working
flow.

I compile u-boot under rh linux 7.3 with cross-compile
tools download from arm.linux.org.uk.

At the time I get u-boot.bin via cross-compile, I generate
u-boot.asm by "arm-linux-objdump -d u-boot > u-boot.asm"

Then program the u-boot.bin to flash(sst29vf040) with programmer.
Switch the ep7312 board to external boot mode ,and begin boot.

I use ICE and ADS 1.2 to trace how the board works.And I can 
trace  that u-boot has init the ep7312 board and has relocated
it self form flash(0x0) to sdram (0xc0f00000).

The following is a piece of code in the sdram: (near the start of 
<start_armboot>)
------------------------------------------------
    c0f00a50: [0xe92d40f0] stmfd r13!,{r4-r7,r14} 
    c0f00a54: [0xe24dd088] sub r13,r13,#0x88 
    c0f00a58: [0xe28d8068] add r8,r13,#0x68 
    c0f00a5c: [0xe1a00008] mov r0,r8 
    c0f00a60: [0xe3a01000] mov r1,#0 
    c0f00a64: [0xe3a02020] mov r2,#0x20 
    c0f00a68: [0xeb002826] bl 0xc0f0ab08 
-------------------------------------------------

please note the last line :(wrong,u-boot crashes here)
-------------------------------------------------
    c0f00a68: [0xeb002826] bl 0xc0f0ab08 
-------------------------------------------------


In u-boot.asm and in flash ,this piece of code was:
-------------------------------------------------
    c0f00a50 <start_armboot>: 
    c0f00a50: e92d40f0 stmdb sp!, {r4, r5, r6, r7, lr} 
    c0f00a54: e24dd088 sub sp, sp, #136 ; 0x88 
    c0f00a58: e28d8068 add r8, sp, #104 ; 0x68 
    c0f00a5c: e1a00008 mov r0, r8 
    c0f00a60: e3a01000 mov r1, #0 ; 0x0 
    c0f00a64: e3a02020 mov r2, #32 ; 0x20 
    c0f00a68: eb002926 bl c0f0af08 <memset> 
-------------------------------------------------

where the last line was :(right,u-boot jump to <memset>)

-------------------------------------------------
    c0f00a68: eb002926 bl c0f0af08 <memset> 
-------------------------------------------------

we can compare the wrong and right line and find that 
the two BL address have a  discrepancy of 0x400.
(c0f0ab08 and c0f0af08).This makes u-boot to crash.

I have been blocked here for several weeks.The content of
u-boot.asm seems all right and in flash it does.But why after
relocating to sdram the BL operating number subtracts 0x400?


------------------------------------------------------
the detailed info of my ep7312 board is as follows:

cpu  :  EP7312
sdram:  (4 bank * 1M  * 16 bit) * 2 
flash:  512k * 8 bit
cs0 has been set to 8bit,slowest.

ep7312.h and memsetup.S also attached.
-------------------------------------------------------


Any one can help? Thanks in advance!



Pure

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  





More information about the U-Boot mailing list