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§
Source§impl ApicBase
impl ApicBase
Sourcepub fn read() -> (PhysFrame, ApicBaseFlags)
pub fn read() -> (PhysFrame, ApicBaseFlags)
Reads the IA32_APIC_BASE MSR.
Sourcepub 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.
Sourcepub 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 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