Skip to content

Commit

Permalink
Updated loader.s
Browse files Browse the repository at this point in the history
  • Loading branch information
Isuruni authored Sep 11, 2021
1 parent 2381617 commit 2376401
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions loader.s
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
global loader ; the entry symbol for ELF

extern kmain ; function kmain is defined elsewhere
extern kernel_virtual_start ;
extern kernel_virtual_end ;
extern kernel_physical_start ;
extern kernel_physical_end ;

MAGIC_NUMBER equ 0x1BADB002 ; define the magic number constant
ALIGN_MODULES equ 0x00000001 ; tell GRUB to align modules
Expand Down Expand Up @@ -28,6 +32,10 @@ loader: ; the loader label (d
; stack (end of memory area)

push ebx ; multiboot info in ebx
push kernel_physical_end ;
push kernel_physical_start ;
push kernel_virtual_end ;
push kernel_virtual_start ;

call kmain ; Calling the function kmain

Expand Down

0 comments on commit 2376401

Please sign in to comment.