Struct X2APIC

Source
pub struct X2APIC { /* private fields */ }
Expand description

Represents an x2APIC driver instance.

Implementations§

Source§

impl X2APIC

Source

pub const fn new() -> Self

Create a new x2APIC driver object for the local core.

§Notes

The object needs to be initialized by calling attach() first which enables the x2APIC. There should be only one x2APIC object created per core.

Source

pub fn attach(&mut self)

Attach to APIC (enable x2APIC mode, initialize LINT0)

Source

pub fn detach(&mut self)

Detach from APIC (disable x2APIC and xAPIC mode).

Source

pub unsafe fn send_self_ipi(&self, vector: u64)

Send an IPI to yourself.

§Safety

Will interrupt core with vector.

Trait Implementations§

Source§

impl ApicControl for X2APIC

Abstracts common interface of APIC (x2APIC, xAPIC) hardware devices.

Source§

fn bsp(&self) -> bool

Is a bootstrap processor?

Source§

fn id(&self) -> u32

Read local x2APIC ID.

Source§

fn logical_id(&self) -> u32

In x2APIC mode, the 32-bit logical x2APIC ID, can be read from LDR.

Source§

fn version(&self) -> u32

Read APIC version.

Source§

fn tsc_enable(&mut self, vector: u8)

Enable TSC timer

Source§

fn tsc_set(&self, value: u64)

Set tsc deadline.

Source§

fn eoi(&mut self)

End Of Interrupt – Acknowledge interrupt delivery.

Source§

unsafe fn ipi_init(&mut self, core: ApicId)

Send a INIT IPI to a core.

Source§

unsafe fn ipi_init_deassert(&mut self)

Deassert INIT IPI.

Source§

unsafe fn ipi_startup(&mut self, core: ApicId, start_page: u8)

Send a STARTUP IPI to a core.

Source§

unsafe fn send_ipi(&mut self, icr: Icr)

Send a generic IPI.

Source§

impl Debug for X2APIC

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for X2APIC

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for X2APIC

§

impl RefUnwindSafe for X2APIC

§

impl Send for X2APIC

§

impl Sync for X2APIC

§

impl Unpin for X2APIC

§

impl UnwindSafe for X2APIC

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.