Struct ApicBase
pub struct ApicBase;Expand description
IA32_APIC_BASE: status and location of the local APIC
IA32_APIC_BASE must be supported on the CPU, otherwise, a general protection exception will occur. Support can be detected using the cpuid instruction.
Implementations§
§impl ApicBase
impl ApicBase
pub fn read() -> (PhysFrame, ApicBaseFlags)
pub fn read() -> (PhysFrame, ApicBaseFlags)
Reads the IA32_APIC_BASE MSR.
pub unsafe fn write(frame: PhysFrame, flags: ApicBaseFlags)
pub unsafe fn write(frame: PhysFrame, flags: ApicBaseFlags)
Writes the IA32_APIC_BASE MSR preserving reserved values.
Preserves the value of reserved fields.
§Safety
Unsafe because changing the APIC base address allows hijacking a page of physical memory space in ways that would violate Rust’s memory rules.
pub unsafe fn write_raw(frame: PhysFrame, flags: u64)
pub unsafe fn write_raw(frame: PhysFrame, flags: u64)
Writes the IA32_APIC_BASE MSR flags.
Does not preserve any bits, including reserved fields.
§Safety
Unsafe because it’s possible to set reserved bits to 1 and changing the APIC base address allows hijacking a page of physical memory space in ways that would violate Rust’s memory rules.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ApicBase
impl RefUnwindSafe for ApicBase
impl Send for ApicBase
impl Sync for ApicBase
impl Unpin for ApicBase
impl UnsafeUnpin for ApicBase
impl UnwindSafe for ApicBase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more