AnsweredAssumed Answered

TLB not working

Question asked by Mathias Edman on May 1, 2019
Latest reply on May 6, 2019 by David Tosenovjan

Hi,

 

I am playing around with TLB for MPC5777C. Booting from internal flash it looks like this:

 

Default TLB entries

 

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
tlbwe

 

This 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
tlbwe

 

Using 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 

Outcomes