[−][src]Struct sunrise_kernel::devices::lapic::LocalApic
LocalApic driver.
Fields
internal: &'static UnsafeCell<LocalApicInternal>
Pointer to the LocalApic registers.
Implementations
impl LocalApic
[src]
pub unsafe fn new(address: PhysicalAddress) -> Self
[src]
Create a new LocalApic at the specified address.
Panics
Panics if address is not page-aligned.
Safety
address
should be the physical address of a LocalApic device, and
should not be shared.
pub fn enable(&self)
[src]
10.4.3 Enabling or Disabling the Local APIC
The local APIC can be enabled or disabled in either of two ways:
- Using the APIC global enable/disable flag in the IA32_APIC_BASE MSR (MSR address 1BH; see Figure 10-5)
- Using the APIC software enable/disable flag in the spurious-interrupt vector register (see Figure 10-23)
pub fn acknowledge(&self)
[src]
Acknowledge the last interrupt, signaling an end of interrupt.
See chapter 10.8: Handling Interrupts
pub fn local_apic_id(&self) -> u32
[src]
Unique ID of this Local APIC. May also be used as a way to uniquely identify a CPU.
pub fn in_service(&self) -> [u32; 8]
[src]
The ISR contains interrupt requests that have been dispatched to the processor for servicing, but not yet acknowledged by said processor.
See chapter 10.8.4: Interrupt Acceptance for Fixed Interrupts.
pub fn trigger_mode(&self) -> [u32; 8]
[src]
The trigger mode register (TMR) indicates the trigger mode of the interrupt. Upon acceptance of an interrupt into the IRR, the corresponding TMR bit is cleared for edge-triggered interrupts and set for level-triggered interrupts. If a TMR bit is set when an EOI cycle for its corresponding interrupt vector is generated, an EOI message is sent to all I/O APICs.
See chapter 10.8.4: Interrupt Acceptance for Fixed Interrupts.
pub fn interrupt_request_register(&self) -> [u32; 8]
[src]
The IRR contains the active interrupt requests that have been accepted, but not yet dispatched to the processor for servicing.
See chapter 10.8.4: Interrupt Acceptance for Fixed Interrupts.
pub fn send_interrupt_command(&mut self, val: u64)
[src]
Sends an IPI.
See 10.6 Issuing Interprocessor Interrupts
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,