lhz r8,mpSpace(r31) ; Get the address space
lwz r11,lgpPcfg(r11) ; Get the page config
mfsdr1 r7 ; Get the hash table base/bounds
+
lwz r4,pmapResidentCnt(r28) ; Get the mapped page count
+ lwz r12,pmapResidentMax(r28) ; r12 = pmap->stats.resident_max
+ addi r4,r4,1 ; Bump up the mapped page count
+ stw r4,pmapResidentCnt(r28) ; Set the mapped page count
+ cmplw r12,r4 ; if pmap->stats.resident_max >= pmap->stats.resident_count
+ bge+ hamSkipMax ; goto hamSkipResMax
+ stw r4,pmapResidentMax(r28) ; pmap->stats.resident_max = pmap->stats.resident_count
- andi. r0,r24,mpType ; Is this a normal mapping?
+hamSkipMax: andi. r0,r24,mpType ; Is this a normal mapping?
rlwimi r8,r8,14,4,17 ; Double address space
rlwinm r9,r30,0,4,31 ; Clear segment
rlwimi r8,r8,28,0,3 ; Get the last nybble of the hash
rlwimi r10,r29,18,0,13 ; Shift EA[18:31] down to VSID (31-bit math works because of max hash table size)
rlwinm r7,r7,0,16,31 ; Isolate length mask (or count)
- addi r4,r4,1 ; Bump up the mapped page count
srw r9,r9,r11 ; Isolate just the page index
xor r10,r10,r8 ; Calculate the low 32 bits of the VSID
- stw r4,pmapResidentCnt(r28) ; Set the mapped page count
+
xor r9,r9,r10 ; Get the hash to the PTEG
bne-- hamDoneNP ; Not a normal mapping, therefore, no physent...
; We are in the exception vectors
; pf64Bitb is set up
; R3 contains the MSR we going to
-; We can not use R4, R13, R20, R21, R29
+; We can not use R4, R13, R20, R21, R25, R26, R29
; R13 is the savearea
; R29 has the per_proc
;