diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2011-09-29 15:41:00 -0500 |
---|---|---|
committer | MATTHEW S. BARTH <msbarth@us.ibm.com> | 2011-10-03 12:23:53 -0500 |
commit | 485bb5c0e6d2c7c5df6560a996dc264e94f2058a (patch) | |
tree | b37ba44ba2c58d254b5c81014bca89d81bf624e7 /src/kernel/ptmgr.C | |
parent | 6f6bf3c72022e14c1b9c7637e1b36bbfe48c8924 (diff) | |
download | talos-hostboot-485bb5c0e6d2c7c5df6560a996dc264e94f2058a.tar.gz talos-hostboot-485bb5c0e6d2c7c5df6560a996dc264e94f2058a.zip |
Fix TLBie bug
Change-Id: Iacedac6d963fcc754d4ef595d4512be35b0bbc59
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/392
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/kernel/ptmgr.C')
-rw-r--r-- | src/kernel/ptmgr.C | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/kernel/ptmgr.C b/src/kernel/ptmgr.C index 92d211888..6de8ac31d 100644 --- a/src/kernel/ptmgr.C +++ b/src/kernel/ptmgr.C @@ -672,7 +672,7 @@ void PageTableManager::writePTE( PageTableEntry* i_pte, asm volatile("ptesync" ::: "memory"); // tlbie, eieio, tlbsync, ptesync - invalidateTLB(i_pte); + invalidateTLB(i_dest); // if we're removing an entry we can ignore the other fields if( i_valid ) @@ -987,11 +987,15 @@ void PageTableManager::invalidateTLB( PageTableEntry* i_pte ) if( ivTABLE == NULL ) { + // TLBIE's AVA is 14:65 of the original VA (!= pte->AVA) + uint64_t tlbie_ava = EXTRACT_RJ_LEN( + getVirtAddrFromPTE(i_pte), 78, 14, 65 ); + /*invalidate old translation*/ //tlbie(old_B,old_VA[14:77-b],old_L,old_LP,old_AP,old_LPID); // TLBIE isn't correct in gcc, hand code asm. register uint64_t rS = 0, rB = 0; - rB = (i_pte->AVA * 0x000FFFFFFFFFFFFF) << 12; // Put in rB[0:51] + rB = (tlbie_ava & 0x000FFFFFFFFFFFFF) << 12; // Put in rB[0:51] rB |= 0x0100; // B = 01 (1TB). asm volatile(".long 0x7c000264 | (%0 << 11) | (%1 << 21)" :: "r"(rB), "r"(rS) : "memory"); |