MCPcopy Create free account
hub / github.com/Ruddle/Fomos / init

Method init

bootloader/kernel/src/ioapic.rs:18–25  ·  view source on GitHub ↗
(info: &acpi::platform::interrupt::IoApic)

Source from the content-addressed store, hash-verified

16pub const IOAPICVER: u32 = 1;
17impl IoApic {
18 pub fn init(info: &acpi::platform::interrupt::IoApic) -> &Self {
19 let this = IO_APIC_0.get_or_init(move || Self {
20 id: info.id,
21 virt_address: phys_to_virt(PhysAddr::new(info.address as u64)),
22 global_system_int: info.global_system_interrupt_base,
23 });
24 this
25 }
26 pub unsafe fn set_sel(&self, reg: u32) {
27 volatile_store(self.virt_address.as_u64() as *mut u32, reg);
28 }

Callers

nothing calls this directly

Calls 1

phys_to_virtFunction · 0.85

Tested by

no test coverage detected