Add amd64-specific ddb command 'show phys2dmap', which calculates the
address in the direct map corresponding to the given physical address. Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
4fab678be2
commit
ea38ca6ea5
@ -5535,4 +5535,16 @@ DB_SHOW_COMMAND(pte, pmap_print_pte)
|
||||
pte = pmap_pde_to_pte(pde, va);
|
||||
db_printf(" pte %#016lx\n", *pte);
|
||||
}
|
||||
|
||||
DB_SHOW_COMMAND(phys2dmap, pmap_phys2dmap)
|
||||
{
|
||||
vm_paddr_t a;
|
||||
|
||||
if (have_addr) {
|
||||
a = (vm_paddr_t)addr;
|
||||
db_printf("0x%jx\n", (uintmax_t)PHYS_TO_DMAP(a));
|
||||
} else {
|
||||
db_printf("show phys2dmap addr\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user