feat: add multiboot2 framebuffer and Forth pixel primitives
Co-authored-by: aider (openrouter/moonshotai/kimi-k2.6) <aider@aider.chat>
This commit is contained in:
@@ -8,6 +8,19 @@ multiboot_header:
|
||||
.long multiboot_header_end - multiboot_header
|
||||
.long -(0xe85250d6 + 0 + (multiboot_header_end - multiboot_header))
|
||||
|
||||
/* Framebuffer tag: type=5, prefer RGB 32 bpp */
|
||||
.align 8
|
||||
.word 5
|
||||
.word 0
|
||||
.long 32
|
||||
.quad 0
|
||||
.long 0
|
||||
.long 0
|
||||
.long 32
|
||||
.byte 1
|
||||
.byte 0
|
||||
.word 0
|
||||
|
||||
.align 8
|
||||
.word 0
|
||||
.word 0
|
||||
@@ -28,12 +41,17 @@ stack_bottom:
|
||||
.space 16384
|
||||
stack_top:
|
||||
|
||||
.align 8
|
||||
mboot_info_ptr:
|
||||
.space 8
|
||||
|
||||
.section .text
|
||||
.code32
|
||||
.global _start
|
||||
.type _start, @function
|
||||
_start:
|
||||
movl $stack_top, %esp
|
||||
movl %ebx, mboot_info_ptr
|
||||
|
||||
cld
|
||||
movl $__bss_start, %edi
|
||||
@@ -96,6 +114,7 @@ long_mode_start:
|
||||
/* Ensure 16-byte alignment for the System V AMD64 ABI. */
|
||||
andq $-16, %rsp
|
||||
|
||||
movq mboot_info_ptr, %rdi
|
||||
call kernel_main
|
||||
cli
|
||||
1:
|
||||
|
||||
Reference in New Issue
Block a user