#[repr(C)]pub union PdptEntry {
    bits: u64,
    entry: Pdpte,
    leaf_1g: Pdpte1G,
}Expand description
L3 PDPTE union — overlays non-leaf Pdpte and leaf Pdpte1G
on the same 64-bit storage.
Use PdptEntry::view to obtain a typed
reference. These methods inspect the PS bit to decide which variant is
active and return a safe borrowed view.
Storing/retrieving raw bits is possible via from_bits/into_bits.
Fields§
§bits: u64Raw 64-bit storage of the entry.
entry: PdpteNon-leaf form: next-level Page Directory (PS=0).
leaf_1g: Pdpte1GLeaf form: 1 GiB mapping (PS=1).
Implementations§
Source§impl PdptEntry
 
impl PdptEntry
pub const fn new() -> Self
pub const fn new_entry(entry: Pdpte) -> Self
pub const fn new_leaf(leaf: Pdpte1G) -> Self
pub const fn present(self) -> bool
Sourcepub const fn view(self) -> L3View
 
pub const fn view(self) -> L3View
Typed read-only view chosen by the PS bit.
- If PS=1 → 
L3View::Leaf1G - If PS=0 → 
L3View::Entry 
This function is safe: it returns a view consistent with the PS bit.
Sourcepub const fn kind(self) -> Option<PdptEntryKind>
 
pub const fn kind(self) -> Option<PdptEntryKind>
Decode the entry into its semantic kind, or None if not present.
- When 
PS=1, returnsPdptEntryKind::Leaf1GiBwith a 1 GiB page base. - When 
PS=0, returnsPdptEntryKind::NextPageDirectorywith a PD base. 
Sourcepub const fn present_next_with(
    flags: VirtualMemoryPageBits,
    page: PhysicalPage<Size4K>,
) -> Self
 
pub const fn present_next_with( flags: VirtualMemoryPageBits, page: PhysicalPage<Size4K>, ) -> Self
Create a non-leaf PDPTE that points to a Page Directory (PS=0).
Sets present=1, forces PS=0, and writes the PD base address.
The PD base must be 4 KiB-aligned.
Sourcepub const fn present_leaf_with(
    flags: VirtualMemoryPageBits,
    page: PhysicalPage<Size1G>,
) -> Self
 
pub const fn present_leaf_with( flags: VirtualMemoryPageBits, page: PhysicalPage<Size1G>, ) -> Self
Create a 1 GiB leaf PDPTE (PS=1).
Sets present=1, forces PS=1, and writes the large-page base address.
The page base must be 1 GiB-aligned.