Skip to content

Commit

Permalink
platform: support EOI on the native platform
Browse files Browse the repository at this point in the history
Support EOI by issuing a write to the APIC EOI register.

Signed-off-by: Jon Lange <[email protected]>
  • Loading branch information
msft-jlange committed Dec 12, 2024
1 parent 8b5bc8a commit e975e4f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/src/platform/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use crate::utils::MemoryRegion;
#[cfg(debug_assertions)]
use crate::mm::virt_to_phys;

const APIC_MSR_EOI: u32 = 0x80B;
const APIC_MSR_ICR: u32 = 0x830;

#[derive(Clone, Copy, Debug)]
Expand Down Expand Up @@ -152,7 +153,7 @@ impl SvsmPlatform for NativePlatform {
}

fn eoi(&self) {
todo!();
write_msr(APIC_MSR_EOI, 0);
}

fn is_external_interrupt(&self, _vector: usize) -> bool {
Expand Down

0 comments on commit e975e4f

Please sign in to comment.