2011-07-13 11:24:21     Visual DSP Update 9 dxe File don't start with bootelf

Document created by Aaronwu Employee on Sep 25, 2013
Version 1Show Document
  • View in full screen mode

2011-07-13 11:24:21     Visual DSP Update 9 dxe File don't start with bootelf

Andreas Pankoke (GERMANY)

Message: 102393   

 

Hi,

 

I have a problem with a dxe file compiled with ADI update 9/9.1

 

I load the dxe file with u-boots tftp into SDRAM and boot the image using the bootelf command.

 

The application then hang up at:

 

## Starting application at 0xffa00000 ...

 

If I load the dxe with the JTAG emulator and start it everything is fine.

 

The same sources compiled with the older update 8 is working well (which means starting in u-boot with bootelf)

 

I'am using the latest u-boot (get via svn and compiled new):

 

U-Boot 2011.06-svn2704 (ADI-2011R1-pre) (Jul 11 2011 - 16:19:32)

bfin-uclinux-gcc (ADI-trunk/git-613986c) 4.3.5

GNU ld version 2.17

 

Any Ideas?

 

 

 

Thx

 

Andreas

QuoteReplyEditDelete

 

 

2011-07-13 13:49:09     Re: Visual DSP Update 9 dxe File don't start with bootelf

Mike Frysinger (UNITED STATES)

Message: 102395   

 

post the output of `bfin-elf-readelf -lS <dxe>`.  and post the output of "bootelf" under u-boot.

 

you could also connect with jtag after u-boot has loaded things and compare it to the DXE to see if things are missing.

QuoteReplyEditDelete

 

 

2011-07-14 04:28:17     Re: Visual DSP Update 9 dxe File don't start with bootelf

Andreas Pankoke (GERMANY)

Message: 102403   

 

Hi,

 

here are the output of bootelf:

 

I have loaded the image to 0x0

 

bfin> bootelf -p 0x0

## Starting application at 0xffa00000 ...

 

and the output of the bfin-elf-readelf -ls

 

file CLTOneOS_9.dxe.output

 

I have an older u-boot which is able to load and execute the image!!:

U-Boot 2008.10 (ADI-2009R1.1-rc1) (Sep 29 2010 - 16:03:50)

 

the bootelf out is:

 

uteos> bootelf 0x0

Loading phdr 0 to 0xffa00000 (49076 bytes)

Loading phdr 1 to 0xff80075c (14424 bytes)

Loading phdr 2 to 0xff800758 (4 bytes)

Loading phdr 3 to 0xff800000 (1880 bytes)

Loading phdr 4 to 0xff900000 (16308 bytes)

Loading phdr 5 to 0x01000000 (517652 bytes)

Loading phdr 6 to 0x0107e614 (0 bytes)

Loading phdr 7 to 0x03000000 (293728 bytes)

## Starting application at 0xffa00000 ...

 

In the new u-boot version:

 

U-Boot 2011.06-svn2704 (ADI-2011R1-pre) (Jul 11 2011 - 16:19:32)

bfin-uclinux-gcc (ADI-trunk/git-613986c) 4.3.5

GNU ld version 2.17

 

 

is no bootelf output of the loaded program headers!

 

Thx

Andreas

 

 

CLTOneOS_9.dxe.output

QuoteReplyEditDelete

 

 

2011-07-14 13:12:54     Re: Visual DSP Update 9 dxe File don't start with bootelf

Mike Frysinger (UNITED STATES)

Message: 102406   

 

i wanted to see -S, not -s, with readelf

 

could you post the DXE for me to try ?  if you dont want to do that, you could e-mail it to me directly and i can debug it on myside.

QuoteReplyEditDelete

 

 

2011-07-15 04:01:36     Re: Visual DSP Update 9 dxe File don't start with bootelf

Andreas Pankoke (GERMANY)

Message: 102430   

 

Hi,

 

 

 

sorry. Here is the -lS output

 

There are 21 section headers, starting at offset 0x7b2290:

 

Section Headers:

  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al

  [ 0]                   NULL            00000000 000000 000000 00      0   0  0

  [ 1] .strtab           STRTAB          00000000 000034 08a8fb 00      0   0  1

  [ 2] .symtab           SYMTAB          00000000 08a92f 10c6b0 10      1   1  1

  [ 3] .annotations      FINI_ARRAY      00000000 196fdf 086770 01      0   1  1

  [ 4] .debug_abbrev     FINI_ARRAY      00000000 21d74f 00ef7d 01      0   1  1

  [ 5] .debug_aranges    FINI_ARRAY      00000000 22c6cc 007170 01      0   1  1

  [ 6] .debug_info       FINI_ARRAY      00000000 23383c 3eae13 01      0   1  1

  [ 7] .debug_line       FINI_ARRAY      00000000 61e64f 0a7aa5 01      0   1  1

  [ 8] .debug_pubnames   FINI_ARRAY      00000000 6c60f4 011f08 01      0   1  1

  [ 9] L1_code           PROGBITS        ffa00000 6d7ffc 00bfb4 01 AXSxxo  0   1  1

  [10] L1_data_a         PROGBITS        ff80075c 6e3fb0 003858 01 ASxxo  0   1  1

  [11] L1_data_a_1       PROGBITS        ff800758 6e7808 000004 01 ASxxo  0   1  1

  [12] L1_data_a_tables  PROGBITS        ff800000 6e780c 000758 01 ASxxo  0   1  1

  [13] L1_data_b         PROGBITS        ff900000 6e7f64 003fb4 01 ASxxo  0   1  1

  [14] sdram0_bank1      PROGBITS        01000000 6ebf18 07e614 01 ASxxo  0   1  1

  [15] sdram0_bank1_bsz  NOBITS          0107e614 76a52c 10b720 01 ASxxxo  0   1  1

  [16] sdram0_bank3      PROGBITS        03000000 76a52c 047b60 01 AXSxxo  0   1  1

  [17] .processor        INIT_ARRAY      00000000 7b208c 000004 04      1   0  1

  [18] .attributes       STRTAB          00000000 7b2090 00005d 00      0   0  1

  [19] .linker_version   STRTAB          00000000 7b20ed 000038 00      0   0  1

  [20] .segmentInfo      <unknown>: d    00000000 7b2125 000168 18      1   0  1

Key to Flags:

  W (write), A (alloc), X (execute), M (merge), S (strings)

  I (info), L (link order), G (group), x (unknown)

  O (extra OS processing required) o (OS specific), p (processor specific)

 

Elf file type is EXEC (Executable file)

Entry point 0xffa00000

There are 8 program headers, starting at offset 8070616

 

Program Headers:

  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align

  LOAD           0x6d7ffc 0xffa00000 0xffa00000 0x0bfb4 0x0bfb4 RWE 0x1

  LOAD           0x6e3fb0 0xff80075c 0xff80075c 0x03858 0x03858 RWE 0x1

  LOAD           0x6e7808 0xff800758 0xff800758 0x00004 0x00004 RWE 0x1

  LOAD           0x6e780c 0xff800000 0xff800000 0x00758 0x00758 RWE 0x1

  LOAD           0x6e7f64 0xff900000 0xff900000 0x03fb4 0x03fb4 RWE 0x1

  LOAD           0x6ebf18 0x01000000 0x01000000 0x7e614 0x7e614 RWE 0x1

  LOAD           0x76a52c 0x0107e614 0x0107e614 0x00000 0x10b720 RWE 0x1

  LOAD           0x76a52c 0x03000000 0x03000000 0x47b60 0x47b60 RWE 0x1

 

Section to Segment mapping:

  Segment Sections...

   00     L1_code

   01     L1_data_a

   02     L1_data_a_1

   03     L1_data_a_tables

   04     L1_data_b

   05     sdram0_bank1

   06     sdram0_bank1_bsz

   07     sdram0_bank3

 

 

Iam using a Bluetechnix cm-bf527 board with 64MB SDRAM.

 

The modified PLL and SDRAM section in the config file for u-boot is:

 

...

 

/*

* Processor Settings

*/

#define CONFIG_BFIN_CPU             bf527-0.0

#define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_PARA

 

 

/*

* Clock Settings

*    CCLK = (CLKIN * VCO_MULT) / CCLK_DIV

*    SCLK = (CLKIN * VCO_MULT) / SCLK_DIV

*/

/* CONFIG_CLKIN_HZ is any value in Hz                    */

#define CONFIG_CLKIN_HZ            50000000

/* CLKIN_HALF controls the DF bit in PLL_CTL      0 = CLKIN        */

/*                                                1 = CLKIN / 2        */

#define CONFIG_CLKIN_HALF        1

/* PLL_BYPASS controls the BYPASS bit in PLL_CTL  0 = do not bypass    */

/*                                                1 = bypass PLL    */

#define CONFIG_PLL_BYPASS        0

/* VCO_MULT controls the MSEL (multiplier) bits in PLL_CTL        */

/* Values can range from 0-63 (where 0 means 64)            */

#define CONFIG_VCO_MULT            21

/* CCLK_DIV controls the core clock divider                */

/* Values can be 1, 2, 4, or 8 ONLY                    */

#define CONFIG_CCLK_DIV            1

/* SCLK_DIV controls the system clock divider                */

/* Values can range from 1-15                        */

#define CONFIG_SCLK_DIV            4

 

/* Decrease core voltage */

#define CONFIG_VR_CTL_VAL (VLEV_120 | CLKBUFOE | FREQ_1000)

 

 

/*

* Memory Settings

*/

#define CONFIG_MEM_ADD_WDTH    10

#define CONFIG_MEM_SIZE        64

 

#define CONFIG_EBIU_SDRRC_VAL    0x3f8

#define CONFIG_EBIU_SDGCTL_VAL    0x9111cd

 

 

....

 

I will email the dxe to: vapier.adi@gmail.com

 

Thank you

QuoteReplyEditDelete

 

 

2011-07-18 13:24:24     Re: Visual DSP Update 9 dxe File don't start with bootelf

Mike Frysinger (UNITED STATES)

Message: 102472   

 

the difference in output is expected.  i changed it from printf() to debug(), so you only get the "Loading xxx" type output if "#define DEBUG" is placed at the top of common/cmd_elf.c.

 

thinking about things a bit more, u-boot in the past would disable caches automatically.  it no longer does that (2010R1 did, 2011R1+ does not).  so if you're booting an ELF which is going to replace u-boot, you need to disable caches.  if your ELF doesnt do this for you, you can easily do:

dcache off; icache off; bootelf

 

see if that helps

 

you could also restore the automatic-turn-off-cache-when-executing-ELFs logic by copying arch/blackfin/lib/boot.c:do_go_exec() from the 2010R1 release to your board's own board/<boardname>/<boardname>.c file in the latest code.

QuoteReplyEditDelete

 

 

2011-07-19 05:35:04     Re: Visual DSP Update 9 dxe File don't start with bootelf

Andreas Pankoke (GERMANY)

Message: 102523   

 

Hi Mike,

 

I have disabled u-boot's  data and instruction cache in my Boot command before Bootelf.

 

Now everythings works fine!

 

Thank you

 

Andreas

Attachments

Outcomes