trying x86_64 support

This commit is contained in:
Marco Cetica
2021-02-03 18:05:18 +01:00
parent b20064b869
commit 634393b141
10 changed files with 192 additions and 19 deletions

27
kernel/cpu/main64.asm Normal file
View File

@@ -0,0 +1,27 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; vulcanOS Kernel ;
; Developed by Marco 'icebit' Cetica ;
; (c) 2019-2021 ;
; Released under GPLv3 ;
; https://github.com/ice-bit/vulcanos ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
GLOBAL long_mode_start
GLOBAL kernel_loader
EXTERN kernel_main
section .text
[BITS 64] ; Ensure we are in long mode
long_mode_start:
xor ax, ax
mov ss, ax
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
; Call the kernel's main method
call kernel_main ; Call kernel's main function
.loop:
jmp .loop ; If the kernel returns, go into an endless loop
; This will prevent the CPU to execure any non-kernel
; instructions.