Directly use OffsetPageTable for create_example_mapping instead of impl trait

This commit is contained in:
Philipp Oppermann
2019-09-14 18:33:37 +02:00
parent 7ec727f69f
commit 5cced71fb0

View File

@@ -38,7 +38,7 @@ unsafe fn active_level_4_table(physical_memory_offset: VirtAddr) -> &'static mut
/// Creates an example mapping for the given page to frame `0xb8000`. /// Creates an example mapping for the given page to frame `0xb8000`.
pub fn create_example_mapping( pub fn create_example_mapping(
page: Page, page: Page,
mapper: &mut impl Mapper<Size4KiB>, mapper: &mut OffsetPageTable,
frame_allocator: &mut impl FrameAllocator<Size4KiB>, frame_allocator: &mut impl FrameAllocator<Size4KiB>,
) { ) {
use x86_64::structures::paging::PageTableFlags as Flags; use x86_64::structures::paging::PageTableFlags as Flags;