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

Hello,
The memory of the MPC8572DS can't be read correctly after the setup of the tlb1_entry in the 4K boot code.
And also in the create_init_ram code, the tlb1_entry15&14 are set to be in the address space 0 which are supposed to be used in the address space 1. There seems somthing wrong with the writing of the TLB entry. But I don't know why. Do anyone know the reason?
Thank you very much.
Y.Fan

On Thu, 2014-01-30 at 15:57 +0100, Y fan wrote:
Hello,
The memory of the MPC8572DS can't be read correctly after the setup of the tlb1_entry in the 4K boot code.
What specific memory location can't be read? What part of the code is failing?
What version of U-Boot are you running?
And also in the create_init_ram code, the tlb1_entry15&14 are set to be in the address space 0 which are supposed to be used in the address space 1. There seems somthing wrong with the writing of the TLB entry. But I don't know why. Do anyone know the reason?
If you mean create_init_ram_area in start.S, it is creating the entries in AS1. What do you see than indicates the contrary?
-Scott

Thank you for your reply.
u-boot 2014.01-rc3
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.
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.
cheers,
Y.Fan
2014-02-12 23:11 GMT+01:00 Scott Wood scottwood@freescale.com:
On Thu, 2014-01-30 at 15:57 +0100, Y fan wrote:
Hello,
The memory of the MPC8572DS can't be read correctly after the setup of
the
tlb1_entry in the 4K boot code.
What specific memory location can't be read? What part of the code is failing?
What version of U-Boot are you running?
And also in the create_init_ram code, the tlb1_entry15&14 are set to be
in
the address space 0 which are supposed to be used in the address space 1. There seems somthing wrong with the writing of the TLB entry. But I don't know why. Do anyone know the reason?
If you mean create_init_ram_area in start.S, it is creating the entries in AS1. What do you see than indicates the contrary?
-Scott

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
participants (2)
-
Scott Wood
-
Y fan