AnsweredAssumed Answered

iMX6 NAND booting - only partly working?

Question asked by Stefan Roese on Mar 19, 2013
Latest reply on Jul 1, 2014 by Yixing Kong
Branched to a new discussion

Hi!

 

I'm currently working on NAND booting support for an i.MX6 board. Using kobs-ng tools to flash the tables (FCB/DBBT) and the U-Boot image. This seems to work quite good now. I can see (via JTAG debugger) that the SDRAM is being initialized correctly (IVT header is executed) and the bootrom loads at least one page from NAND to the destination location (0x17800000). But only partly. One page (2k) is always read completely. But most of the time only one page. Sometimes, parts of the 2nd page are also read. I can distinguish this, since I'm pre-setting the SDRAM content to 0x55 before booting via NAND.

 

Here a log via JTAG debugger after hangup in the bootrom:

 

#0>h

    Core number       : 0

    Core state        : debug mode (THUMB)

    Debug entry cause : Debug Request

    Current PC        : 0x00000fb8

    Current CPSR      : 0x400001f3 (Supervisor)

#0>md 0x17800000

17800000 : ea000014 e59ff014 e59ff014 e59ff014  ................

17800010 : e59ff014 e59ff014 e59ff014 e59ff014  ................

17800020 : 178001a0 17800200 17800260 178002c0  ........`.......

17800030 : 17800320 17800380 178003e0 12345678   ...........xV4.

17800040 : 17800000 0004390c 0004390c 0008670c  .....9...9...g..

17800050 : 0004a6dc 0badc0de eb000040 e10f0000  ........@.......

17800060 : e3c0001f e38000d3 e129f000 ee110f10  ..........).....

17800070 : e3c00a02 ee010f10 e59f03a8 ee0c0f10  ................

17800080 : eb000037 eb000044 eb000604 e1a04000  7...D........@..

17800090 : e1a05001 e1a06002 e24f00a0 e1500006  .P...`....O...P.

178000a0 : 03a09000 0a000022 e1a01006 e51f306c  ....".......l0..

178000b0 : e0802003 e8b00600 e8a10600 e1500002  . ............P.

178000c0 : 3afffffb e51f008c e0469000 e59fa06c  ...:......F.l...

178000d0 : e08aa000 e59f205c e0822000 e59f3058  ....\ ... ..X0..

178000e0 : e0833000 e5920000 e0800009 e5921004  .0..............

178000f0 : e20170ff e3570017 0a000007 e3570002  .p....W.......W.

#0>md 0x17800800

17800800 : e582304c e5823050 e12fff1e 0207c000  L0..P0..../.....

17800810 : 77777777 0217c000 e59f3040 e92d4010  wwww....@0...@-.

17800820 : e5934140 e3500fb5 93a00000 9a000006  @A....P.........

17800830 : e30035aa e1500003 83a0001f 8a000002  .5....P.........

17800840 : e2400faf e3a01019 eb00cd71 e3c4471f  ..@.....q....G..

17800850 : e1840900 e59f3004 e5830140 e8bd8010  .....0..@.......

17800860 : 020c8000 e92d4008 ebffffd4 e3a00e4b  .....@-.....K...

17800870 : ebffffe8 eb005fb3 e3a00000 e8bd8008  ....._..........

17800880 : ea0006cf e59f3030 e5932630 e1a00422  ....00..0&.."...

17800890 : e5c12001 e5c10000 e5933620 e1a02c23  . ...... 6..#,..

178008a0 : e5c13005 e5c12002 e1a02823 e5c12003  .0... ..#(... ..

178008b0 : e1a02423 e5c12004 e12fff1e 021bc000  #$... ..../.....

178008c0 : e59f3018 e5830040 e5932044 e3500000  .0..@...D ....P.

178008d0 : 13822201 03c22201 e5832044 e12fff1e  ."..."..D ..../.

178008e0 : 020d8000 e92d4008 e59f3078 e5932000  .....@-.x0... ..

178008f0 : e592301c e5921024 e3500003 979ff100  .0..$.....P.....

#0>md

17800900 : ea000011 17800914 17800920 1780092c  ........ ...,...

17800910 : 17800938 e7e215d1 e2033801 ea000007  8........8......

17800920 : e7e21851 e2033802 ea000004 e7e219d1  Q....8..........

17800930 : e2033701 ea000001 e7e21b51 e2033702  .7......Q....7..

17800940 : e3530000 0a000001 ea000002 e3a01000  ..S.............

17800950 : e59f0014 ea000000 e59f0010 e2811001  ................

17800960 : 55555555 55555555 55555555 55555555  UUUUUUUUUUUUUUUU

17800970 : 55555555 55555555 55555555 55555555  UUUUUUUUUUUUUUUU

17800980 : e5934014 eb000272 e7e11454 e2811001  .@..r...T.......

17800990 : eb00cd1f e8bd8010 178404c8 e3500003  ..............P.

178009a0 : 979ff100 ea000022 178009b8 178009d0  ...."...........

178009b0 : 178009e8 17800a0c e59f3084 e5932000  .........0... ..

178009c0 : e3a03901 e7920003 e7e500d0 ea00000c  .9..............

178009d0 : e59f306c e5932000 e3043030 e7920003  l0... ..00......

178009e0 : e2000001 ea000004 e59f3054 e5932000  ........T0... ..

178009f0 : e3043010 e7920003 e2000003 e1a00080  .0..............

#0>md

17800a00 : e2800014 e59f303c ea000007 e59f3030  ....<0......00..

17800a10 : e5932000 e30430e0 e7920003 e2000003  . ...0..........

17800a20 : e3500003 0a000004 e59f301c e0000093  ..P......0......

17800a30 : e12fff1e e3a00000 e12fff1e e59f000c  ../......./.....

17800a40 : e12fff1e 178404c8 016e3600 02faf080  ../......6n.....

17800a50 : 07735940 e59f3018 e3500000 e5933000  @Ys..0....P..0..

17800a60 : e5932080 13822003 03c22003 e5832080  . ... ... ... ..

17800a70 : e12fff1e 178404c8 e3510002 8a00000c  ../.......Q.....

17800a80 : e59f3034 e1a01081 e2811006 e3a02003  40........... ..

17800a90 : e1a02112 e3500000 e5933000 e3a00000  .!....P..0......

17800aa0 : e5931070 11822001 01c12002 e5832070  p.... ... ..p ..

17800ab0 : e12fff1e e3e00015 e12fff1e 178404c8  ../......./.....

17800ac0 : 55555555 55555555 55555555 55555555  UUUUUUUUUUUUUUUU

17800ad0 : 55555555 55555555 55555555 55555555  UUUUUUUUUUUUUUUU

17800ae0 : 03a00002 0a00000f e2400001 e59f304c  ..........@.L0..

17800af0 : e3500001 91a00003 83a00000 e12fff1e  ..P.........../.


As you can see, some 32 byte blocks are still filled with 0x55!

 

Any ideas what could cause this partly reading of the u-boot image into SDRAM?

 

BTW: I'm testing this NAND booting via the "bmode" command of mainline U-Boot. This writes the new boot_cfg[] value to GPR9[25:0] which will be written to SBMR1 upon the next reset, which will determine the boot device.

 

And sorry for the long post.

 

Thanks,

Stefan

Outcomes