[U-Boot] Virtex 4 with XMD

I am trying to get u-boot to run on a custom board with a Virtex 4 on it. I have started with the latest code from the u-boot-ppc4xx.git repository. I have been trying to get a simple (just a serial port) configuration of u-boot to run without success. The board has the following memory map:
Address Map for Processor ppc405_0 (0b0100000000-0b0111111111) ppc405_0 (0000000000-0x03ffffff) SDR_SDRAM_CUSTOM ppc405_0_dplb1 (0000000000-0x03ffffff) SDR_SDRAM_CUSTOM ppc405_0_iplb1 (0x80800000-0x8080ffff) xps_epc_0 plb (0x81000000-0x8100ffff) xps_ethernetlite_0 plb (0x81010000-0x8101ffff) xps_ethernetlite_1 plb (0x81020000-0x8102ffff) xps_ethernetlite_2 plb (0x81800000-0x8180ffff) xps_intc_0 plb (0x83600000-0x8360ffff) SysACE_CompactFlash plb (0x84000000-0x8400ffff) xps_uart_console plb (0x84010000-0x8401ffff) xps_uart_1 plb (0x84020000-0x8402ffff) xps_uart_2 plb (0x84030000-0x8403ffff) xps_uart_3 plb (0x84040000-0x8404ffff) xps_uart_4 plb (0x84050000-0x8405ffff) xps_uart_5 plb (0x84060000-0x8406ffff) xps_uart_6 plb (0x85e00000-0x85e0ffff) plbv46_pci_0 plb (0x90000000-0x9fffffff) plbv46_pci_0 plb (0xf0000000-0xf000ffff) plbv46_pci_0 plb (0xffff8000-0xffffffff) xps_bram_if_cntlr_1 plb
I have based my board's code on the ppc405-generic code. My board specific configs header file contains only a few items #include "../board/xilinx/ppc405-custom/xparameters.h"
#define XPAR_PLB_CLOCK_FREQ_HZ (XPAR_CPU_PPC405_CORE_CLOCK_FREQ_HZ) #define XPAR_CORE_CLOCK_FREQ_HZ (XPAR_CPU_PPC405_CORE_CLOCK_FREQ_HZ)
/* sdram */ #define CONFIG_SYS_SDRAM_SIZE_MB 64 #define XPAR_DDR2_SDRAM_MEM_BASEADDR (XPAR_SDR_SDRAM_CUSTOM_MPMC_BASEADDR)
/* environment */ #define CONFIG_ENV_SIZE 0x1000
/*Misc*/ #define CONFIG_SYS_PROMPT "xlx-ppc405:/# " /* Monitor Command Prompt */ #define CONFIG_PREBOOT "echo U-Boot is up and runnining;"
#include <configs/xilinx-ppc405.h>
In boards.cfg I set the following:
SYS_TEXT_BASE=0x00800000,RESET_VECTOR_ADDRESS=0x00900000
when I run in XMD, noting seems to happen, and when I stop the processor, the program counter seems to be at an odd address. See the output below:
XMD% dow u-boot System Reset .... DONE Downloading Program -- u-boot section, .text: 0x00800000-0x008165df section, .resetvec: 0x00900000-0x00900003 section, .rodata: 0x008165e0-0x0081b810 section, .reloc: 0x0081b900-0x0081cf4b section, .data: 0x0081cf4c-0x0081e17b section, .u_boot_list: 0x0081e17c-0x0081e7b7 section, .bss: 0x00900004-0x00902333 Setting PC with Program Start Address 0x00800000
XMD% run Info:Processor started. Type "stop" to stop processor
RUNNING> XMD% stop XMD% Info:User Interrupt, Processor Stopped at 0x7c230700
I have also observed that single stepping gets me to that odd address immediately. See the output below:
XMD% dow u-boot System Reset .... DONE Downloading Program -- u-boot section, .text: 0x00800000-0x008165df section, .resetvec: 0x00900000-0x00900003 section, .rodata: 0x008165e0-0x0081b810 section, .reloc: 0x0081b900-0x0081cf4b section, .data: 0x0081cf4c-0x0081e17b section, .u_boot_list: 0x0081e17c-0x0081e7b7 section, .bss: 0x00900004-0x00902333 Setting PC with Program Start Address 0x00800000
XMD% stp 00800000:
XMD% stp 7c230700:
XMD%
The main thing that worries me with this board is that there is no flash memory on the board. I am hoping that won't prevent me from executing u-boot with XMD.
So, that leaves me with the following questions: 1) Is the lack of flash memory causing THIS problem? 2) Am I missing some config items? 3) Does anybody have any advice on how I can debug this?
Thanks, Frank

Dear Frank,
Frank Lombardo <fastfrank <at> gmail.com> writes:
So, that leaves me with the following questions:
- Is the lack of flash memory causing THIS problem?
- Am I missing some config items?
- Does anybody have any advice on how I can debug this?
I'm on an ML507 and I use the default configuration for u-boot. So try the defaults (SYS_TEXT_BASE and RESET_VECTOR_ADDRESS) first.
I used the instructions here when I used XMD: http://wiki.xilinx.com/powerpc-linux Just change the kernel ELF file for the u-boot ELF file.
There are two targets for all the u-boot supported Xilinx boards in the boards.cfg. The one for Flash has "_flash" so it's very easy to differentiate.
All the best, Rommel

Rommel Custodio <sessyargc+uboot <at> gmail.com> writes:
Dear Frank,
Frank Lombardo <fastfrank <at> gmail.com> writes:
So, that leaves me with the following questions:
- Is the lack of flash memory causing THIS problem?
- Am I missing some config items?
- Does anybody have any advice on how I can debug this?
I'm on an ML507 and I use the default configuration for u-boot. So try the defaults (SYS_TEXT_BASE and RESET_VECTOR_ADDRESS) first.
Sorry, the defaults won't work in your case. I didn't notice that you only have 64Mb earlier.
I used the instructions here when I used XMD: http://wiki.xilinx.com/powerpc-linux Just change the kernel ELF file for the u-boot ELF file.
There are two targets for all the u-boot supported Xilinx boards in the boards.cfg. The one for Flash has "_flash" so it's very easy to differentiate.
After successfully downloading the u-boot ELF to RAM, dump the first few words at the load address (SYS_TEXT_BASE). It should be a jump to _start. You could also disassemble your u-boot.
I built xilinx-ppc405-generic as a test and the first instruction is not a jump to _start. In ppc440 RAM boot (ie for use in XMD) the first instruction is a jump to _start_440 as this emulates going through the reset vector. IMHO, at the moment, it seems 405 is broken for RAM boot.
I hope my understanding is correct. Would like to hear from the PowerPC guys in the list.
All the best, Rommel
participants (2)
-
Frank Lombardo
-
Rommel Custodio