use core::{
cell::RefCell,
hint::spin_loop,
ptr::{read_volatile, write_volatile},
};
use log::{debug, error, info};
use crate::{
mm::{
mmio_buddy::{mmio_pool, MMIOSpaceGuard},
percpu::PerCpu,
PhysAddr, VirtAddr,
},
smp::core::smp_get_processor_id,
};
use super::{hw_irq::ApicId, LVTRegister, LocalAPIC, LVT};
/// per-cpu的xAPIC的MMIO空间起始地址
static mut XAPIC_INSTANCES: [RefCell