From 28ce5310c86ab658a009d43e9df3f96537fcb9a6 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Thu, 13 Apr 2017 17:49:27 +0200 Subject: [PATCH] Pass address of multiboot info structure to rust_main --- src/arch/x86_64/boot.asm | 1 + src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/arch/x86_64/boot.asm b/src/arch/x86_64/boot.asm index 0179991..6a9cb31 100644 --- a/src/arch/x86_64/boot.asm +++ b/src/arch/x86_64/boot.asm @@ -5,6 +5,7 @@ section .text bits 32 start: mov esp, stack_top + mov edi, ebx ; move Multiboot info pointer to edi call check_multiboot call check_cpuid diff --git a/src/lib.rs b/src/lib.rs index 822aef8..790a186 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,7 +12,7 @@ extern crate spin; mod vga_buffer; #[no_mangle] -pub extern fn rust_main() { +pub extern fn rust_main(multiboot_information_address: usize) { vga_buffer::clear_screen(); println!("Hello World{}", "!");