StupidOS/kernel/kernel.s
d0p1 🏳️‍⚧️ a9fec6e18c feat: setup paging and map kernel to higher half
Kernel is now at 0xC0100000, but still we use 4MiB pages, instruction like 'invlpg' which are invalid for cpu prior to 486, and we don't ensure multiboot structures are mapped. Still lot of work
2023-07-12 13:31:08 +02:00

33 lines
437 B
ArmAsm

; File: kernel.s
[BITS 32]
%include "base.inc"
section .bss
align 16
stack_bottom:
resb 16384
global stack_top
stack_top:
section .text
; Function: kmain
global kmain
kmain:
push ebp
mov ebp, esp
extern serial_init
call serial_init
LOG msg_hello_world
leave
ret
section .rodata
msg_hello_world db "StupidOS v", STUPID_VERSION, " (built with ", __NASM_VER__, " on ", __DATE__, " ", __TIME__, ")", 0
file db __FILE__, 0