#[repr(transparent)]pub struct Cr3(u32);
Expand description
Contains the physical address of the base of the paging-structure hierarchy and two flags (PCD and PWT).
The PCD and PWT flags control caching of that paging structure in the processor’s internal data caches (they do not control TLB caching of page-directory information).
Tuple Fields§
§0: u32
Implementations§
Source§impl Cr3
impl Cr3
const WRITE_THROUGH_BITS: usize = 1usize
const WRITE_THROUGH_OFFSET: usize = 3usize
const CACHE_DISABLE_BITS: usize = 1usize
const CACHE_DISABLE_OFFSET: usize = 4usize
const ADDRESS_BITS: usize = 20usize
const ADDRESS_OFFSET: usize = 12usize
Sourcepub const fn write_through(&self) -> bool
pub const fn write_through(&self) -> bool
Page-level write-through.
Bits: 3..4
Sourcepub const fn with_write_through_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_write_through_checked(self, value: bool) -> Result<Self, ()>
Page-level write-through.
Bits: 3..4
Sourcepub const fn with_write_through(self, value: bool) -> Self
pub const fn with_write_through(self, value: bool) -> Self
Page-level write-through.
Bits: 3..4
Sourcepub const fn set_write_through(&mut self, value: bool)
pub const fn set_write_through(&mut self, value: bool)
Page-level write-through.
Bits: 3..4
Sourcepub const fn set_write_through_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_write_through_checked(&mut self, value: bool) -> Result<(), ()>
Page-level write-through.
Bits: 3..4
Sourcepub const fn cache_disable(&self) -> bool
pub const fn cache_disable(&self) -> bool
Page-level cache disable.
Bits: 4..5
Sourcepub const fn with_cache_disable_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_cache_disable_checked(self, value: bool) -> Result<Self, ()>
Page-level cache disable.
Bits: 4..5
Sourcepub const fn with_cache_disable(self, value: bool) -> Self
pub const fn with_cache_disable(self, value: bool) -> Self
Page-level cache disable.
Bits: 4..5
Sourcepub const fn set_cache_disable(&mut self, value: bool)
pub const fn set_cache_disable(&mut self, value: bool)
Page-level cache disable.
Bits: 4..5
Sourcepub const fn set_cache_disable_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_cache_disable_checked(&mut self, value: bool) -> Result<(), ()>
Page-level cache disable.
Bits: 4..5
Sourcepub const fn address(&self) -> Physical
pub const fn address(&self) -> Physical
Physical address of the page directory. The lower 12 bits of the address are assumed to be 0. The page directory must thus be aligned to a page (4K) boundary.
Bits: 12..32
Sourcepub const fn with_address_checked(self, value: Physical) -> Result<Self, ()>
pub const fn with_address_checked(self, value: Physical) -> Result<Self, ()>
Physical address of the page directory. The lower 12 bits of the address are assumed to be 0. The page directory must thus be aligned to a page (4K) boundary.
Bits: 12..32
Sourcepub const fn with_address(self, value: Physical) -> Self
pub const fn with_address(self, value: Physical) -> Self
Physical address of the page directory. The lower 12 bits of the address are assumed to be 0. The page directory must thus be aligned to a page (4K) boundary.
Bits: 12..32
Sourcepub const fn set_address(&mut self, value: Physical)
pub const fn set_address(&mut self, value: Physical)
Physical address of the page directory. The lower 12 bits of the address are assumed to be 0. The page directory must thus be aligned to a page (4K) boundary.
Bits: 12..32
Sourcepub const fn set_address_checked(&mut self, value: Physical) -> Result<(), ()>
pub const fn set_address_checked(&mut self, value: Physical) -> Result<(), ()>
Physical address of the page directory. The lower 12 bits of the address are assumed to be 0. The page directory must thus be aligned to a page (4K) boundary.
Bits: 12..32
Trait Implementations§
impl Copy for Cr3
Auto Trait Implementations§
impl Freeze for Cr3
impl RefUnwindSafe for Cr3
impl Send for Cr3
impl Sync for Cr3
impl Unpin for Cr3
impl UnwindSafe for Cr3
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut u8)
unsafe fn clone_to_uninit(&self, dst: *mut u8)
clone_to_uninit
)