From: pure lau Date: Thu, 31 Jul 2003 08:24:05 +0000 Subject: [U-Boot-Users] ep7312 address problem Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 ) ------------------------------------------------ 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 : 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 ------------------------------------------------- where the last line was :(right,u-boot jump to ) ------------------------------------------------- c0f00a68: eb002926 bl c0f0af08 ------------------------------------------------- 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: memsetup.S Type: application/octet-stream Size: 2039 bytes Desc: not available Url : http://lists.denx.de/pipermail/u-boot/attachments/20030731/ec676d52/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: ep7312.h Type: application/octet-stream Size: 5388 bytes Desc: not available Url : http://lists.denx.de/pipermail/u-boot/attachments/20030731/ec676d52/attachment-0001.obj