/// Initialize IO APICs by enumerating them
/// and making sure the device registers are mapped
/// in the kernel-space.
Initialize IO APICs by enumerating them
and making sure the device registers are mapped
in the kernel-space.
Initialize IO APICs by enumerating them and making sure the device registers are mapped in the kernel - space .
pub fn ioapic_initialize() {
    let ioapic_len = atopology::MACHINE_TOPOLOGY.io_apics().count();
    /*crate::memory::KernelAllocator::try_refill_tcache(4 * ioapic_len, 0)
    .expect("Refill didn't work");*/
    let kcb = get_kcb();
    for io_apic in atopology::MACHINE_TOPOLOGY.io_apics() {
        info!("Initialize IO APIC {:?}", io_apic);
        let paddr = PAddr::from(io_apic.address as u64);
        let ioapic_frame = Frame::new(paddr, BASE_PAGE_SIZE, 0);
        let vbase = PAddr::from(KERNEL_BASE);
        kcb.arch
            .init_vspace()
            .map_identity_with_offset(
                vbase,
                ioapic_frame.base,
                ioapic_frame.size(),
                MapAction::ReadWriteKernel,
            )
            .expect("Can't create APIC mapping?");
    }
}
pub fn ioapic_initialize ( ) { let ioapic_len = atopology :: MACHINE_TOPOLOGY . io_apics ( ) . count ( ) ; /*crate::memory::KernelAllocator::try_refill_tcache(4 * ioapic_len, 0)
    .expect("Refill didn't work");*/ let kcb = get_kcb ( ) ; for io_apic in atopology :: MACHINE_TOPOLOGY . io_apics ( ) { info ! ( " " io_apic ) ; let paddr = PAddr :: from ( io_apic . address as u64 ) ; let ioapic_frame = Frame :: new ( paddr , BASE_PAGE_SIZE , 0 ) ; let vbase = PAddr :: from ( KERNEL_BASE ) ; kcb . arch . init_vspace ( ) . map_identity_with_offset ( vbase , ioapic_frame . base , ioapic_frame . size ( ) , MapAction :: ReadWriteKernel , ) . expect ( " " ) ; } }
Initialize IO APICs by enumerating them
and making sure the device registers are mapped
in the kernel-space.
Initialize IO APICs by enumerating them and making sure the device registers are mapped in the kernel - space .