Pass multiboot pointer as argument to rust_main

This commit is contained in:
Philipp Oppermann
2015-11-12 17:52:22 +01:00
parent d07530d660
commit 73aa41e25e
4 changed files with 24 additions and 2 deletions

View File

@@ -19,6 +19,9 @@ section .text
bits 32
start:
mov esp, stack_top
; Move Multiboot info pointer to edi to pass it to the kernel. We must not
; modify the `edi` register until the kernel it called.
mov edi, ebx
call test_multiboot
call test_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!`