@@ -10,11 +10,11 @@ use hermit_entry::elf::LoadedKernel;
1010use log:: info;
1111use multiboot:: information:: { MemoryManagement , Multiboot , PAddr } ;
1212use vm_fdt:: FdtWriterResult ;
13- use x86_64:: structures:: paging:: { PageSize , PageTableFlags , Size2MiB , Size4KiB } ;
13+ use x86_64:: structures:: paging:: { PageSize , Size2MiB , Size4KiB } ;
1414
1515use crate :: BootInfoExt ;
1616use crate :: arch:: x86_64:: physicalmem:: PhysAlloc ;
17- use crate :: arch:: x86_64:: { KERNEL_STACK_SIZE , SERIAL_IO_PORT , paging } ;
17+ use crate :: arch:: x86_64:: { KERNEL_STACK_SIZE , SERIAL_IO_PORT } ;
1818use crate :: fdt:: Fdt ;
1919
2020unsafe extern "C" {
@@ -81,12 +81,12 @@ impl DeviceTree {
8181pub fn find_kernel ( ) -> & ' static [ u8 ] {
8282 use core:: cmp;
8383
84- paging:: clean_up ( ) ;
84+ // paging::clean_up();
8585 // Identity-map the Multiboot information.
8686 unsafe {
8787 assert ! ( mb_info > 0 , "Could not find Multiboot information" ) ;
8888 info ! ( "Found Multiboot information at {mb_info:#x}" ) ;
89- paging:: map :: < Size4KiB > ( mb_info, mb_info, 1 , PageTableFlags :: empty ( ) )
89+ // paging::map::<Size4KiB>(mb_info, mb_info, 1, PageTableFlags::empty())
9090 }
9191
9292 let mut mem = Mem ;
@@ -126,21 +126,21 @@ pub fn find_kernel() -> &'static [u8] {
126126 // mapping starts. We cannot start the 2 MiB mapping right from
127127 // `first_module.end` because when it is aligned down, the
128128 // resulting mapping range may overlap with the 4 KiB mapping.
129- let first_module_mapping_end = first_module. start . align_up ( Size2MiB :: SIZE ) as usize ;
130- paging:: map_range :: < Size4KiB > (
131- first_module. start as usize ,
132- first_module. start as usize ,
133- first_module_mapping_end,
134- PageTableFlags :: empty ( ) ,
135- ) ;
129+ // let first_module_mapping_end = first_module.start.align_up(Size2MiB::SIZE) as usize;
130+ // paging::map_range::<Size4KiB>(
131+ // first_module.start as usize,
132+ // first_module.start as usize,
133+ // first_module_mapping_end,
134+ // PageTableFlags::empty(),
135+ // );
136136
137137 // map also the rest of the modules
138- paging:: map_range :: < Size2MiB > (
139- first_module_mapping_end,
140- first_module_mapping_end,
141- modules_mapping_end,
142- PageTableFlags :: empty ( ) ,
143- ) ;
138+ // paging::map_range::<Size2MiB>(
139+ // first_module_mapping_end,
140+ // first_module_mapping_end,
141+ // modules_mapping_end,
142+ // PageTableFlags::empty(),
143+ // );
144144
145145 unsafe { slice:: from_raw_parts ( ptr:: with_exposed_provenance ( elf_start) , elf_len) }
146146}
@@ -174,12 +174,12 @@ pub unsafe fn boot_kernel(kernel_info: LoadedKernel) -> ! {
174174 }
175175
176176 // map stack in the address space
177- paging:: map :: < Size4KiB > (
178- new_stack,
179- new_stack,
180- KERNEL_STACK_SIZE as usize / Size4KiB :: SIZE as usize ,
181- PageTableFlags :: WRITABLE ,
182- ) ;
177+ // paging::map::<Size4KiB>(
178+ // new_stack,
179+ // new_stack,
180+ // KERNEL_STACK_SIZE as usize / Size4KiB::SIZE as usize,
181+ // PageTableFlags::WRITABLE,
182+ // );
183183
184184 let stack = ptr:: addr_of_mut!( loader_end) . with_addr ( new_stack) ;
185185
0 commit comments