Hi,
I am playing around with TLB for MPC5777C. Booting from internal flash it looks like this:
So I remapped the TLB entry 1 by doing this:
e_lis r3, 0x1001
mtspr 624, r3
e_lis r4, 0xC000
e_or2i r4, 0x0400
mtspr 625, r4
e_lis r5, 0x0080
e_or2i r5, 0x0020
mtspr 626, r5
e_lis r6,0x0080
e_or2i r6, 0x003f
mtspr 627, r6
tlbweThis is all fine and I now have 256Kb of mapped virtual memory located at 0x00800000 to real memory at the same address. So in flash I only see this part of memory after the tlbwe instruction has been executed.
However, now I want to create a new TLB entry (5) so I did this:
e_lis r3, 0x1005
mtspr 624, r3
e_lis r4, 0xC000
e_or2i r4, 0x0400
mtspr 625, r4
e_lis r5, 0x00C0
e_or2i r5, 0x0020
mtspr 626, r5
e_lis r6,0x00C0
e_or2i r6, 0x003f
mtspr 627, r6
tlbweUsing my simple brain this should make the range 0x00C00000-0x00C3FFFF available as well but nothing is happening and I have tried with many different addresses. What am I doing wrong here?
Regards,
Mathias
If you are using the same startup as me, then it uses portion of cache for stack and it occupies TLB5:
I would recommend to show MMU table by the debugger to check what is real configuration during runtime.
Hi David,
Thanks again for helping me.
After more investigation I found that this has something to do with the fact that I am "debug stepping" through the instruction tlbwe. When I do this it does not seem to work.
However, if I am just running to a breakpoint below the function that is executing tlbwe instruction (or just below the instruction itself) then it always works.
I feel very confused about this. Perhaps you can try?
I would love to see the MMU table but I do not know if I can do this with my crappy debugger (not using Lauterbach unfortunately).
Regards,
Mathias
Even simple debuggers should be able to show MMU table, for instance PeMicro debugger presents it this way.