Lines Matching refs:r31
158 stw r31,FM_ARG0+0x38(r1) ; Save a register
169 mr r31,r4 ; Save the mapping
183 xor r31,r31,r21 ; Convert the mapping to physical addressing
188 lwz r24,mpFlags(r31) ; Pick up the flags
199 hamRescan: lwz r4,mpVAddr(r31) ; Get the new vaddr top half
200 lwz r5,mpVAddr+4(r31) ; Get the new vaddr bottom half
202 lhz r23,mpBSize(r31) ; Get the block size for later
266 mr r4,r31 ; Point to the mapping
270 lhz r8,mpSpace(r31) ; Get the address space
307 mr r4,r31 ; Set the link to install
308 stw r9,mpPte(r31) ; Point the mapping at the PTEG (exact offset is invalid)
309 stw r12,mpAlias+4(r31) ; Move to the mapping
324 mr r4,r31
325 stw r9,mpPte(r31) ; Point the mapping at the PTEG (exact offset is invalid)
326 std r11,mpAlias(r31) ; Set the alias pointer in the mapping
335 mr r3,r31 ; Get the mapping pointer
366 lwz r31,FM_ARG0+0x38(r1) ; Save a register
376 lwz r23,mpFlags(r31) ; Get the requested flags
378 lwz r8,mpVAddr(r31) ; Get the requested address
380 lwz r9,mpVAddr+4(r31) ; Get the requested address
382 lhz r11,mpBSize(r31) ; Get the requested length
384 lwz r25,mpPAddr(r31) ; Get the requested physical address
545 stw r31,FM_ARG0+0x40(r1) ; Save a register
599 mr. r31,r3 ; Did we? (And remember mapping address for later)
634 mr. r31,r3 ; Did we lose it when we converted?
648 hrmGotX: mr r3,r31 ; Get the mapping
659 lwz r21,mpPte(r31) ; Grab the offset to the PTE
688 lwz r21,mpPte(r31) ; Get the quick pointer again
694 stw r21,mpPte(r31) ; Make sure we invalidate mpPte, still pointing to PTEG (keep walk_page from making a mistake)
740 hrmPysDQ32: mr r3,r31 ; Point to the mapping
744 mr r4,r31 ; Point to the mapping
766 cmplw r9,r31 ; Are we the first on the list?
770 lwz r4,mpAlias+4(r31) ; Get our new forward pointer
771 stw r9,mpAlias+4(r31) ; Make sure we are off the chain
779 and r8,r8,r31 ; Get back to a page
785 xor r3,r31,r8 ; Flip mapping address to virtual
797 mr r3,r31 ; Point to the mapping
824 cmplw r9,r31 ; Is this us?
834 hrmRetn32: rlwinm r8,r31,0,0,19 ; Find start of page
835 mr r3,r31 ; Copy the pointer to the mapping
839 xor r3,r31,r8 ; Flip mapping address to virtual
872 lwz r31,FM_ARG0+0x40(r1) ; Restore a register
905 lhz r25,mpBSize(r31) ; Get the number of pages in block
906 lhz r23,mpSpace(r31) ; Get the address space hash
907 lwz r9,mpBlkRemCur(r31) ; Get our current remove position
915 lwz r27,mpVAddr+4(r31) ; Get the base vaddr
922 stb r0,mpFlags+3(r31) ; Save the flags with the mpRIP bit on
935 stw r10,mpBlkRemCur(r31) ; Set next chunk to do (note: this may indicate after end)
1001 mr r3,r31 ; Copy the pointer to the mapping
1011 lwz r27,mpVAddr+4(r31) ; Get the base vaddr again
1044 lwz r4,mpVAddr(r31) ; High order of address
1045 lwz r5,mpVAddr+4(r31) ; Low order of address
1056 cmplw r3,r31 ; Same mapping?
1062 mr r3,r31 ; Restore the mapping pointer
1083 mr r4,r31 ; Point to the mapping
1108 lwz r21,mpPte(r31) ; Get the quick pointer again
1117 stw r21,mpPte(r31) ; Make sure we invalidate mpPte but keep pointing to PTEG (keep walk_page from making a mistake)
1155 hrmPysDQ64: mr r3,r31 ; Point to the mapping
1159 mr r4,r31 ; Point to the mapping
1183 cmpld r9,r31 ; Are we the first on the list?
1187 ld r4,mpAlias(r31) ; Get our forward pointer
1189 std r9,mpAlias(r31) ; Make sure we are off the chain
1209 cmpld r9,r31 ; Is this us?
1220 hrmRetn64: rldicr r8,r31,0,51 ; Find start of page
1221 mr r3,r31 ; Copy the pointer to the mapping
1225 xor r3,r31,r8 ; Flip mapping address to virtual
1241 lhz r24,mpSpace(r31) ; Get the address space hash
1242 lhz r25,mpBSize(r31) ; Get the number of pages in block
1243 lwz r9,mpBlkRemCur(r31) ; Get our current remove position
1249 ld r27,mpVAddr(r31) ; Get the base vaddr
1256 stb r0,mpFlags+3(r31) ; Save the flags with the mpRIP bit on
1268 stw r10,mpBlkRemCur(r31) ; Set next chunk to do (note: this may indicate after end)
1340 mr r3,r31 ; Copy the pointer to the mapping
1351 ld r27,mpVAddr(r31) ; Get the base vaddr
1387 lwz r4,mpVAddr(r31) ; High order of address
1388 lwz r5,mpVAddr+4(r31) ; Low order of address
1399 cmpld r3,r31 ; Same mapping?
1405 mr r3,r31 ; Restore the mapping pointer
1426 mr r4,r31 ; Point to the mapping
1472 ; r31: guest mapping's physical address
1492 la r31,VMX_HPIDX_OFFSET(r26) ; r31 <- base of hash page physical index
1497 add r31,r31,r12 ; r31 <- hash page index entry
1501 lwz r31,4(r31) ; r31 <- hash page paddr
1502 rlwimi r31,r11,GV_HGRP_SHIFT,GV_HGRP_MASK
1503 ; r31 <- hash group paddr
1508 lwz r3,mpFlags(r31) ; r3 <- 1st mapping slot's flags
1509 lhz r4,mpSpace(r31) ; r4 <- 1st mapping slot's space ID
1510 lwz r5,mpVAddr+4(r31) ; r5 <- 1st mapping slot's virtual address
1516 lwz r3,mpFlags+GV_SLOT_SZ(r31) ; r3 <- next mapping slot's flags
1518 lhz r4,mpSpace+GV_SLOT_SZ(r31) ; r4 <- next mapping slot's space ID
1520 lwz r5,mpVAddr+4+GV_SLOT_SZ(r31); r5 <- next mapping slot's virtual addr
1526 beq hrmGSrchHit ; Join common path on hit (r31 points to guest mapping)
1528 addi r31,r31,GV_SLOT_SZ ; r31 <- next mapping slot
1538 beq hrmGSrchHit ; Join common path on hit (r31 points to guest mapping)
1542 ld r31,0(r31) ; r31 <- hash page paddr
1543 insrdi r31,r11,GV_GRPS_PPG_LG2,64-(GV_HGRP_SHIFT+GV_GRPS_PPG_LG2)
1544 ; r31 <- hash group paddr
1545 lwz r3,mpFlags(r31) ; r3 <- 1st mapping slot's flags
1546 lhz r4,mpSpace(r31) ; r4 <- 1st mapping slot's space ID
1547 ld r5,mpVAddr(r31) ; r5 <- 1st mapping slot's virtual address
1553 lwz r3,mpFlags+GV_SLOT_SZ(r31) ; r3 <- next mapping slot's flags
1555 lhz r4,mpSpace+GV_SLOT_SZ(r31) ; r4 <- next mapping slot's space ID
1557 ld r5,mpVAddr+GV_SLOT_SZ(r31) ; r5 <- next mapping slot's virtual addr
1563 beq hrmGSrchHit ; Join common path on hit (r31 points to guest mapping)
1565 addi r31,r31,GV_SLOT_SZ ; r31 <- next mapping slot
1575 beq hrmGSrchHit ; Join common path on hit (r31 points to guest mapping)
1594 ; r31 <- mapping's physical address
1611 lwz r8,mpPte(r31) ; Get PTE offset
1613 stw r8,mpPte(r31) ; Save invalidated PTE offset
1618 lwz r3,mpPAddr(r31) ; r3 <- physical 4K-page number
1630 cmplw r9,r31 ; Is this the mapping to remove?
1657 cmpld r9,r31 ; Is this the mapping to remove?
1681 lwz r3,mpFlags(r31) ; Get mapping's flags
1684 stw r3,mpFlags(r31) ; Update flags
1764 stw r31,FM_ARG0+0x40(r1) ; Save a register
1876 stw r31,FM_ARG0+0x40(r1) ; Save a register
1913 mr. r31,r3 ; Did we? (And remember mapping address for later)
1996 stw r31,FM_ARG0+0x40(r1) ; Save a register
2144 stw r31,FM_ARG0+0x40(r1) ; Save a register
2368 stw r31,FM_ARG0+0x18(r1) ; Save a register
2407 mr. r31,r3 ; Save the mapping if we found it
2419 andc r4,r31,r26 ; Get back to the mapping page start
2427 xor r31,r31,r4 ; Flip to virtual
2432 rlwinm r3,r31,0,0,31 ; Move mapping to return register and clear top of register if 64-bit
2455 lwz r31,FM_ARG0+0x18(r1) ; Restore a register
2612 stw r31,FM_ARG0+0x1C(r1) ; Save a register
2649 lwz r31,ppLink+4(r3) ; Grab the pointer to the first mapping
2653 hwpQSrc32: rlwinm. r31,r31,0,~ppFlags ; Clean and test mapping address
2659 lwz r31,mpAlias+4(r31) ; Chain on to the next
2663 hwpMSrc32: rlwinm. r31,r31,0,~ppFlags ; Clean and test mapping address
2670 lwz r31,mpAlias+4(r31) ; Chain on to the next
2674 hwpSrc32: rlwinm. r31,r31,0,~ppFlags ; Clean and test mapping address
2699 lwz r31,mpAlias+4(r31) ; Chain on to the next
2737 ld r31,ppLink(r3) ; Get the pointer to the first mapping
2742 hwpQSrc64: andc. r31,r31,r24 ; Clean and test mapping address
2748 ld r31,mpAlias(r31) ; Chain on to the next
2752 hwpMSrc64: andc. r31,r31,r24 ; Clean and test mapping address
2759 ld r31,mpAlias(r31) ; Chain on to the next
2763 hwpSrc64: andc. r31,r31,r24 ; Clean and test mapping address
2786 ld r31,mpAlias(r31) ; Chain on to the next
2822 lwz r31,FM_ARG0+0x1C(r1) ; Restore a register
2887 hwpSPrtMap: lwz r9,mpFlags(r31) ; Get the mapping flags
2888 lwz r8,mpVAddr+4(r31) ; Get the protection part of mapping
2898 stw r8,mpVAddr+4(r31) ; Set the flag part of mapping
2918 hwpSAtrMap: lwz r9,mpFlags(r31) ; Get the mapping flags
2919 lwz r8,mpVAddr+4(r31) ; Get the attribute part of mapping
2933 lwz r2,mpPAddr(r31) ; Get the physical address
2937 stw r8,mpVAddr+4(r31) ; Set the flag part of mapping
2970 lwz r8,mpVAddr+4(r31) ; Get the flag part of mapping
2974 stw r8,mpVAddr+4(r31) ; Set the flag part of mapping
2997 lwz r8,mpVAddr+4(r31) ; Get the flag part of mapping
3001 stw r8,mpVAddr+4(r31) ; Set the flag part of mapping
3023 hwpSRefMap: lwz r8,mpVAddr+4(r31) ; Get the flag part of mapping
3026 stw r8,mpVAddr+4(r31) ; Set the flag part of mapping
3046 hwpSCngMap: lwz r8,mpVAddr+4(r31) ; Get the flag part of mapping
3049 stw r8,mpVAddr+4(r31) ; Set the flag part of mapping
3128 lwz r8,mpVAddr+4(r31) ; Get the flag part of mapping
3132 stw r8,mpVAddr+4(r31) ; Set the flag part of mapping
3163 stw r31,FM_ARG0+0x1C(r1) ; Save a register
3205 mr. r31,r3 ; Save the mapping if we found it
3220 stb r5,mpVAddr+7(r31) ; Set the new pp field (do not muck with the rest)
3245 stb r5,mpVAddr+7(r31) ; Set the new pp field (do not muck with the rest)
3284 lwz r31,FM_ARG0+0x1C(r1) ; Save a register
3341 stw r31,FM_ARG0+0x1C(r1) ; Save a register
3384 mr. r31,r3 ; Save the mapping if we found it
3394 lwz r12,mpVAddr+4(r31) ; Get the bottom of the mapping vaddr field
3403 sth r12,mpVAddr+6(r31) ; Set the new RC
3425 lwz r12,mpVAddr+4(r31) ; Get the bottom of the mapping vaddr field
3434 sth r12,mpVAddr+6(r31) ; Set the new RC
3471 lwz r31,FM_ARG0+0x1C(r1) ; Save a register
3533 lbz r4,mpFlags+1(r31) ; Get the index into the physent bank table
3538 lwz r5,mpPAddr(r31) ; Get physical page number
3830 mr. r31,r3 ; Save the mapping if we found it
3842 lhz r21,mpSpace(r31) ; Get the space
3854 hpfCSrch: lhz r21,mpSpace(r31) ; Get the space
3855 lwz r8,mpNestReloc(r31) ; Get the vaddr relocation
3856 lwz r9,mpNestReloc+4(r31) ; Get the vaddr relocation bottom half
3956 la r31,ppUMWmp(r19) ; Just point to the mapping
3990 ; r31: mapping's physical address
4228 hpfPteMiss: lwarx r0,0,r31 ; Load the mapping flag field
4229 lwz r12,mpPte(r31) ; Get the quick pointer to PTE
4240 stwcx. r2,0,r31 ; Store the flags
4267 lwz r25,mpVAddr+4(r31) ; Grab the base virtual address for the mapping (32-bit portion)
4268 lwz r24,mpPAddr(r31) ; Grab the base physical page number for the mapping
4308 lwz r12,mpPte(r31) ; Get the offset to the PTE
4451 ld r10,mpVAddr(r31) ; Grab the base virtual address for the mapping
4452 lwz r24,mpPAddr(r31) ; Grab the base physical page number for the mapping
4497 lwz r12,mpPte(r31) ; Get the offset to the PTE
4648 stw r4,mpPte(r31) ; Remember our PTE
4658 hpfIgnore: lwz r2,mpFlags(r31) ; Get the mapping flags
4660 sth r2,mpFlags+2(r31) ; Set it
4703 ; the page fault path at hpfGVfound with the mapping's address in r31;
4718 la r31,VMX_HPIDX_OFFSET(r11) ; r31 <- base of hash page physical index
4726 add r31,r31,r4 ; r31 <- hash page index entry
4727 lwz r31,4(r31) ; r31 <- hash page paddr
4728 rlwimi r31,r3,GV_HGRP_SHIFT,GV_HGRP_MASK
4729 ; r31 <- hash group paddr
4736 lwz r3,mpFlags(r31) ; r3 <- 1st mapping slot's flags
4737 lhz r4,mpSpace(r31) ; r4 <- 1st mapping slot's space ID
4738 lwz r5,mpVAddr+4(r31) ; r5 <- 1st mapping slot's virtual address
4748 lwz r3,mpFlags+GV_SLOT_SZ(r31) ; r3 <- next mapping slot's flags
4750 lhz r4,mpSpace+GV_SLOT_SZ(r31) ; r4 <- next mapping slot's space ID
4752 lwz r5,mpVAddr+4+GV_SLOT_SZ(r31); r5 <- next mapping slot's virtual addr
4758 beq hpfGVfound ; Join common patch on hit (r31 points to mapping)
4760 addi r31,r31,GV_SLOT_SZ ; r31 <- next mapping slot
4769 beq hpfGVfound ; Join common patch on hit (r31 points to mapping)
4779 la r31,VMX_HPIDX_OFFSET(r11) ; r31 <- base of hash page physical index
4788 add r31,r31,r4 ; r31 <- hash page index entry
4789 ld r31,0(r31) ; r31 <- hash page paddr
4790 insrdi r31,r3,GV_GRPS_PPG_LG2,64-(GV_HGRP_SHIFT+GV_GRPS_PPG_LG2)
4791 ; r31 <- hash group paddr
4798 lwz r3,mpFlags(r31) ; r3 <- 1st mapping slot's flags
4799 lhz r4,mpSpace(r31) ; r4 <- 1st mapping slot's space ID
4800 ld r5,mpVAddr(r31) ; r5 <- 1st mapping slot's virtual address
4810 lwz r3,mpFlags+GV_SLOT_SZ(r31) ; r3 <- next mapping slot's flags
4812 lhz r4,mpSpace+GV_SLOT_SZ(r31) ; r4 <- next mapping slot's space ID
4814 ld r5,mpVAddr+GV_SLOT_SZ(r31) ; r5 <- next mapping slot's virtual addr
4820 beq hpfGVfound ; Join common path on hit (r31 points to mapping)
4822 addi r31,r31,GV_SLOT_SZ ; r31 <- next mapping slot
4831 beq hpfGVfound ; Join common path on hit (r31 points to mapping)
5725 ; r31 : current mapping
5740 stw r31,FM_ARG0+0x00(r1) ; Save non-volatile r31
5773 la r31,VMX_HPIDX_OFFSET(r25) ; Get base of hash page physical index
5776 add r31,r31,r11 ; Calculate page physical index entry address
5778 lwz r31,4(r31) ; r31 <- first slot in hash table page to examine
5780 gra64Page: ld r31,0(r31) ; r31 <- first slot in hash table page to examine
5784 graLoop: lwz r3,mpFlags(r31) ; Get mapping's flags
5785 lhz r4,mpSpace(r31) ; Get mapping's space ID number
5804 ; r31 <- mapping's physical address
5819 lwz r8,mpPte(r31) ; Get PTE pointer
5821 stw r8,mpPte(r31) ; Save invalidated PTE pointer
5826 lwz r3,mpPAddr(r31) ; r3 <- physical 4K-page number
5838 cmplw r9,r31 ; Is this the mapping to remove?
5863 cmpld r9,r31 ; Is this the mapping to remove?
5886 lwz r3,mpFlags(r31) ; Get mapping's flags
5889 stw r3,mpFlags(r31) ; Update flags
5891 graMiss: addi r31,r31,GV_SLOT_SZ ; r31 <- next mapping
5892 rlwinm. r0,r31,0,GV_PAGE_MASK ; End of hash table page?
5909 lwz r31,FM_ARG0+0x00(r1) ; Restore non-volatile r31
5949 ; r31 : current mapping
5964 stw r31,FM_ARG0+0x00(r1) ; Save non-volatile r31
6032 slwi r31,r11,GV_SLOT_SZ_LG2 ; Get slot offset in slot band from lit bit number
6033 rlwinm r31,r28,GV_BAND_SHIFT,GV_BAND_MASK
6035 add r31,r31,r21 ; Add hash page address yielding mapping slot address
6037 lwz r3,mpFlags(r31) ; Get mapping's flags
6038 lhz r4,mpSpace(r31) ; Get mapping's space ID number
6045 stw r3,mpFlags(r31) ; Update mapping's flags
6049 ; r31 <- mapping's physical address
6064 lwz r8,mpPte(r31) ; Get PTE pointer
6066 stw r8,mpPte(r31) ; Save invalidated PTE pointer
6082 lwz r31,FM_ARG0+0x00(r1) ; Restore non-volatile r31
6123 ; r31 : gva->phys mapping's physical address
6139 stw r31,FM_ARG0+0x00(r1) ; Save non-volatile r31
6159 la r31,VMX_HPIDX_OFFSET(r11) ; r31 <- base of hash page physical index
6164 add r31,r31,r10 ; r31 <- hash page index entry
6165 lwz r31,4(r31) ; r31 <- hash page paddr
6166 rlwimi r31,r11,GV_HGRP_SHIFT,GV_HGRP_MASK
6167 ; r31 <- hash group paddr
6175 la r31,VMX_HPIDX_OFFSET(r11) ; r31 <- base of hash page physical index
6180 add r31,r31,r10 ; r31 <- hash page index entry
6181 ld r31,0(r31) ; r31 <- hash page paddr
6182 insrdi r31,r11,GV_GRPS_PPG_LG2,64-(GV_HGRP_SHIFT+GV_GRPS_PPG_LG2)
6183 ; r31 <- hash group paddr
6197 lwz r3,mpFlags(r31) ; r3 <- 1st mapping slot's flags
6198 lhz r4,mpSpace(r31) ; r4 <- 1st mapping slot's space ID
6199 lwz r5,mpVAddr+4(r31) ; r5 <- 1st mapping slot's virtual address
6205 lwz r3,mpFlags+GV_SLOT_SZ(r31) ; r3 <- next mapping slot's flags
6207 lhz r4,mpSpace+GV_SLOT_SZ(r31) ; r4 <- next mapping slot's space ID
6209 lwz r5,mpVAddr+4+GV_SLOT_SZ(r31); r5 <- next mapping slot's virtual addr
6215 beq grsSrchHit ; Join common path on hit (r31 points to guest mapping)
6217 addi r31,r31,GV_SLOT_SZ ; r31 <- next mapping slot
6227 beq grsSrchHit ; Join common path on hit (r31 points to guest mapping)
6231 lwz r3,mpFlags(r31) ; r3 <- 1st mapping slot's flags
6232 lhz r4,mpSpace(r31) ; r4 <- 1st mapping slot's space ID
6233 ld r5,mpVAddr(r31) ; r5 <- 1st mapping slot's virtual address
6239 lwz r3,mpFlags+GV_SLOT_SZ(r31) ; r3 <- next mapping slot's flags
6241 lhz r4,mpSpace+GV_SLOT_SZ(r31) ; r4 <- next mapping slot's space ID
6243 ld r5,mpVAddr+GV_SLOT_SZ(r31) ; r5 <- next mapping slot's virtual addr
6249 beq grsSrchHit ; Join common path on hit (r31 points to guest mapping)
6251 addi r31,r31,GV_SLOT_SZ ; r31 <- next mapping slot
6269 ; r31 <- mapping's physical address
6284 lwz r8,mpPte(r31) ; Get PTE pointer
6286 stw r8,mpPte(r31) ; Save invalidated PTE pointer
6304 lwz r3,mpPAddr(r31) ; r3 <- physical 4K-page number
6352 grsPEHit: lwz r0,mpVAddr+4(r31) ; Get va byte containing protection bits
6354 stw r0,mpVAddr+4(r31) ; Write 'em back
6357 lwz r0,mpFlags(r31) ; Get flags
6359 stw r0,mpFlags(r31) ; Set updated flags, entry is now valid
6361 li r31,mapRtOK ; Indicate success
6370 cmplw r9,r31 ; Is this the mapping to remove?
6396 cmpld r9,r31 ; Is this the mapping to remove?
6417 lwz r3,mpFlags(r31) ; Get mapping's flags
6420 stw r3,mpFlags(r31) ; Update flags
6422 li r31,mapRtNotFnd ; Didn't succeed
6430 grsRtn: mr r3,r31 ; r3 <- result code
6439 lwz r31,FM_ARG0+0x00(r1) ; Restore non-volatile r31
6454 li r31,mapRtNotFnd ; Could not locate requested mapping
6488 ; r31 : gva->phys mapping's physical address
6506 stw r31,FM_ARG0+0x00(r1) ; Save non-volatile r31
6560 mr r31,r22 ; Prepare to search this group
6565 lwz r3,mpFlags(r31) ; r3 <- 1st mapping slot's flags
6566 lhz r4,mpSpace(r31) ; r4 <- 1st mapping slot's space ID
6567 lwz r5,mpVAddr+4(r31) ; r5 <- 1st mapping slot's virtual address
6574 lwz r3,mpFlags+GV_SLOT_SZ(r31) ; r3 <- next mapping slot's flags
6576 lhz r4,mpSpace+GV_SLOT_SZ(r31) ; r4 <- next mapping slot's space ID
6578 lwz r5,mpVAddr+4+GV_SLOT_SZ(r31); r5 <- next mapping slot's virtual addr
6584 beq gadRelPmap ; Join common path on hit (r31 points to guest mapping)
6586 addi r31,r31,GV_SLOT_SZ ; r31 <- next mapping slot
6596 beq gadRelPmap ; Join common path on hit (r31 points to guest mapping)
6600 lwz r3,mpFlags(r31) ; r3 <- 1st mapping slot's flags
6601 lhz r4,mpSpace(r31) ; r4 <- 1st mapping slot's space ID
6602 ld r5,mpVAddr(r31) ; r5 <- 1st mapping slot's virtual address
6609 lwz r3,mpFlags+GV_SLOT_SZ(r31) ; r3 <- next mapping slot's flags
6611 lhz r4,mpSpace+GV_SLOT_SZ(r31) ; r4 <- next mapping slot's space ID
6613 ld r5,mpVAddr+GV_SLOT_SZ(r31) ; r5 <- next mapping slot's virtual addr
6621 addi r31,r31,GV_SLOT_SZ ; r31 <- next mapping slot
6649 mr r31,r2 ; r31 <- current mapping's address
6654 bne gadFillMap ; Join common path on hit (r31 points to free mapping)
6659 mr r11,r31 ; We'll use this dormant entry if we don't find a free one first
6662 mr r31,r2 ; r31 <- final mapping's address
6664 bne gadFillMap ; Join common path on hit (r31 points to dormant mapping)
6669 mr r11,r31 ; We'll use this dormant entry if we don't find a free one first
6672 mr. r31,r11 ; Get dormant mapping, if any, and test
6679 or r31,r22,r12 ; r31 <- address of mapping to steal
6683 ; r31 <- mapping's physical address
6698 lwz r8,mpPte(r31) ; Get PTE pointer
6700 stw r8,mpPte(r31) ; Save invalidated PTE pointer
6705 rlwinm r12,r31,(32-GV_SLOT_SZ_LG2),GV_SLOT_MASK
6711 lwz r3,mpPAddr(r31) ; r3 <- physical 4K-page number
6722 cmplw r9,r31 ; Is this the mapping to remove?
6747 cmpld r9,r31 ; Is this the mapping to remove?
6774 stw r24,mpFlags(r31) ; Set mapping's flags
6775 sth r12,mpSpace(r31) ; Set mapping's space id number
6776 stw r2,mpPte(r31) ; Set mapping's pte pointer invalid
6777 stw r29,mpPAddr(r31) ; Set mapping's physical address
6779 stw r30,mpVAddr+4(r31) ; Set mapping's virtual address (w/flags)
6781 gadVA64: std r30,mpVAddr(r31) ; Set mapping's virtual address (w/flags)
6791 rlwimi r12,r31,0,~ppFlags ; Insert new mapping, preserve physent flags
6792 stw r11,mpAlias+4(r31) ; New mapping will head chain
6801 or r12,r12,r31 ; Insert new mapping's address forming pointer
6802 std r11,mpAlias(r31) ; New mapping will head chain
6821 lwz r31,FM_ARG0+0x00(r1) ; Restore non-volatile r31
6860 ; r31 : gva->phys mapping's physical address
6877 stw r31,FM_ARG0+0x00(r1) ; Save non-volatile r31
6893 la r31,VMX_HPIDX_OFFSET(r11) ; r31 <- base of hash page physical index
6898 add r31,r31,r10 ; r31 <- hash page index entry
6899 lwz r31,4(r31) ; r31 <- hash page paddr
6900 rlwimi r31,r11,GV_HGRP_SHIFT,GV_HGRP_MASK
6901 ; r31 <- hash group paddr
6907 la r31,VMX_HPIDX_OFFSET(r11) ; r31 <- base of hash page physical index
6912 add r31,r31,r10 ; r31 <- hash page index entry
6913 ld r31,0(r31) ; r31 <- hash page paddr
6914 insrdi r31,r11,GV_GRPS_PPG_LG2,64-(GV_HGRP_SHIFT+GV_GRPS_PPG_LG2)
6915 ; r31 <- hash group paddr
6929 lwz r3,mpFlags(r31) ; r3 <- 1st mapping slot's flags
6930 lhz r4,mpSpace(r31) ; r4 <- 1st mapping slot's space ID
6931 lwz r5,mpVAddr+4(r31) ; r5 <- 1st mapping slot's virtual address
6937 lwz r3,mpFlags+GV_SLOT_SZ(r31) ; r3 <- next mapping slot's flags
6939 lhz r4,mpSpace+GV_SLOT_SZ(r31) ; r4 <- next mapping slot's space ID
6941 lwz r5,mpVAddr+4+GV_SLOT_SZ(r31); r5 <- next mapping slot's virtual addr
6947 beq gsuSrchHit ; Join common path on hit (r31 points to guest mapping)
6949 addi r31,r31,GV_SLOT_SZ ; r31 <- next mapping slot
6959 beq gsuSrchHit ; Join common path on hit (r31 points to guest mapping)
6963 lwz r3,mpFlags(r31) ; r3 <- 1st mapping slot's flags
6964 lhz r4,mpSpace(r31) ; r4 <- 1st mapping slot's space ID
6965 ld r5,mpVAddr(r31) ; r5 <- 1st mapping slot's virtual address
6971 lwz r3,mpFlags+GV_SLOT_SZ(r31) ; r3 <- next mapping slot's flags
6973 lhz r4,mpSpace+GV_SLOT_SZ(r31) ; r4 <- next mapping slot's space ID
6975 ld r5,mpVAddr+GV_SLOT_SZ(r31) ; r5 <- next mapping slot's virtual addr
6981 beq gsuSrchHit ; Join common path on hit (r31 points to guest mapping)
6983 addi r31,r31,GV_SLOT_SZ ; r31 <- next mapping slot
6998 ; r31 <- mapping's physical address
7013 lwz r8,mpPte(r31) ; Get PTE pointer
7015 stw r8,mpPte(r31) ; Save invalidated PTE pointer
7019 gsuNoPTE: lwz r3,mpFlags(r31) ; Get mapping's flags
7021 stw r3,mpFlags(r31) ; Save updated flags
7036 lwz r31,FM_ARG0+0x00(r1) ; Restore non-volatile r31
7067 ; r31 : gva->phys mapping's physical address
7084 stw r31,FM_ARG0+0x00(r1) ; Save non-volatile r31
7103 la r31,VMX_HPIDX_OFFSET(r11) ; r31 <- base of hash page physical index
7108 add r31,r31,r10 ; r31 <- hash page index entry
7109 lwz r31,4(r31) ; r31 <- hash page paddr
7110 rlwimi r31,r11,GV_HGRP_SHIFT,GV_HGRP_MASK
7111 ; r31 <- hash group paddr
7118 la r31,VMX_HPIDX_OFFSET(r11) ; r31 <- base of hash page physical index
7123 add r31,r31,r10 ; r31 <- hash page index entry
7124 ld r31,0(r31) ; r31 <- hash page paddr
7125 insrdi r31,r11,GV_GRPS_PPG_LG2,64-(GV_HGRP_SHIFT+GV_GRPS_PPG_LG2)
7126 ; r31 <- hash group paddr
7141 lwz r3,mpFlags(r31) ; r3 <- 1st mapping slot's flags
7142 lhz r4,mpSpace(r31) ; r4 <- 1st mapping slot's space ID
7143 lwz r5,mpVAddr+4(r31) ; r5 <- 1st mapping slot's virtual address
7149 lwz r3,mpFlags+GV_SLOT_SZ(r31) ; r3 <- next mapping slot's flags
7151 lhz r4,mpSpace+GV_SLOT_SZ(r31) ; r4 <- next mapping slot's space ID
7153 lwz r5,mpVAddr+4+GV_SLOT_SZ(r31); r5 <- next mapping slot's virtual addr
7159 beq gtdSrchHit ; Join common path on hit (r31 points to guest mapping)
7161 addi r31,r31,GV_SLOT_SZ ; r31 <- next mapping slot
7171 beq gtdSrchHit ; Join common path on hit (r31 points to guest mapping)
7175 lwz r3,mpFlags(r31) ; r3 <- 1st mapping slot's flags
7176 lhz r4,mpSpace(r31) ; r4 <- 1st mapping slot's space ID
7177 ld r5,mpVAddr(r31) ; r5 <- 1st mapping slot's virtual address
7183 lwz r3,mpFlags+GV_SLOT_SZ(r31) ; r3 <- next mapping slot's flags
7185 lhz r4,mpSpace+GV_SLOT_SZ(r31) ; r4 <- next mapping slot's space ID
7187 ld r5,mpVAddr+GV_SLOT_SZ(r31) ; r5 <- next mapping slot's virtual addr
7193 beq gtdSrchHit ; Join common path on hit (r31 points to guest mapping)
7195 addi r31,r31,GV_SLOT_SZ ; r31 <- next mapping slot
7213 lwz r12,mpVAddr+4(r31) ; Get the bottom of the mapping vaddr field
7222 sth r12,mpVAddr+6(r31) ; Set the new RC in mapping
7243 lwz r12,mpVAddr+4(r31) ; Get the bottom of the mapping vaddr field
7252 sth r12,mpVAddr+6(r31) ; Set the new RC
7282 lwz r31,FM_ARG0+0x00(r1) ; Restore non-volatile r31
7321 ; r31 : gva->phys mapping's physical address
7338 stw r31,FM_ARG0+0x00(r1) ; Save non-volatile r31
7357 la r31,VMX_HPIDX_OFFSET(r11) ; r31 <- base of hash page physical index
7362 add r31,r31,r10 ; r31 <- hash page index entry
7363 lwz r31,4(r31) ; r31 <- hash page paddr
7364 rlwimi r31,r11,GV_HGRP_SHIFT,GV_HGRP_MASK
7365 ; r31 <- hash group paddr
7372 la r31,VMX_HPIDX_OFFSET(r11) ; r31 <- base of hash page physical index
7377 add r31,r31,r10 ; r31 <- hash page index entry
7378 ld r31,0(r31) ; r31 <- hash page paddr
7379 insrdi r31,r11,GV_GRPS_PPG_LG2,64-(GV_HGRP_SHIFT+GV_GRPS_PPG_LG2)
7380 ; r31 <- hash group paddr
7393 lwz r3,mpFlags(r31) ; r3 <- 1st mapping slot's flags
7394 lhz r4,mpSpace(r31) ; r4 <- 1st mapping slot's space ID
7395 lwz r5,mpVAddr+4(r31) ; r5 <- 1st mapping slot's virtual address
7401 lwz r3,mpFlags+GV_SLOT_SZ(r31) ; r3 <- next mapping slot's flags
7403 lhz r4,mpSpace+GV_SLOT_SZ(r31) ; r4 <- next mapping slot's space ID
7405 lwz r5,mpVAddr+4+GV_SLOT_SZ(r31); r5 <- next mapping slot's virtual addr
7411 beq gthSrchHit ; Join common path on hit (r31 points to guest mapping)
7413 addi r31,r31,GV_SLOT_SZ ; r31 <- next mapping slot
7423 beq gthSrchHit ; Join common path on hit (r31 points to guest mapping)
7427 lwz r3,mpFlags(r31) ; r3 <- 1st mapping slot's flags
7428 lhz r4,mpSpace(r31) ; r4 <- 1st mapping slot's space ID
7429 ld r5,mpVAddr(r31) ; r5 <- 1st mapping slot's virtual address
7435 lwz r3,mpFlags+GV_SLOT_SZ(r31) ; r3 <- next mapping slot's flags
7437 lhz r4,mpSpace+GV_SLOT_SZ(r31) ; r4 <- next mapping slot's space ID
7439 ld r5,mpVAddr+GV_SLOT_SZ(r31) ; r5 <- next mapping slot's virtual addr
7445 beq gthSrchHit ; Join common path on hit (r31 points to guest mapping)
7447 addi r31,r31,GV_SLOT_SZ ; r31 <- next mapping slot
7459 gthSrchHit: lwz r3,mpPAddr(r31) ; r3 <- physical 4K-page number
7535 lwz r31,FM_ARG0+0x00(r1) ; Restore non-volatile r31
7573 ; r31 : gva->phys mapping's physical address
7590 stw r31,FM_ARG0+0x00(r1) ; Save non-volatile r31
7609 la r31,VMX_HPIDX_OFFSET(r11) ; r31 <- base of hash page physical index
7614 add r31,r31,r10 ; r31 <- hash page index entry
7615 lwz r31,4(r31) ; r31 <- hash page paddr
7616 rlwimi r31,r11,GV_HGRP_SHIFT,GV_HGRP_MASK
7617 ; r31 <- hash group paddr
7624 la r31,VMX_HPIDX_OFFSET(r11) ; r31 <- base of hash page physical index
7629 add r31,r31,r10 ; r31 <- hash page index entry
7630 ld r31,0(r31) ; r31 <- hash page paddr
7631 insrdi r31,r11,GV_GRPS_PPG_LG2,64-(GV_HGRP_SHIFT+GV_GRPS_PPG_LG2)
7632 ; r31 <- hash group paddr
7645 lwz r3,mpFlags(r31) ; r3 <- 1st mapping slot's flags
7646 lhz r4,mpSpace(r31) ; r4 <- 1st mapping slot's space ID
7647 lwz r5,mpVAddr+4(r31) ; r5 <- 1st mapping slot's virtual address
7653 lwz r3,mpFlags+GV_SLOT_SZ(r31) ; r3 <- next mapping slot's flags
7655 lhz r4,mpSpace+GV_SLOT_SZ(r31) ; r4 <- next mapping slot's space ID
7657 lwz r5,mpVAddr+4+GV_SLOT_SZ(r31); r5 <- next mapping slot's virtual addr
7663 beq gfmSrchHit ; Join common path on hit (r31 points to guest mapping)
7665 addi r31,r31,GV_SLOT_SZ ; r31 <- next mapping slot
7675 beq gfmSrchHit ; Join common path on hit (r31 points to guest mapping)
7679 lwz r3,mpFlags(r31) ; r3 <- 1st mapping slot's flags
7680 lhz r4,mpSpace(r31) ; r4 <- 1st mapping slot's space ID
7681 ld r5,mpVAddr(r31) ; r5 <- 1st mapping slot's virtual address
7687 lwz r3,mpFlags+GV_SLOT_SZ(r31) ; r3 <- next mapping slot's flags
7689 lhz r4,mpSpace+GV_SLOT_SZ(r31) ; r4 <- next mapping slot's space ID
7691 ld r5,mpVAddr+GV_SLOT_SZ(r31) ; r5 <- next mapping slot's virtual addr
7697 beq gfmSrchHit ; Join common path on hit (r31 points to guest mapping)
7699 addi r31,r31,GV_SLOT_SZ ; r31 <- next mapping slot
7711 gfmSrchHit: lwz r5,0(r31) ; Fetch 32 bytes of mapping from physical
7712 lwz r6,4(r31) ; +4
7713 lwz r7,8(r31) ; +8
7714 lwz r8,12(r31) ; +12
7715 lwz r9,16(r31) ; +16
7716 lwz r10,20(r31) ; +20
7717 lwz r11,24(r31) ; +24
7718 lwz r12,28(r31) ; +28
7720 li r31,mapRtOK ; Return found mapping
7734 gfmEpilog: mr. r3,r31 ; Copy/test mapping address
7749 lwz r31,FM_ARG0+0x00(r1) ; Restore non-volatile r31
7762 li r31,mapRtNotFnd ; Indicate mapping not found
7788 ; r31 : gva->phys mapping's physical address
7804 stw r31,FM_ARG0+0x00(r1) ; Save non-volatile r31
7821 la r31,VMX_HPIDX_OFFSET(r11) ; r31 <- base of hash page physical index
7826 add r31,r31,r10 ; r31 <- hash page index entry
7827 lwz r31,4(r31) ; r31 <- hash page paddr
7828 rlwimi r31,r11,GV_HGRP_SHIFT,GV_HGRP_MASK
7829 ; r31 <- hash group paddr
7836 la r31,VMX_HPIDX_OFFSET(r11) ; r31 <- base of hash page physical index
7841 add r31,r31,r10 ; r31 <- hash page index entry
7842 ld r31,0(r31) ; r31 <- hash page paddr
7843 insrdi r31,r11,GV_GRPS_PPG_LG2,64-(GV_HGRP_SHIFT+GV_GRPS_PPG_LG2)
7844 ; r31 <- hash group paddr
7857 lwz r3,mpFlags(r31) ; r3 <- 1st mapping slot's flags
7858 lhz r4,mpSpace(r31) ; r4 <- 1st mapping slot's space ID
7859 lwz r5,mpVAddr+4(r31) ; r5 <- 1st mapping slot's virtual address
7865 lwz r3,mpFlags+GV_SLOT_SZ(r31) ; r3 <- next mapping slot's flags
7867 lhz r4,mpSpace+GV_SLOT_SZ(r31) ; r4 <- next mapping slot's space ID
7869 lwz r5,mpVAddr+4+GV_SLOT_SZ(r31); r5 <- next mapping slot's virtual addr
7875 beq gcpSrchHit ; Join common path on hit (r31 points to guest mapping)
7877 addi r31,r31,GV_SLOT_SZ ; r31 <- next mapping slot
7887 beq gcpSrchHit ; Join common path on hit (r31 points to guest mapping)
7891 lwz r3,mpFlags(r31) ; r3 <- 1st mapping slot's flags
7892 lhz r4,mpSpace(r31) ; r4 <- 1st mapping slot's space ID
7893 ld r5,mpVAddr(r31) ; r5 <- 1st mapping slot's virtual address
7899 lwz r3,mpFlags+GV_SLOT_SZ(r31) ; r3 <- next mapping slot's flags
7901 lhz r4,mpSpace+GV_SLOT_SZ(r31) ; r4 <- next mapping slot's space ID
7903 ld r5,mpVAddr+GV_SLOT_SZ(r31) ; r5 <- next mapping slot's virtual addr
7909 beq gcpSrchHit ; Join common path on hit (r31 points to guest mapping)
7911 addi r31,r31,GV_SLOT_SZ ; r31 <- next mapping slot
7926 ; r31 <- mapping's physical address
7941 lwz r8,mpPte(r31) ; Get PTE pointer
7943 stw r8,mpPte(r31) ; Save invalidated PTE pointer
7947 gcpSetKey: lwz r0,mpVAddr+4(r31) ; Get va word containing protection bits
7949 stw r0,mpVAddr+4(r31) ; Write 'em back
7951 li r31,mapRtOK ; I'm a success
7956 mr r3,r31 ; r3 <- result code
7965 lwz r31,FM_ARG0+0x00(r1) ; Restore non-volatile r31
7978 li r31,mapRtNotFnd ; Could not locate requested mapping
8163 lwz r0,mpPte(r31) ; Grab the PTE offset
8165 lwz r5,mpVAddr+4(r31) ; Grab the virtual address
8177 lwz r0,mpPte(r31) ; Grab the PTE offset
8187 mMNmerge: lbz r11,mpFlags+1(r31) ; Get the offset to the physical entry table
8188 lwz r0,mpVAddr+4(r31) ; Get the flags part of the field
8197 stw r0,mpVAddr+4(r31) ; Set the new RC into the field
8218 lwz r0,mpPte(r31) ; Grab the PTE offset
8219 ld r5,mpVAddr(r31) ; Grab the virtual address
8232 lwz r0,mpPte(r31) ; Grab the PTE offset again
8264 lwz r0,mpPte(r31) ; Grab the PTE offset
8266 lwz r5,mpVAddr+4(r31) ; Grab the virtual address
8278 lwz r0,mpPte(r31) ; Grab the PTE offset
8317 mINmerge: lbz r11,mpFlags+1(r31) ; Get the offset to the physical entry table
8318 lwz r0,mpVAddr+4(r31) ; Get the flags part of the field
8327 stw r0,mpVAddr+4(r31) ; Set the new RC into the field
8351 lwz r0,mpPte(r31) ; Grab the PTE offset
8352 ld r5,mpVAddr(r31) ; Grab the virtual address
8365 lwz r0,mpPte(r31) ; Grab the PTE offset again