So I was looking at this again, just trying to get a better understanding of things.
I made myself a HV image so I could save the TLB_RPN before and after.
0:
mfspr %r4, TLB_RPN
std %r4, 0x88(%r0)
std %r1, 0x90(%r0)
li %r4, 7
andc %r1, %r1, %r4
std %r1, 0x98(%r0)
mtspr TLB_RPN, %r1
ba 0x11C0
9:
The values I got were:
TLB_RPN Orig:
00 00 00 00 1f ff 00 80 -> 0000 0000 0000 0000 0000 0000 0000 0000 0001 1111 1111 1111 0000 0000 1000 0000
GPR_R1
00 00 00 00 1f ff 01 96 -> 0000 0000 0000 0000 0000 0000 0000 0000 0001 1111 1111 1111 0000 0001 1001 0110
TLB_RPN After
00 00 00 00 1f ff 01 90 -> 0000 0000 0000 0000 0000 0000 0000 0000 0001 1111 1111 1111 0000 0001 1001 0000
TLB_RPN After is the result of the
andc %r1, %r1, %r4
which is equivalent to:
0000 0000 0000 0000 0000 0000 0000 0000 0001 1111 1111 1111 0000 0001 1001 0110
&
1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1000
Now if I am understanding the TLB entries from the PowerISA e-Book. The only bits that is changing are:
61: Base SR -> Supervisor Read
62 SW1 Available for software use
What about this am I not understanding? Would you not want to change the Base Access Permission bits(56:61)?
It also says a lot about how the MSRpr bit has a lot to do with how the data is allowed. I don't have an MSR value so I'm not even sure what that value would be.