Support IOMMU

This commit is contained in:
Yuke Peng
2023-07-05 06:35:07 -07:00
committed by Tate, Hongliang Tian
parent 829575b3a6
commit a47b98b160
19 changed files with 1311 additions and 89 deletions

View File

@ -1,6 +1,7 @@
mod boot;
pub(crate) mod cpu;
pub mod device;
pub mod iommu;
pub(crate) mod irq;
mod kernel;
pub(crate) mod mm;
@ -10,7 +11,7 @@ pub(crate) mod timer;
use alloc::fmt;
use core::fmt::Write;
use kernel::apic::ioapic;
use log::info;
use log::{info, warn};
pub(crate) fn before_all_init() {
enable_common_cpu_features();
@ -32,6 +33,10 @@ pub(crate) fn after_all_init() {
kernel::pic::enable();
}
}
match iommu::init() {
Ok(_) => {}
Err(err) => warn!("IOMMU initialization error:{:?}", err),
}
timer::init();
// Some driver like serial may use PIC
kernel::pic::init();