/* We have to run the search with interrupts disabled, otherwise *aninterruptwhichcausesaTLBmisscanclobbertheMMUCR *betweenthemtsprandthetlbsx. * *CriticalandMachineCheckinterruptstakecareofsaving *andrestoringMMUCR,soonlynormalinterruptshavetobe *takencareof.
*/
wrteei 0
mtspr SPRN_MMUCR,r5
tlbsx. r6,0,r3
bne 10f
sync
#ifndef CONFIG_PPC_47x /* On 440 There are only 64 TLB entries, so r3 < 64, which means bit *22,isclear.Since22istheVbitintheTLB_PAGEID,loadingthis *valuewillinvalidatetheTLBentry.
*/
tlbwe r6,r6,PPC44x_TLB_PAGEID
#else
oris r7,r6,0x8000 /* specify way explicitly */
clrrwi r4,r3,12/* get an EPN for the hashing with V = 0 */
ori r4,r4,PPC47x_TLBE_SIZE
tlbwe r4,r7,0/* write it */
#endif /* !CONFIG_PPC_47x */
isync 10: wrtee r10
blr
_GLOBAL(_tlbil_all)
_GLOBAL(_tlbil_pid)
#ifndef CONFIG_PPC_47x
li r3,0
sync
/* Load high watermark */
lis r4,tlb_44x_hwater@ha
lwz r5,tlb_44x_hwater@l(r4)
1: tlbwe r3,r3,PPC44x_TLB_PAGEID
addi r3,r3,1
cmpw 0,r3,r5
ble 1b
isync
blr
#else /* 476 variant. There's not simple way to do this, hopefully we'll *trytolimittheamountofsuchfullinvalidates
*/
mfmsr r11 /* Interrupts off */
wrteei 0
li r3,-1/* Current set */
lis r10,tlb_47x_boltmap@h
ori r10,r10,tlb_47x_boltmap@l
lis r7,0x8000 /* Specify way explicitly */
b 9f /* For each set */
1: li r9,4/* Number of ways */
li r4,0/* Current way */
li r6,0/* Default entry value 0 */
andi. r0,r8,1/* Check if way 0 is bolted */
mtctr r9 /* Load way counter */
bne- 3f /* Bolted, skip loading it */
2: /* For each way */
or r5,r3,r4 /* Make way|index for tlbre */
rlwimi r5,r5,16,8,15/* Copy index into position */
tlbre r6,r5,0/* Read entry */ 3: addis r4,r4,0x2000 /* Next way */
andi. r0,r6,PPC47x_TLB0_VALID /* Valid entry ? */
beq 4f /* Nope, skip it */
rlwimi r7,r5,0,1,2/* Insert way number */
rlwinm r6,r6,0,21,19/* Clear V */
tlbwe r6,r7,0/* Write it */ 4: bdnz 2b /* Loop for each way */
srwi r8,r8,1/* Next boltmap bit */ 9: cmpwi cr1,r3,255/* Last set done ? */
addi r3,r3,1/* Next set */
beq cr1,1f /* End of loop */
andi. r0,r3,0x1f /* Need to load a new boltmap word ? */
bne 1b /* No, loop */
lwz r8,0(r10) /* Load boltmap entry */
addi r10,r10,4/* Next word */
b 1b /* Then loop */ 1: isync /* Sync shadows */
wrtee r11
blr
#endif /* !CONFIG_PPC_47x */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.