Fix compilation on x86
This commit is contained in:
@@ -17,6 +17,7 @@ use rmm::{
|
||||
PageFlags,
|
||||
PageMapper,
|
||||
PhysicalAddress,
|
||||
TableKind,
|
||||
VirtualAddress,
|
||||
};
|
||||
use spin::Mutex;
|
||||
@@ -100,6 +101,7 @@ unsafe fn inner<A: Arch>(
|
||||
|
||||
{
|
||||
let mut mapper = PageMapper::<A, _>::create(
|
||||
TableKind::Kernel,
|
||||
&mut bump_allocator
|
||||
).expect("failed to create Mapper");
|
||||
|
||||
@@ -298,7 +300,7 @@ impl KernelMapper {
|
||||
}
|
||||
}
|
||||
pub fn lock_manually(current_processor: usize) -> Self {
|
||||
unsafe { Self::lock_for_manual_mapper(current_processor, PageMapper::new(RmmA::table(), FRAME_ALLOCATOR)) }
|
||||
unsafe { Self::lock_for_manual_mapper(current_processor, PageMapper::current(TableKind::Kernel, FRAME_ALLOCATOR)) }
|
||||
}
|
||||
pub fn lock() -> Self {
|
||||
Self::lock_manually(crate::cpu_id())
|
||||
|
||||
@@ -18,7 +18,7 @@ use crate::gdt;
|
||||
use crate::idt;
|
||||
use crate::interrupt;
|
||||
use crate::log::{self, info};
|
||||
use crate::paging::{self, KernelMapper};
|
||||
use crate::paging::{self, KernelMapper, TableKind};
|
||||
|
||||
/// Test of zero values in BSS.
|
||||
static BSS_TEST_ZERO: usize = 0;
|
||||
@@ -234,7 +234,7 @@ pub unsafe extern fn kstart_ap(args_ptr: *const KernelArgsAp) -> ! {
|
||||
use crate::paging::{PageMapper, PhysicalAddress};
|
||||
use crate::rmm::FRAME_ALLOCATOR;
|
||||
|
||||
let mut mapper = KernelMapper::lock_for_manual_mapper(cpu_id, PageMapper::new(PhysicalAddress::new(bsp_table), FRAME_ALLOCATOR));
|
||||
let mut mapper = KernelMapper::lock_for_manual_mapper(cpu_id, PageMapper::new(TableKind::Kernel, PhysicalAddress::new(bsp_table), FRAME_ALLOCATOR));
|
||||
paging::init_ap(cpu_id, &mut mapper)
|
||||
};
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ use core::sync::atomic::AtomicBool;
|
||||
use alloc::sync::Arc;
|
||||
|
||||
use crate::gdt::{GDT, GDT_TSS};
|
||||
use crate::paging::{RmmA, RmmArch};
|
||||
use crate::paging::{RmmA, RmmArch, TableKind};
|
||||
use crate::syscall::FloatRegisters;
|
||||
|
||||
use memoffset::offset_of;
|
||||
|
||||
Reference in New Issue
Block a user