This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SPL load issue on AM437x custom board using the Linux Ethernet setup(TFTP boot)

Other Parts Discussed in Thread: SYSCONFIG

Hi All,

I am working on AM437x custom board to bringup the SPL and u-boot using the Ethernet flash boot mode(Here I am using the Linux setup) using the TFTP service.

SPL boot-loader execution stopped on AM437x after below SPL message. 

U-Boot SPL 2016.05-00230-g5bf448d-dirty (Aug 30 2016 - 18:53:40)

To debug, I have added more debug prints to check where this execution halted. I was came to know that the memory allocation was failed and halted the execution. For your reference I have pasted the debug console messages with more debug prints.

Could you please have a look and suggest us how can we override this issue and proceed further.

############## Debug Console #####################

U-Boot SPL 2016.05-00230-g5bf448d-dirty (Aug 30 2016 - 18:53:40)

LnT: debug func: preload_console_init
LNT: func: spl_board_init line:188
LNT debug spl_board_init
LNT: func: gpmc_init line:81
LNT: func: gpmc_init line:103
LNT: func: gpmc_init line:133
gpmc_cfg address: 0x80a00000
gpmc_cfg address: 0x50000000
gpmc_cfg->sysconfig address: 0x50000010
gpmc_cfg->irqstatus address: 0x50000018
gpmc_cfg->irqenable address: 0x5000001c
LNT: func: gpmc_init line:141
LNT: func: gpmc_init line:143
LNT: func: gpmc_init line:145
LNT: func: gpmc_init line:148
LNT: func: gpmc_init line:154
LNT: func: enable_gpmc_cs_config line:56
LNT: func: enable_gpmc_cs_config line:70
LNT: func: gpmc_init line:164
LNT: func: spl_board_init line:192
LNT: func: spl_board_init line:195
LNT: func: spl_board_init line:210
LNT: func : [board_init_r] line [522]
LNT: func : [board_init_r] line [523] spl_boot_list[0]: [4194320]
LNT: func : [board_boot_order] line [218]
LNT: func: spl_boot_device line:168
LNT: func : [board_init_r] line [525] spl_boot_list[0]: [71]
Trying to boot from net
LNT: func : [spl_load_image] line [302]
Using default environment

himport_r: can't malloc 102 bytes
ERROR: Environment import failed: errno = 12

at ../common/env_common.c:123/set_default_env()
Initial value for argc=3
Final value for argc=3
## Can't malloc 4 bytes

 

##################################################

I appreciate your quick response on this.

Thanks & Regards

Ch. Siva

 

  • Hi,

    What is the Silicon Revision of your processor? Peripheral boot is not supported on SR1.1 devices. Please also check this wiki: processors.wiki.ti.com/.../Linux_Core_U-Boot_User's_Guide
  • Hi Biser,

    Thanks for the suggestion.

    I am using the silicon revision 1.2 AM437x SOC processor on my custom board. 

    I am able to load and boot from the Am437x-GP-EVM development platform, but on custom platform I am facing the issue which I have mentioned earlier.

    Both AM437x-GP-EVM and custom board has same silicon revision 1.2.

    I would like to understand what is the issue on the custom board.

    Your support on is very much appreciated.

    Thanks & Regards

    Ch. Siva

  • Is your Ethernet hardware and connections identical to the EVM? Have you configured your DDR correctly as described here: processors.wiki.ti.com/.../AM437x_DDR_Configuration_and_Programming_Guide
  • Hi Biser,
    Yes we are using the Ethernet hardware and connections as same as EVM.
    We have done DDR configurations as described in the link.

    Thanks & Regards
    Ch. Siva
  • Ch. Siva,

    It looks like you are running out of environment space.

    Can you try increasing CONFIG_ENV_SIZE in include/configs/am43xx_evm.h?

  • Ch. Siva,

    You can also try increasing CONFIG_SYS_MALLOC_LEN in include/configs/ti_armv7_common.h if the above doesn't completely solve the problem.
  • Hi Ron,

    Thanks for your suggestions.

    I have tried your inputs but it was not success and observing the same issue.

    To summarize our debug points on this issue.

    1. From the SPL code we came to know that the malloc allocation address are between   0x80a80000-0x81a80000 of SRDAM memory.

    2. From the log we were able to see the sdram_init execution.

    3. Here heap(malloc) locations are larger than which we are trying to allocate in  the code to save environment variables.

    4. when we see the malloc pointer address of the variable it shown as 0x00000000 as shown below. But when we see on EVM this address is valid i.e "0x80a80008"

    LNT: func : [himport_r] line [807] data malloc pointer: [00000000]

     We would like to understand the reason for fail malloc from the SPL code

    I am attaching the debug log with more debug prints. Please have a look and let us know your valuable inputs on this.

    U-Boot SPL 2016.05-00230-g5bf448d-dirty (Sep 01 2016 - 16:08:21)
    
    LnT: debug func: preload_console_init
    LNT: func: board_init_f line:367
    LNT: func: sdram_init line:663
    LNT: func: config_ddr line:111
    LNT: func: ddr_pll_config line:104
    LNT: func: config_vtp line:86
    LNT: func: config_vtp line:98
    LNT: func: config_cmd_ctrl line:328
    LNT: func: config_ddr_data line:349
    LNT: func: config_io_ctrl line:374
    LNT: func: config_io_ctrl line:378
    LNT: func: config_io_ctrl line:385
    LNT: func: config_io_ctrl line:391
    LNT: func: config_ddr line:140
    LNT: func: config_ddr_phy line:293
    LNT: func: config_ddr_phy line:320
    LNT: func: set_sdram_timings line:187
    LNT: func: set_sdram_timings line:194
    LNT: func: config_ddr line:155
    LNT: func: config_ddr line:161
    LNT: func: sdram_init line:696
    LNT: func: board_init_f line:369
    >>spl:board_init_r()
    using memory 0x80a80000-0x81a80000 for malloc()
    spl_init()
    LNT: func: save_omap_boot_params line:31
    LNT: func: save_omap_boot_params line:38
    LNT: func: spl_board_init line:188
    LNT debug spl_board_init
    LNT: func: gpmc_init line:81
    LNT: func: gpmc_init line:103
    LNT: func: gpmc_init line:114 base is [0x08000000]
    LNT: func: gpmc_init line:115 size is [0x0000000f]
    LNT: func: gpmc_init line:135
    gpmc_cfg address: 0x80a00000
    gpmc_cfg address: 0x50000000
    gpmc_cfg->sysconfig address: 0x50000010
    gpmc_cfg->irqstatus address: 0x50000018
    gpmc_cfg->irqenable address: 0x5000001c
    LNT: func: gpmc_init line:143
    LNT: func: gpmc_init line:145
    LNT: func: gpmc_init line:147
    LNT: func: gpmc_init line:150
    LNT: func: gpmc_init line:156
    LNT: func: enable_gpmc_cs_config line:56
    LNT: func: enable_gpmc_cs_config line:70
    LNT: func: gpmc_init line:166
    LNT: func: spl_board_init line:192
    LNT: func: spl_board_init line:195
    LNT: func: spl_board_init line:210
    LNT: func : [board_init_r] line [544]
    LNT: func : [board_init_r] line [545] spl_boot_list[0]: [-868218572]
    LNT: func : [board_boot_order] line [218]
    LNT: func: spl_boot_device line:168
    LNT: func : [board_init_r] line [547] spl_boot_list[0]: [71]
    Trying to boot from net
    LNT: func : [spl_load_image] line [302]
    LNT: func : [spl_load_image] line [340]
    LNT: func : [spl_net_load_image] line [19]
    LNT: func : [spl_net_load_image] line [21] gd pointer is [4033fe80]
    LNT: func : [env_relocate] line [265]
    LNT: func : [set_default_env] line [100]
    Using default environment
    
    LNT: func : [himport_r] line [790]
    himport_r: can't malloc 102 bytes
    LNT: func : [himport_r] line [807] data malloc pointer: [00000000]
    ERROR: Environment import failed: errno = 12
    
    at ../common/env_common.c:125/set_default_env()
    LNT: func : [set_default_env] line [128]
    LNT: func : [env_relocate] line [276]
    LNT: func : [setenv] line [305]
    LNT: func : [_do_env_set] line [216]
    Initial value for argc=3
    Final value for argc=3
    LNT: func : [_do_env_set] line [243]
    LNT: func : [_do_env_set] line [252]
    LNT: func : [_do_env_set] line [259]
    LNT: func : [_do_env_set] line [266]
    ## Can't malloc 4 bytes
    LNT: func : [spl_net_load_image] line [26]
    LNT: func : [spl_net_load_image] line [28]
    LNT: func : [spl_net_load_image] line [29]
    LNT: func : [eth_initialize] line [239]
    LNT: func : [eth_initialize] line [244]
    LNT: func : [eth_initialize] line [246]
    LNT: func : [eth_initialize] line [252]
    LNT: func : [board_eth_init] line [924]
    LNT: func : [board_eth_init] line [931]
    LNT: func : [board_eth_init] line [933]
    LNT: func : [board_eth_init] line [941]
    LNT: func : [hsearch_r] line [278]

    Thanks & Regards

    Ch. Siva