Cleaning up and adding page fault handler
[tpg/acess2.git] / Kernel / arch / x86_64 / start64.asm
index c98afdb..04bac26 100644 (file)
@@ -2,9 +2,13 @@
 ; Acess2 x86_64 Port
 ;
 [bits 64]
+KERNEL_BASE    equ     0xFFFF800000000000
 
 [extern kmain]
 
+[extern gMultibootPtr]
+[extern gMultibootMagic]
+
 [section .text]
 [global start64]
 start64:
@@ -30,6 +34,8 @@ start64:
        mov rsp, gInitialKernelStack
        
        ; Call main
+       mov edi, [gMultibootMagic - KERNEL_BASE]
+       mov esi, [gMultibootPtr - KERNEL_BASE]
        call kmain
        
        cli
@@ -121,6 +127,6 @@ User_Syscall_Exit:
 
 [section .bss]
 [global gInitialKernelStack]
-       resd    1024*1  ; 1 Page
+       resd    1024*4  ; 4 Pages
 gInitialKernelStack:
 

UCC git Repository :: git.ucc.asn.au