Skip to main content

Module xshim

Module xshim 

Source
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§

PageTableFlags
Possible flags for a page table entry.
PhysAddr
A 64-bit physical memory address.
PhysFrame
A physical memory frame.
VirtAddr
A canonical 64-bit virtual memory address.

Enums§

Size2MiB
A “huge” 2MiB page.
Size4KiB
A standard 4KiB page.
TranslateResult
The return value of the Translate::translate function.

Constants§

PTR_MASK
Address bits within a page-table entry (Sv48: PPN[2..0] + flags).

Traits§

Translate
Provides methods for translating virtual addresses.