2008-06-12 10:30:35     Error Occurring on Kernel booting (BF561)

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

2008-06-12 10:30:35     Error Occurring on Kernel booting (BF561)

Björn Höper (GERMANY)

Message: 57142   

 

Hi,

 

I made U-Boot load the images over the tftp Protocol by setting the IP Addresses manually preconfigured in the config file. But when I attempt to boot the ELF File an error occurs directly after the start. I tried to recompile the Kernel after doing a make mrproper and left all settings defaulted but the same error occurs. Here is the output from the Board:

 

 

 

U-Boot 1.1.6 (ADI-2008R1) (Jun 11 2008 - 12:19:26)

 

CPU:   ADSP bf561-0.5 (Detected Rev: 0.5)

Board: ADI BF561 EZ-Kit Lite board

       Support: http://blackfin.uclinux.org/

Clock: VCO: 600 MHz, Core: 600 MHz, System: 75 MHz

RAM:   64 MB

Flash:  8 MB

*** Warning - bad CRC, using default environment

 

In:    serial

Out:   serial

Err:   serial

Net:   SMC91111 at 0x2C010300

Hit any key to stop autoboot:  0

bfin> tftp 0x01 linux.initramfs

TFTP from server 134.130.232.34; our IP address is 134.130.232.135

Filename 'linux.initramfs'.

Load address: 0x1

Loading: #################################################################

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

         #########

done

Bytes transferred = 7363497 (705ba9 hex)

bfin> bootelf 0x01

 

 

Ack! Something bad happened to the Blackfin!

 

SEQUENCER STATUS:

SEQSTAT: 00000024  IPEND: 3fc00c4  SYSCFG: 0032

  HWERRCAUSE: 0x0

  EXCAUSE   : 0x24

  physical IVG6 asserted : <0x03fc0568> { _evt_default + 0x0 }

  physical IVG7 asserted : <0x03fc0568> { _evt_default + 0x0 }

RETE: <0x0c2c8b13> { ___smulsi3_highpart + 0x82f667b }

RETN: <0x142a9804> { ___smulsi3_highpart + 0x102d736c }

RETX: <0x03fc74ce> { _valid_elf_image + 0xe }

RETS: <0x03fc7782> { _do_bootelf + 0x2a }

PC  : <0x03fc00c4> { _start + 0xc4 }

DCPLB_FAULT_ADDR: <0x00000000> /* Maybe null pointer? */

ICPLB_FAULT_ADDR: <0x03fc74ce> { _valid_elf_image + 0xe }

 

PROCESSOR STATE:

R0 : 00000001    R1 : 464c457f    R2 : 00000000    R3 : 00000000

R4 : 00000000    R5 : 00000000    R6 : 00000000    R7 : 00000001

P0 : 00000010    P1 : 03f9bcc8    P2 : 00000001    P3 : 00000002

P4 : 03fdaef4    P5 : 03f9c000    FP : 03f9bcc8    SP : 03f9baa0

LB0: 03fd2460    LT0: 03fd2454    LC0: 00000000

LB1: 03fcd9e2    LT1: 03fcd9e0    LC1: 00000000

B0 : eb155d33    L0 : 00000000    M0 : 65577ed5    I0 : 00000001

B1 : d907ebcb    L1 : 00000000    M1 : d59bbb86    I1 : 03fddd4e

B2 : fde77dca    L2 : 00000000    M2 : c83779f6    I2 : 19df5cc7

B3 : b9df5cce    L3 : 00000000    M3 : cd8f77c1    I3 : 89dd7e83

A0.w: 2f32c9c7   A0.x: 00000000   A1.w: 00002ed8   A1.x: 00000000

USP : 8bff8483  ASTAT: 02001025

 

Hardware Trace:

   0 Target : <0x03fc0a24> { _bfin_panic + 0x0 }

     Source : <0x03fc0be8> { _trap_c + 0x188 }

   1 Target : <0x03fc0be0> { _trap_c + 0x180 }

     Source : <0x03fc0a7a> { _trap_c + 0x1a }

   2 Target : <0x03fc0a60> { _trap_c + 0x0 }

     Source : <0x03fc050e> { _trap + 0x56 }

   3 Target : <0x03fc04b8> { _trap + 0x0 }

     Source : <0x03fc74cc> { _valid_elf_image + 0xc }

   4 Target : <0x03fc74c0> { _valid_elf_image + 0x0 }

     Source : <0x03fc777e> { _do_bootelf + 0x26 }

   5 Target : <0x03fc777a> { _do_bootelf + 0x22 }

     Source : <0x03fcd508> { _simple_strtoul + 0x88 }

   6 Target : <0x03fcd504> { _simple_strtoul + 0x84 }

     Source : <0x03fcd500> { _simple_strtoul + 0x80 }

   7 Target : <0x03fcd4fe> { _simple_strtoul + 0x7e }

     Source : <0x03fcd4dc> { _simple_strtoul + 0x5c }

   8 Target : <0x03fcd4b8> { _simple_strtoul + 0x38 }

     Source : <0x03fcd4e0> { _simple_strtoul + 0x60 }

   9 Target : <0x03fcd4b8> { _simple_strtoul + 0x38 }

     Source : <0x03fcd4e0> { _simple_strtoul + 0x60 }

  10 Target : <0x03fcd4de> { _simple_strtoul + 0x5e }

     Source : <0x03fcd4b6> { _simple_strtoul + 0x36 }

  11 Target : <0x03fcd49e> { _simple_strtoul + 0x1e }

     Source : <0x03fcd558> { _simple_strtoul + 0xd8 }

  12 Target : <0x03fcd536> { _simple_strtoul + 0xb6 }

     Source : <0x03fcd524> { _simple_strtoul + 0xa4 }

  13 Target : <0x03fcd51a> { _simple_strtoul + 0x9a }

     Source : <0x03fcd48e> { _simple_strtoul + 0xe }

  14 Target : <0x03fcd480> { _simple_strtoul + 0x0 }

     Source : <0x03fc7776> { _do_bootelf + 0x1e }

  15 Target : <0x03fc776e> { _do_bootelf + 0x16 }

     Source : <0x03fc7760> { _do_bootelf + 0x8 }

 

Please reset the board

 

### ERROR ### Please RESET the board ###

 

 

Any ideas what is going wrong??

 

 

 

Thanks for the help

 

 

 

Björn

 

 

 

P.S.: The output is from a build where I configured the Kernel to reconfigure the Clock dividers on startup, but it also did not work without this feature set.

TranslateQuoteReplyEditDelete

 

 

2008-06-12 10:39:36     Re: Error Occurring on Kernel booting (BF561)

Mike Frysinger (UNITED STATES)

Message: 57143   

 

you cant load an ELF file to the same exact memory region that it gets loaded into

QuoteReplyEditDelete

 

 

2008-06-12 11:26:16     Re: Error Occurring on Kernel booting (BF561)

Björn Höper (GERMANY)

Message: 57152   

 

Hi,

 

 

 

I tried to copy the image into other memory locations for example 0x2000000 ro 0x3000000, when I then try to bootelf the stuff the image can`t be found? What am I doing wrong?? Normally the memory address range should be from 0x0 to 0x3FFFFFF, or is this not the case?

 

 

 

Thanks for the help

 

 

 

Björn

TranslateQuoteReplyEditDelete

 

 

2008-06-12 11:34:56     Re: Error Occurring on Kernel booting (BF561)

Mike Frysinger (UNITED STATES)

Message: 57154   

 

please post actual commands/output ... no point in me trying to guess at what you're attempting

 

i dont know what memory range you're referring to

QuoteReplyEditDelete

 

 

2008-06-12 11:44:49     Re: Error Occurring on Kernel booting (BF561)

Björn Höper (GERMANY)

Message: 57157   

 

Hi,

 

here is the in-/output. Sorry!

 

bfin> tftp 0x2000000 linux.initramfs

TFTP from server 134.130.232.34; our IP address is 134.130.232.135

Filename 'linux.initramfs'.

Load address: 0x2000000

Loading: #### (...)

Bytes transferred = 7363497 (705ba9 hex)

bfin> bootelf 0x2000000

## No elf image at address 0x02000000

 

 

I was referring to the address range of the attached RAM.

 

 

 

Thanks

 

 

 

Björn

TranslateQuoteReplyEditDelete

 

 

2008-06-12 12:19:31     Re: Error Occurring on Kernel booting (BF561)

Mike Frysinger (UNITED STATES)

Message: 57160   

 

that is a bit odd ... you could try loading the ELF to address 0x0 and 0x2000000 and then using the u-boot cmp function to make sure they're the same

 

also, is there any reason you're using the ELF format of the kernel ?  the uImage format tends to be a lot smaller and easier to manage.

QuoteReplyEditDelete

 

 

2008-06-12 12:44:56     Re: Error Occurring on Kernel booting (BF561)

Björn Höper (GERMANY)

Message: 57165   

 

Hi,

 

unfortunately I cannot load the image to two different addresses because the enviroment variables are deleted after transferring one file, and they are restored, when resetting the board. There is no particular reason, that I am using the ELF File, but when I use the uImage file I get an Bad magic number error.

 

Thanks

 

 

 

Björn

TranslateQuoteReplyEditDelete

 

 

2008-06-12 12:50:23     Re: Error Occurring on Kernel booting (BF561)

Mike Frysinger (UNITED STATES)

Message: 57167   

 

then do a crc32 on the board and on your host to make sure the files are the same

 

please also run the 'mtest' command

QuoteReplyEditDelete

 

 

2008-06-13 02:58:53     Re: Error Occurring on Kernel booting (BF561)

Björn Höper (GERMANY)

Message: 57203   

 

Hi,

 

 

 

the CRC checksums are not the same on the board and on the Host. Is the count parameter for the CRC Calculation in bytes? Memory Checking went OK so far, but it is still running.

 

 

 

Björn

TranslateQuoteReplyEditDelete

 

 

2008-06-13 10:10:11     Re: Error Occurring on Kernel booting (BF561)

Björn Höper (GERMANY)

Message: 57237   

 

Hi,

 

 

 

I investigated the error a bit further and just transferred a plain Text file with the content "abcd" to the board when I transfer it to address 0x1000000 the ouput of the memory display is the following:

 

01000000: 646333cc 33cc33cc 33cc33cc 33cc33cc    .3cd.3.3.3.3.3.3

 

Transferring it to 0x100001 results in:

 

01000000: 636233cc 33cc33cc 33cc33cc 33cc33cc    .3bc.3.3.3.3.3.3

 

and a transfer to 0x1000002 brings up this:

 

01000000: 626133cc 33cc33cc 33cc33cc 33cc33cc    .3ab.3.3.3.3.3.3

 

 

I always disconnected the board from the power supply, so that the memory content is completely random. So only two characters are transferred into the memory. Maybe this helps to investigate the problem somehow.

 

 

 

Thanks for the help

 

 

 

Björn

TranslateQuoteReplyEditDelete

 

 

2008-06-13 16:45:50     Re: Error Occurring on Kernel booting (BF561)

Mike Frysinger (UNITED STATES)

Message: 57269   

 

yeah that's most definitely wrong ...

 

do you get the same results loading into the start of memory ?  what about using "mw" and "cp" ?

 

here's what i see with a 5 byte file (abcd\n):

 

bfin> mw.b 01000000 ff 1000

bfin> md.b 01000000 10

01000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

bfin> tftpboot 01000000 test.txt

TFTP from server 192.168.0.2; our IP address is 192.168.0.15

Filename 'test.txt'.

Load address: 0x1000000

Loading: #

done

Bytes transferred = 5 (5 hex)

bfin> md.b 01000000 10

01000000: 61 62 63 64 0a ff ff ff ff ff ff ff ff ff ff ff    abcd............

bfin> tftpboot 01000001 test.txt

TFTP from server 192.168.0.2; our IP address is 192.168.0.15

Filename 'test.txt'.

Load address: 0x1000001

Loading: #

done

Bytes transferred = 5 (5 hex)

bfin> md.b 01000000 10

01000000: 61 61 62 63 64 0a ff ff ff ff ff ff ff ff ff ff    aabcd...........

bfin> tftpboot 01000002 test.txt

TFTP from server 192.168.0.2; our IP address is 192.168.0.15

Filename 'test.txt'.

Load address: 0x1000002

Loading: #

done

Bytes transferred = 5 (5 hex)

bfin> md.b 01000000 10

01000000: 61 61 61 62 63 64 0a ff ff ff ff ff ff ff ff ff    aaabcd..........

QuoteReplyEditDelete

 

 

2008-06-16 02:38:06     Re: Error Occurring on Kernel booting (BF561)

Björn Höper (GERMANY)

Message: 57321   

 

Hi,

here are the results with a memory write followed by a tftp transfer of the 4 byte Text file with content "abcd"

 

bfin> mw.b 0x1000000 ff 0x1000

bfin> md.b 0x1000000

01000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

 

(...)

 

bfin> tftp 0x1000000 Test

TFTP from server 134.130.232.34; our IP address is 134.130.232.135

Filename 'Test'.

Load address: 0x1000000

Loading: T #

done

Bytes transferred = 4 (4 hex)

bfin> md.b 0x1000000

01000000: 44 17 63 64 ee 37 ff ff de 23 ff ff ee 12 ff ff    D.cd.7...#......

 

so it is completely weird stuff occuring here.

 

In the lower memory regions it's nearly the same

 

bfin> mw.b 0x0 ff 0x1000

bfin> md.b 0x0

00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

(...)

 

 

bfin> md.b 0x0

00000000: ca b1 63 64 cf 32 ff ff 5c 13 ff ff 4c 2b ff ff    ..cd.2..\...L+..

 

Thanks for your help

 

Björn

TranslateQuoteReplyEditDelete

 

 

2008-06-16 02:51:00     Re: Error Occurring on Kernel booting (BF561)

Björn Höper (GERMANY)

Message: 57322   

 

Hi,

 

here is the output from a greater memory area, so you can see that the write gets corrupted somehow

 

bfin> mw.b 0x1000000 63 0x1000

bfin> md 0x1000000

01000000: 63636363 63636363 63636363 63636363    cccccccccccccccc

01000010: 63636363 63636363 63636363 63636363    cccccccccccccccc

01000020: 63636363 63636363 63636363 63636363    cccccccccccccccc

01000030: 63636363 63636363 63636363 63636363    cccccccccccccccc

01000040: 63636363 63636363 63636363 63636363    cccccccccccccccc

01000050: 63636363 63636363 63636363 63636363    cccccccccccccccc

01000060: 6363335c 636337cd 636313cc 636373cc    \3cc.7cc..cc.scc

01000070: 63631994 636331ec 6363b3c4 6363334c    ..cc.1cc..ccL3cc

01000080: 636337dd 63632371 636333ce 636333cc    .7ccq#cc.3cc.3cc

01000090: 63633fc9 6363b3d0 6363326f 636333d8    .?cc..cco2cc.3cc

010000a0: 63636363 63636363 63636363 63636363    cccccccccccccccc

010000b0: 63636363 63636363 63636363 63636363    cccccccccccccccc

010000c0: 63636363 63636363 63636363 63636363    cccccccccccccccc

010000d0: 63636363 63636363 63636363 63636363    cccccccccccccccc

010000e0: 63636363 63636363 63636363 63636363    cccccccccccccccc

010000f0: 63636363 63636363 63636363 63636363    cccccccccccccccc

 

 

Thanks for the help

 

 

 

Björn

TranslateQuoteReplyEditDelete

 

 

2008-06-16 04:01:32     Re: Error Occurring on Kernel booting (BF561)

Björn Höper (GERMANY)

Message: 57325   

 

Hi,

 

 

 

i did some other Tests i wrote the memory after a reset/power off and after writing ff to addresses 0x0 to 0x1000 to two text files after doing a diff with both you can see taht some memory areas are not changed anyhow. I attached the two textfiles with the memory dump.

 

What do you think?? I think that it is quite likely a hardware fault.

 

 

 

Thanks for your help

 

 

 

Björn

 

Memory after Reset

memory at 100Mhz

TranslateQuoteReplyEditDelete

 

 

2008-06-16 04:08:29     Re: Error Occurring on Kernel booting (BF561)

Mike Frysinger (UNITED STATES)

Message: 57328   

 

yes, it would appear to be a hardware issue, or the clocks are not programmed properly for the memory.  but since all bf561-ezkit's should be using the same memory parts ...

 

where did you get said board ?

QuoteReplyEditDelete

 

 

2008-06-16 04:18:31     Re: Error Occurring on Kernel booting (BF561)

Björn Höper (GERMANY)

Message: 57330   

 

Hi,

 

 

 

i bought it from Spoerle Elektronik a official ADI Distributor about a week ago.

 

 

 

Thanks

 

Björn

TranslateQuoteReplyEditDelete

 

 

2008-06-30 11:45:37     Re: Error Occurring on Kernel booting (BF561)

Björn Höper (GERMANY)

Message: 58128   

 

Hi,

 

I found out, that the Hardware is not defect, because I am able to writr correctly to the Memory on the board when I am using VDSP. So the questioon is, what is going wrong on the software side. I found out, that the memorty gets corrupted not while directly writing to it, but later when the Memory in the "higher" regions is written. So the memory at address 0x60 gets corrupted, when I am writing to address 0x860. So it is a really weird bug somewhere. I really have no clue, what is going wrong. Below is the code that I modified to get tge address where evrything goes wrong. It is the loop, that exists in the do_mem_mw function in cmd_mem.c. It just adds some output and if the Content of the address 0x64 is changed after it has been written once.  So you need to use this file for test purposes with the u-boot command:

 

mw.b 0x0 0xff 0x1000

 

I also attached the complete C File with the modifications I made.

 

(..)

 

while (count-- > 0) {

        if (size == 4) {

        /* modified */

            *((uint *)addr) = writeval;

            printf("DWord wide:%#X\n", writeval, addr);

        //    *((ulong  *)addr) = (ulong )writeval;

        } else if (size == 2) {

            *((ushort *)addr) = writeval;

            printf("Word wide:%#X Addr:%#X\n", writeval, addr);

        //    *((ushort *)addr) = (ushort)writeval;

        } else {

            *((u_char *)addr) = writeval;

            printf("Byte wide:%#x Addr:%#x\n", writeval, addr);          

            uint cont60 = *((uint*)0x64);

            printf("On Addr 64: %#x \n", cont60);

            if ((cont60 != 0xffffffff) && (addr > 0x64)) {

                printf("Error on addr: %#x\n", addr);

                break;

            }

        //    *((u_char *)addr) = (u_char)writeval;

        }

        addr += size;

    }

 

(...)

 

 

 

Thanks for your help

 

 

 

Björn

 

cmd_mem.c

TranslateQuoteReplyEditDelete

 

 

2008-06-30 12:19:49     Re: Error Occurring on Kernel booting (BF561)

Mike Frysinger (UNITED STATES)

Message: 58129   

 

are you sure JTAG is able to read/modify things correctly ?  i would modify a region of memory via JTAG and then check it with software.  in other words, VDSP does caching and makes assumptions that everything is OK which may mask the issue.

 

but in the end, why not just your board replaced ?

QuoteReplyEditDelete

 

 

2008-07-01 02:35:47     Re: Error Occurring on Kernel booting (BF561)

Björn Höper (GERMANY)

Message: 58146   

 

Hi,

 

we had some issues, because if we had returned the board without being really defective, we had to pay both boards, the new and the old one. So we needed to bes sure that there is really something wrong, today I got an E-Mail from an Analog Technician, saying that the SDRAM is corrupted. So you are right, that VDSP just masks the error. So now I will send back the board and wait for a new one, let´s see what happens then.

 

 

 

Thanks for your help so far

 

 

 

Björn

TranslateQuoteReplyEditDelete

 

 

2008-07-04 08:10:13     Re: Error Occurring on Kernel booting (BF561)

Björn Höper (GERMANY)

Message: 58349   

 

Hi,

 

 

 

we got our new board today and now everything works just fine.

 

 

 

Thanks for your help

 

 

 

Björn Höper

Outcomes