Update some of the following posts to use blog_os::init

This commit is contained in:
Philipp Oppermann
2019-04-25 17:56:00 +02:00
parent fd8fb3e581
commit 8735bbefd4
3 changed files with 23 additions and 53 deletions

View File

@@ -305,16 +305,9 @@ Now we can try to access some memory outside our kernel:
#[no_mangle]
pub extern "C" fn _start() -> ! {
use blog_os::interrupts::PICS;
println!("Hello World{}", "!");
// set up the IDT first, otherwise we would enter a boot loop instead of
// invoking our page fault handler
blog_os::gdt::init();
blog_os::interrupts::init_idt();
unsafe { PICS.lock().initialize() };
x86_64::instructions::interrupts::enable();
blog_os::init();
// new
let ptr = 0xdeadbeaf as *mut u32;
@@ -354,7 +347,9 @@ Let's try to take a look at the page tables that our kernel runs on:
#[no_mangle]
pub extern "C" fn _start() -> ! {
[] // initialize GDT, IDT, PICS
println!("Hello World{}", "!");
blog_os::init();
use x86_64::registers::control::Cr3;