gdt: make gdt setup run before kmain
This commit is contained in:
@@ -6,11 +6,27 @@ section .text
|
||||
dd 0x00
|
||||
dd - (0x1BADB002+0x00)
|
||||
|
||||
section .gdt
|
||||
%include "src/gdt.asm"
|
||||
|
||||
section .text
|
||||
global start
|
||||
extern kmain ; this function is gonna be located in our c code(kernel.c)
|
||||
|
||||
start:
|
||||
cli ;clears the interrupts
|
||||
|
||||
lgdt [gdt]
|
||||
mov ax, DATA_SEG
|
||||
mov ds, ax
|
||||
mov es, ax
|
||||
mov fs, ax
|
||||
mov gs, ax
|
||||
mov ss, ax
|
||||
jmp CODE_SEG:.huita
|
||||
|
||||
.huita:
|
||||
push ebx
|
||||
call kmain ;send processor to continue execution from the kamin funtion in c code
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user