Pass Multiboot structure pointer as argument

This commit is contained in:
Philipp Oppermann
2015-08-17 15:16:38 +02:00
parent 88455c3f85
commit 6713e55073
3 changed files with 3 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ section .text
bits 32
start:
mov esp, stack_top
mov edi, ebx
call check_multiboot
call check_cpuid

View File

@@ -20,7 +20,7 @@ bits 64
long_mode_start:
call setup_SSE
; call rust main
; call rust main (with multiboot pointer in rdi)
call rust_main
.os_returned:
; rust main returned, print `OS returned!`

View File

@@ -24,7 +24,7 @@ use core::fmt::Write;
mod vga_buffer;
#[no_mangle]
pub extern fn rust_main() {
pub extern fn rust_main(multiboot_address: usize) {
// ATTENTION: we have a very small stack and no guard page
use vga_buffer::{Writer, Color};