MCPcopy Create free account
hub / github.com/F-Stack/f-stack / pmap_dump_kextract

Function pmap_dump_kextract

freebsd/arm/arm/pmap-v6.c:1125–1146  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

1123 * This is only intended to be used for panic dumps.
1124 */
1125vm_paddr_t
1126pmap_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 *

Callers 1

minidumpsysFunction · 0.85

Calls 8

pte1_loadFunction · 0.85
kern_pte1Function · 0.85
pte1_is_sectionFunction · 0.85
pte1_paFunction · 0.85
pte1_is_linkFunction · 0.85
pte2_loadFunction · 0.85
pt2map_entryFunction · 0.85
pte2_paFunction · 0.85

Tested by

no test coverage detected