[U-Boot-Users] u-boot init problem on ml403 (virtex-4) board

Miroslaw Dach miroslaw.dach at psi.ch
Tue Sep 25 10:14:26 CEST 2007


Dear All,

   I am trying to use u-boot 1.2.0 on my avnet evaluation board (ml403 like 
with virtex-4 chip with built-in ppc405). 

My observation is as following:

I am able to run linux v2.6.21 v2.6.22 v2.6.23 (zImage.elf) on my board.
Linux always boots correctly.

My board has 32 MB of RAM and 8 MB of Flash. Right now I run all of the 
software straight from RAM (by means of jtag).

For couple of weeks I am dealing with u-boot with UART lite serial 
console.

My observation is as following that u-boot does not always run properly. 
The u-boot crashes (or has some initialization problems) in most cases 
when I go through following steps:

1. I load Linux zImage.elf via jtag:

XMD% dow zImage.elf
        section, .text: 0x00400000-0x004036c4
        section, .data: 0x00404000-0x00505000
        section, .bss: 0x00505000-0x0050719c
Downloaded Program zImage.elf
Setting PC with program start addr = 0x00400000
PC reset to 0x00400000, Clearing MSR Register
XMD% run

2. Linux loads and boot always without any problems

3. Next I stop Linux and load  u-boot via jtag

XMD% dow u-bootXil
        section, .text: 0x00800000-0x0080e85c
        section, .resetvec: 0x00815050-0x00815054
        section, .rodata: 0x0080e85c-0x00811027
        section, .reloc: 0x00811100-0x00811770
        section, .data: 0x00811770-0x00811c60
        section, .data.rel: 0x00811c60-0x00811c8c
        section, .data.rel.local: 0x00811c8c-0x008120c4
        section, .u_boot_cmd: 0x008120c4-0x00812364
        section, .bss: 0x00812400-0x00815050
Downloaded Program u-bootXil
Setting PC with program start addr = 0x00800100
PC reset to 0x00800100, Clearing MSR Register
XMD% run
 
-----------------------------------------------------------------
The output on the console is as following:
-----------------------------------------------------------------

U-Boot 1.2.0 (Sep 25 2007 - 09:24:54)


### No HW ID - assuming ML403
DRAM:  32 MB
Top of RAM usable for U-Boot at: 02000000
Reserving 84k for U-Boot at: 01fea000
Reserving 129k for malloc() at: 01fc9c00
Reserving 120 Bytes for Board Info at: 01fc9b88
Reserving 48 Bytes for Global Data at: 01fc9b58
Stack Pointer at: 01fc9b38
New Stack Pointer is: 01fc9b38
Now running in RAM - U-Boot at: 01fea000
Using default environment

Bus Fault @ 0x01ff34dc, fixup 0x00000000
Machine check in kernel mode.
Caused by (from msr): regs 01fc98f8 Data parity signal
NIP: 01FF34DC XER: 00000000 LR: 01FF2F40 REGS: 01fc98f8 TRAP: 0200 DAR: 00000000
MSR: 00021000 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 00

GPR00: 00000000 01FC99E8 C01F3950 01AEA000 00000120 00000000 00000001 00000021
 
--------------------------------------------------------------------------

Sometimes u-boot dos not crash but it seems to be something wrong with 
board info:

--------------------------------------------------------------------------

U-Boot 1.2.0 (Sep 24 2007 - 12:48:09)


### No HW ID - assuming ML403
DRAM:  32 MB
Top of RAM usable for U-Boot at: 02000000
Reserving 83k for U-Boot at: 01feb000
Reserving 129k for malloc() at: 01fcac00
Reserving 120 Bytes for Board Info at: 01fcab88
Reserving 48 Bytes for Global Data at: 01fcab58
Stack Pointer at: 01fcab38
New Stack Pointer is: 01fcab38
Now running in RAM - U-Boot at: 01feb000
˙ţď\In:    ˙ţď\Err:   U-Boot relocated to 01feb000
### main_loop entered: bootdelay=3

### main_loop: bootcmd="tftp 0x500000 uImage; bootm 0x500000"
Hit any key to stop autoboot:  3 2 1 0 
=> bdinfo
bd address  = 0x0memstart    = 0x00000000
memsize     = 0x0flashstart  = 0x00000000
flashsize   = 0x00000000
flashoffset = 0x00000000
sramstart   = 0x00000000
sramsize    = 0x00000000
bootflags   = 0xCprocfreq    =    100 MHz
plb_busfreq =    100 MHz
ethaddr     = 00:ţ:C:˙ď:D:0
IP addr     = 129.129.144.83
baudrate    =   9600 bps
=> md 01fcab88 100
01fcab88:    ................
01fcab98:    ............. . 
01fcaba8:    ...S.P.F........
01fcabb8:    ......%.1.2.U-Bo
01fcabc8:    ot 1.2.0........
01fcabd8:    ................
01fcabe8:    ................
01fcabf8:    ................
01fcac08:    ..r|bootargs=con
01fcac18:    sole=ttyUL0,9600
01fcac28:     root=/dev/nfs r
01fcac38:    w nfsroot=129.12
01fcac48:    9.144.113:/opt/e
01fcac58:    ldk41/ppc_4xx,tc
01fcac68:    p  ip=::::virtex
01fcac78:    4-mirek:eth0:dhc
01fcac88:    p panic=1.bootcm
01fcac98:    d=tftp 0x500000 
01fcaca8:    uImage; bootm 0x
01fcacb8:    500000.bootdelay
01fcacc8:    =3.baudrate=9600
01fcacd8:    .loads_echo=1.et
01fcace8:    haddr=00:50:C2:4
01fcacf8:    6:D8:01.ipaddr=1
01fcad08:    29.129.144.83.se
01fcad18:    rverip=129.129.1
01fcad28:    44.113.hostname=
01fcad38:    virtex4-mirek.lo
01fcad48:    adaddr=0x500000.
01fcad58:    stdin=.stdout=.s
01fcad68:    tderr=..........
01fcad78:    ................

-------------------------------------------------------------------------

When u-boot starts properly the output looks like below:

-------------------------------------------------------------------------

U-Boot 1.2.0 (Sep 24 2007 - 12:48:09)


### No HW ID - assuming ML403
DRAM:  32 MB
Top of RAM usable for U-Boot at: 02000000
Reserving 83k for U-Boot at: 01feb000
Reserving 129k for malloc() at: 01fcac00
Reserving 120 Bytes for Board Info at: 01fcab88
Reserving 48 Bytes for Global Data at: 01fcab58
Stack Pointer at: 01fcab38
New Stack Pointer is: 01fcab38
Now running in RAM - U-Boot at: 01feb000
Using default environment

In:    serial
Out:   serial
Err:   serial
U-Boot relocated to 01feb000
### main_loop entered: bootdelay=3

### main_loop: bootcmd="tftp 0x500000 uImage; bootm 0x500000"
Hit any key to stop autoboot:  3 2 1 0 
=> bdinfo
bd address  = 0x01FCAB88
memstart    = 0x00000000
memsize     = 0x02000000
flashstart  = 0x00000000
flashsize   = 0x00000000
flashoffset = 0x00000000
sramstart   = 0x00000000
sramsize    = 0x00000000
bootflags   = 0xC1CB7D60
procfreq    =    100 MHz
plb_busfreq =    100 MHz
ethaddr     = 00:50:C2:46:D8:01
IP addr     = 129.129.144.83
baudrate    =   9600 bps

------------------------------------------------------------------------

I was trying to play with various u-boot parameters (CFG_ or CONFIG_ )
but I have never got it running reliably.


My observation is also as following 


ACTION (jtag side):             STATUS:

load zImage.elf                
run				runs properly (always)
stop

load u-boot
run                             crashes (in most cases)
stop

load u-boot                     
run				runs properly (in most cases)
stop

load u-boot
run                             runs properly (in most cases)
stop



Does somebody have some hints what could be wrong?

Best Regards

Mirek

p.s. I attache to this e-mail my config file include/configs/ml403.h
-------------- next part --------------
#ifndef __CONFIG_H
#define __CONFIG_H

/*
#define DEBUG
#define ET_DEBUG 1
*/
/*
 * High Level Configuration Options
 * (easy to change)
 */

#define CONFIG_405     1  /* This is a PPC405 CPU    */
#define CONFIG_4xx     1  /* ...member of PPC4xx family */
#define CONFIG_XILINX_ML403   1  /* ...on a Xilinx ML410 board */

#include "../board/xilinx/ml403/xparameters.h"

#define CONFIG_XILINX_UARTLITE   1
#define CONFIG_XILINX_UARTLITE_BASE	XPAR_UARTLITE_0_BASEADDR
#define CFG_SDRAM_BASE          0x00000000
#define CFG_SDRAM_SIZE          0x01ffffff



#define CFG_LONGHELP
#define CONFIG_CMDLINE_EDITING
#define CONFIG_AUTO_COMPLETE

#define CFG_NO_FLASH

#define CFG_MONITOR_BASE        0x800000
#define CFG_MONITOR_LEN		(2* 128 * 1024)  /* Reserved 2 sectors */
 
#define DEBUG 1


/*  Make some configuration choices based on the hardware design
 *  specified in xparameters.h.
 */

#if ! (defined(CFG_ENV_IS_IN_FLASH) || defined(CFG_ENV_IS_IN_EEPROM))
#define CFG_ENV_IS_NOWHERE        1       /* no space to store environment */
#define CFG_ENV_SIZE              1024
#endif
                                       

#define CONFIG_BAUDRATE           9600
#define CONFIG_BOOTDELAY          3       /* autoboot after 0 seconds */
#define CONFIG_BOOTCOMMAND        "tftp 0x500000 uImage; bootm 0x500000"       /* autoboot command  */
#define CONFIG_BOOTARGS           "console=ttyUL0,9600 root=/dev/nfs rw nfsroot=129.118.144.113:/opt/eldk41/ppc_4xx,tcp  ip=::::virtex4-mirek:eth0:dhcp panic=1" /* "root=/dev/ram rw"*/
#define CONFIG_SERVERIP		129.118.144.113
#define CONFIG_IPADDR		129.118.144.83
#define CONFIG_ETHADDR		00:50:C2:46:D8:01
#define CONFIG_HOSTNAME         virtex4-mirek 
#define CONFIG_LOADADDR         0x500000
#define CONFIG_LOADS_ECHO         1       /* echo on for serial download */
#define CFG_LOADS_BAUD_CHANGE     0       /* don't allow baudrate change */

#define REMOVE_COMMANDS           ( \
 CFG_CMD_FLASH          | \
 CFG_CMD_NET            | \
 CFG_CMD_NFS		| \
 CFG_CMD_PING           | \
 CFG_CMD_DHCP           | \
 CFG_CMD_JFFS2          | \
 CFG_CMD_LOADS		| \
 CFG_CMD_LOADB		| \
 CFG_CMD_IMI		| \
 CFG_CMD_CACHE		| \
 CFG_CMD_KGDB		| \
 CFG_CMD_PCMCIA		| \
 CFG_CMD_IDE		| \
 CFG_CMD_PCI		| \
 CFG_CMD_IRQ		| \
 CFG_CMD_CONSOLE	| \
 CFG_CMD_EEPROM		| \
 CFG_CMD_ASKENV		| \
 CFG_CMD_ECHO		| \
 CFG_CMD_I2C		| \
 CFG_CMD_REGINFO	| \
 CFG_CMD_IMMAP		| \
 CFG_CMD_DATE		| \
 CFG_CMD_BEDBUG		| \
 CFG_CMD_FDC		| \
 CFG_CMD_SCSI		| \
 CFG_CMD_AUTOSCRIPT	| \
 CFG_CMD_MII		| \
 CFG_CMD_SETGETDCR	| \
 CFG_CMD_BSP		| \
 CFG_CMD_MISC		| \
 CFG_CMD_USB		| \
 CFG_CMD_DOC		| \
 CFG_CMD_DTT		| \
 CFG_CMD_SDRAM		| \
 CFG_CMD_DIAG		| \
 CFG_CMD_FPGA		| \
 CFG_CMD_HWFLOW		| \
 CFG_CMD_SAVES		| \
 CFG_CMD_ENV            | \
 CFG_CMD_SPI		| \
 CFG_CMD_FDOS		| \
 CFG_CMD_VFD		| \
 CFG_CMD_NAND		| \
 CFG_CMD_BMP		| \
 CFG_CMD_PORTIO		| \
 CFG_CMD_MMC		| \
 CFG_CMD_FAT		| \
 CFG_CMD_IMLS		| \
 CFG_CMD_ITEST		| \
 CFG_CMD_REISER		| \
 CFG_CMD_CDP		| \
 CFG_CMD_XIMG		| \
 CFG_CMD_UNIVERSE 	| \
 CFG_CMD_EXT2		| \
 CFG_CMD_SNTP		| \
 CFG_CMD_DISPLAY	  \
)

#define CONFIG_COMMANDS           (CFG_CMD_ALL  & ~REMOVE_COMMANDS)

/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
#include <cmd_confdefs.h>

/*
 * Miscellaneous configurable options
 */
#define CFG_LONGHELP      /* undef to save memory    */
#define CFG_PROMPT  "=> " /* Monitor Command Prompt  */

#define CFG_CBSIZE  256   /* Console I/O Buffer Size */

#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16)   /* Print Buffer Size */
#define CFG_MAXARGS                16 /* max number of command args */
#define CFG_BARGSIZE              CFG_CBSIZE  /* Boot Argument Buffer Size  */

#define CFG_MEMTEST_START         0x0400000   /* memtest works on  */
#define CFG_MEMTEST_END           0x07fffff   /* 4 ... 12 MB in DRAM  */

#define CFG_DUART_CHAN            0
#define CFG_NS16550_REG_SIZE      -4
#define CFG_NS16550               1
#define CFG_INIT_CHAN1            1

/* The following table includes the supported baudrates */
#define CFG_BAUDRATE_TABLE  \
    {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400}

#define CFG_LOAD_ADDR             0x400000 /* default load address */
#define CFG_EXTBDINFO             1  /* To use extended board_into (bd_t) */

#define CFG_HZ                    1000  /* decrementer freq: 1 ms ticks */

/*-----------------------------------------------------------------------
 * Start addresses for the final memory configuration
 * (Set up by the startup code)
 * Please note that CFG_SDRAM_BASE _must_ start at 0
 */
#define CFG_SDRAM_BASE            0x00000000
#define CFG_MALLOC_LEN            (128 * 1024)   /* Reserve 128 kB for malloc()   */

/*
 * For booting Linux, the board info and command line data
 * have to be in the first 8 MB of memory, since this is
 * the maximum mapped by the Linux kernel during initialization.
 */
#define CFG_BOOTMAPSZ             (8 << 20)   /* Initial Memory map for Linux */

/*-----------------------------------------------------------------------
 * Cache Configuration
 */
#define CFG_DCACHE_SIZE           8192 /* Virtex-II Pro PPC 405 CPUs */
#define CFG_CACHELINE_SIZE        32 /* ...                 */

/*-----------------------------------------------------------------------
 * Definitions for initial stack pointer and data area (in DPRAM)
 */

#define CFG_INIT_RAM_ADDR         0x1700000  /* inside of SDRAM */
#define CFG_INIT_RAM_END          0x2000     /* End of used area in RAM */
#define CFG_GBL_DATA_SIZE         128     /* size in bytes reserved for initial data */
#define CFG_GBL_DATA_OFFSET      (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
#define CFG_INIT_SP_OFFSET       CFG_GBL_DATA_OFFSET

/*
 * Internal Definitions
 *
 * Boot Flags
 */
#define BOOTFLAG_COLD             0x01  /* Normal Power-On: Boot from FLASH */
#define BOOTFLAG_WARM             0x02  /* Software reboot         */

#endif           /* __CONFIG_H */


More information about the U-Boot mailing list