[U-Boot] tlb15_entry is set wrong in the 4K code when the MPC8572DS boots from nand flash

Scott Wood scottwood at freescale.com
Thu Feb 13 00:14:15 CET 2014


On Wed, 2014-02-12 at 23:41 +0100, Y fan wrote:
> Thank you for your reply.

Please don't top post and don't post in HTML.
> 
> u-boot 2014.01-rc3

v2014.01 has been released, BTW.
> 
> The board MPC8572DS could work well with the u-boot code.However, when
> I want to boot from the nand flash. There's something wrong.
> 
> 
>  I have modified the CS0 to nand flash. when I make the uboot code, I
> use the command " make distclean; make MPC8572DS_NAND".
> 
>  the create_init_ram_area in start.S:
> 
> It should create a tlb1_entry 15 in AS1, but instead it creates a
> tlb1_entry 15 for AS0 and have a wrong size(if the fifth bit of the
> tlb1_entry 15 value is for the AS.) According to the code, the size of
> this entry should be 1Mbyte. However the real one is 256Mbyte.
> 
This is the entry 15 code for NAND boot:

        create_tlb1_entry 15, \
                1, BOOKE_PAGESZ_1M, \
                CONFIG_SYS_MONITOR_BASE & 0xfff00000, MAS2_I|MAS2_G, \
                CONFIG_SYS_MONITOR_BASE & 0xfff00000, MAS3_SX|MAS3_SW|MAS3_SR,
                0, r6

The second parameter to the macro is AS, and the value is 1.

The macro passes that to the fourth parameter of FSL_BOOKE_MAS1(),
which shifts the value left to put it in the MAS1[TS] position.

I don't know what you mean by "the fifth bit of the tlb1_entry 15
value".

What makes you say it's 256M?  Are you dumping the TLB from some
debugger?  Are you sure you're dumping it at the right time?  Don't rely
on breakpoints.

What actual functional problem are you seeing?  Are you getting a TLB
exception?  If so, at what line of code, trying to access what address?

I can try NAND booting an mpc8572ds with recent code -- are you using
switches or FPGA register programming to select a NAND boot?  If the
latter, could you provide me with the instructions (there's no
"nandboot" env on this board, and the README doesn't say anything)?  It
would save me some time digesting the board manual.  I don't have
physical access so I can't use the switches.

> in the start_e500 in start.S:
> 
> there should be a tlb1_entry 2 (for e500 debugging) for AS0 , again
> when I tracing the execution of the code, I didn't find the tlb entry
> is constructed.

That isn't done in the SPL code (all the exception vector stuff is
skipped for size reasons).  There are other ways to debug.

-Scott





More information about the U-Boot mailing list