* Extract from the kernel page table the physical address * that is mapped by the given virtual address "va". Also * return L2 page table entry which maps the address. * * This is only intended to be used for panic dumps. */
| 1123 | * This is only intended to be used for panic dumps. |
| 1124 | */ |
| 1125 | vm_paddr_t |
| 1126 | pmap_dump_kextract(vm_offset_t va, pt2_entry_t *pte2p) |
| 1127 | { |
| 1128 | vm_paddr_t pa; |
| 1129 | pt1_entry_t pte1; |
| 1130 | pt2_entry_t pte2; |
| 1131 | |
| 1132 | pte1 = pte1_load(kern_pte1(va)); |
| 1133 | if (pte1_is_section(pte1)) { |
| 1134 | pa = pte1_pa(pte1) | (va & PTE1_OFFSET); |
| 1135 | pte2 = pa | ATTR_TO_L2(pte1) | PTE2_V; |
| 1136 | } else if (pte1_is_link(pte1)) { |
| 1137 | pte2 = pte2_load(pt2map_entry(va)); |
| 1138 | pa = pte2_pa(pte2); |
| 1139 | } else { |
| 1140 | pte2 = 0; |
| 1141 | pa = 0; |
| 1142 | } |
| 1143 | if (pte2p != NULL) |
| 1144 | *pte2p = pte2; |
| 1145 | return (pa); |
| 1146 | } |
| 1147 | |
| 1148 | /***************************************************************************** |
| 1149 | * |
no test coverage detected