From 40f1732ccbd4143afea3224545833febe7beb455 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Tue, 18 Apr 2017 12:21:47 +0200 Subject: [PATCH] Call remap_the_kernel from rust_main --- src/lib.rs | 5 ++++- src/memory/mod.rs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 54d82a8..c9098da 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -53,7 +53,10 @@ pub extern fn rust_main(multiboot_information_address: usize) { kernel_start as usize, kernel_end as usize, multiboot_start, multiboot_end, memory_map_tag.memory_areas()); - loop{} + memory::remap_the_kernel(&mut frame_allocator, boot_info); + println!("It did not crash!"); + + loop {} } #[lang = "eh_personality"] extern fn eh_personality() {} diff --git a/src/memory/mod.rs b/src/memory/mod.rs index f8094bd..0b833f0 100644 --- a/src/memory/mod.rs +++ b/src/memory/mod.rs @@ -1,4 +1,5 @@ pub use self::area_frame_allocator::AreaFrameAllocator; +pub use self::paging::remap_the_kernel; use self::paging::PhysicalAddress; mod area_frame_allocator;