Page MenuHomeFreeBSD

riscv/pmap.c: Add a ddb command for inspecting PTE hierachy
ClosedPublic

Authored by bnovkov on May 10 2026, 4:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jul 7, 1:12 PM
Unknown Object (File)
Mon, Jul 6, 10:20 AM
Unknown Object (File)
Thu, Jun 18, 5:03 AM
Unknown Object (File)
Jun 4 2026, 5:21 PM
Unknown Object (File)
Jun 2 2026, 9:46 AM
Unknown Object (File)
May 31 2026, 6:12 AM
Unknown Object (File)
May 31 2026, 6:09 AM
Unknown Object (File)
May 31 2026, 5:35 AM
Subscribers

Details

Summary

This change implements the equivalent of the amd64-specific
'show pte' ddb command used to dump the page table entries
associated with a specific virtual address.

Test Plan

Tested by inspecting the kernel page tables for a couple of virtual addresses reported by vm.pmap.kernel_maps:

root@bpif3:~ # sysctl vm.pmap.kernel_maps
vm.pmap.kernel_maps:
Kernel map:
0xffffffc000000000-0xffffffc001000000 rwxs- PMA 0 8 0
0xffffffc001000000-0xffffffc00101b000 rw-s- PMA 0 0 27
[[snip]]
root@bpif3:~ # sysctl debug.kdb.enter=1
[[snip]]
db> show pte 0xffffffc000000000
VA 0xffffffc000000000 l1e@0xffffffd168436800 0x000000001d921401 l2e@0xffffffd076485000 0x000000001d5800cf
db> show pte 0xffffffc001000000
VA 0xffffffc001000000 l1e@0xffffffd168436800 0x000000001d921401 l2e@0xffffffd076485040 0x000000001d922c01 l3e@0xffffffd07648b000 0x000000001d9800c7
db> show pte 0xffffffc001001000
VA 0xffffffc001001000 l1e@0xffffffd168436800 0x000000001d921401 l2e@0xffffffd076485040 0x000000001d922c01 l3e@0xffffffd07648b008 0x000000001d9804c7

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable