wire / wire-format / riscv-page-table-entry

RISC-V page table entry (PTE)

A RISC-V Sv39 (39-bit virtual address) page table entry is 8 bytes (64 bits). Fields: V (valid, bit 0), R (read, bit 1), W (write, bit 2), X (execute, bit 3), U (user, bit 4), G (global, bit 5), A (accessed, bit 6), D (dirty, bit 7), RSW (bits 8-9, reserved for software), PPN (physical page number, bits 10-53), reserved (bits 54-63). Sv48 and Sv57 extend the virtual address space with additional levels.

wire-format kind wire-format status standard verification verified tier B wire-format@1

aka: RISC-V page table entry (PTE)

wire format

spec: RISC-V specification (riscv.org)

A RISC-V Sv39 (39-bit virtual address) page table entry is 8 bytes (64 bits). Fields: V (valid, bit 0), R (read, bit 1), W (write, bit 2), X (execute, bit 3), U (user, bit 4), G (global, bit 5), A (accessed, bit 6), D (dirty, bit 7), RSW (bits 8-9, reserved for software), PPN (physical page number, bits 10-53), reserved (bits 54-63). Sv48 and Sv57 extend the virtual address space with additional levels.

fieldsizemeaning
Valid (V)1 bit (bit 0)1 = PTE is valid.
Read (R)1 bit (bit 1)1 = page is readable.
Write (W)1 bit (bit 2)1 = page is writable.
Execute (X)1 bit (bit 3)1 = page is executable.
User (U)1 bit (bit 4)1 = page is accessible in user mode.
Global (G)1 bit (bit 5)1 = global mapping (not flushed on satp change). Requires SFENCE.VMA with rs1=x0, rs2!=x0.
Accessed (A)1 bit (bit 6)Set by hardware (or software, if not supported) on read.
Dirty (D)1 bit (bit 7)Set by hardware (or software) on write.
RSW2 bits (8-9)Reserved for software use.
Physical Page Number (PPN)44 bits (10-53)Physical page number. For leaf entries, the page size determines which bits are part of the PPN vs. the page offset.
Reserved10 bits (54-63)Reserved (must be 0).

example:

00 00 00 00 00 00 00 00

RISC-V Sv39 PTE: all zeros (invalid)


provenance

agent: curl -H 'accept: application/json' wire.phall.io/wire-format/riscv-page-table-entry or /wire-format/riscv-page-table-entry.json