Expand description
Neutral shim mirroring the used subset of the x86_64 crate
(address types, page sizes, paging flags). Available on all arches:
on x86_64 it re-exports the real crate types, elsewhere it provides
neutral equivalents.
Architecture-neutral shim mirroring the subset of the x86_64 crate API
used by shared kernel code (address types, page sizes, paging flags).
Purpose: the ~42 use x86_64::... call-sites outside arch/ are being
rewritten to use crate::arch::xshim::... so the riscv64 backend can
provide its own implementations. On x86_64 the shim re-exports the real
crate types so behaviour is bit-identical.
Structs§
- Page
Table Flags - Possible flags for a page table entry.
- Phys
Addr - A 64-bit physical memory address.
- Phys
Frame - A physical memory frame.
- Virt
Addr - A canonical 64-bit virtual memory address.
Enums§
- Size2
MiB - A “huge” 2MiB page.
- Size4
KiB - A standard 4KiB page.
- Translate
Result - The return value of the
Translate::translatefunction.
Constants§
- PTR_
MASK - Address bits within a page-table entry (Sv48: PPN[2..0] + flags).
Traits§
- Translate
- Provides methods for translating virtual addresses.