Move src/modules/main -> src/kernel

This commit is contained in:
Justin C. Miller
2018-04-17 09:44:40 -07:00
parent 504de44ff3
commit 2050b89334
20 changed files with 26 additions and 14 deletions

40
src/kernel/boot.s Normal file
View File

@@ -0,0 +1,40 @@
MAGIC equ 0x600db007 ; Popcorn OS header magic number
section .header
align 4
global _header
_header:
dd MAGIC ; Kernel header magic
dw 1 ; Header version 1
dw 1 ; Kernel header length
db VERSION_MAJOR ; Kernel version
db VERSION_MINOR
dw VERSION_PATCH
dd VERSION_GITSHA
dq _start ; Kernel entrypoint
section .text
align 16
global _start:function (_start.end - _start)
_start:
cli
extern kernel_main
call kernel_main
cli
.hang:
hlt
jmp .hang
.end:
global interrupts_enable
interrupts_enable:
sti
ret
global interrupts_disable
interrupts_disable:
cli
ret