pub const fn new_table(
        writable: bool,
        user_access: bool,
        mem_ty: PATMemoryType,
        page_table_phys: PhysAddr,
        xd: bool
    ) -> Self {
        let mut entry = page_table_phys | ENTRY_PRESENT;
        entry = mask_assign(entry, writable as u64, 1, 0, 1);
        entry = mask_assign(entry, user_access as u64, 2, 0, 1);
        entry = mask_assign(entry, mem_ty.pwt as u64, 3, 0, 1);
        entry = mask_assign(entry, mem_ty.pcd as u64, 4, 0, 1);
        entry = mask_assign(entry, 0, 7, 0, 1);
        entry = mask_assign(entry, xd as u64, 63, 0, 1);
        Self(entry)
    }
/// Create a PDT entry representing a Page Table Entry.
/// Make sure this page_phys is properly aligned (1 << 12 aligned)
Create a PDT entry representing a Page Table Entry.
Make sure this page_phys is properly aligned (1 << 12 aligned)
Create a PDT entry representing a Page Table Entry . Make sure this page_phys is properly aligned ( 1 << 12 aligned )
pub const fn new_table(
        writable: bool,
        user_access: bool,
        mem_ty: PATMemoryType,
        page_table_phys: PhysAddr,
        xd: bool
    ) -> Self {
        let mut entry = page_table_phys | ENTRY_PRESENT;
        entry = mask_assign(entry, writable as u64, 1, 0, 1);
        entry = mask_assign(entry, user_access as u64, 2, 0, 1);
        entry = mask_assign(entry, mem_ty.pwt as u64, 3, 0, 1);
        entry = mask_assign(entry, mem_ty.pcd as u64, 4, 0, 1);
        entry = mask_assign(entry, 0, 7, 0, 1);
        entry = mask_assign(entry, xd as u64, 63, 0, 1);
        Self(entry)
    }
pub const fn new_table ( writable : bool , user_access : bool , mem_ty : PATMemoryType , page_table_phys : PhysAddr , xd : bool ) -> Self { let mut entry = page_table_phys | ENTRY_PRESENT ; entry = mask_assign ( entry , writable as u64 , 1 , 0 , 1 ) ; entry = mask_assign ( entry , user_access as u64 , 2 , 0 , 1 ) ; entry = mask_assign ( entry , mem_ty . pwt as u64 , 3 , 0 , 1 ) ; entry = mask_assign ( entry , mem_ty . pcd as u64 , 4 , 0 , 1 ) ; entry = mask_assign ( entry , 0 , 7 , 0 , 1 ) ; entry = mask_assign ( entry , xd as u64 , 63 , 0 , 1 ) ; Self ( entry ) }
Create a PDT entry representing a Page Table Entry.
Create a PDT entry representing a Page Table Entry .
writable
bool
user_access
bool
mem_ty
PATMemoryType
page_table_phys
PhysAddr
xd
bool