From 3e80780859c4cbe5223ca4329bfd6176f5c2c879 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 15 Aug 2022 20:48:23 +0200 Subject: kernel: port to multiboot2 --- src/kernel/arch/amd64/multiboot2.S | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/kernel/arch/amd64/multiboot2.S (limited to 'src/kernel/arch/amd64/multiboot2.S') diff --git a/src/kernel/arch/amd64/multiboot2.S b/src/kernel/arch/amd64/multiboot2.S new file mode 100644 index 0000000..b001eda --- /dev/null +++ b/src/kernel/arch/amd64/multiboot2.S @@ -0,0 +1,30 @@ +#define ASM_FILE 1 +#include "3rdparty/multiboot2.h" + +.section .multiboot +.align 8 +.set HEADERLEN, multiboot_header_end - multiboot_header +multiboot_header: + .long MULTIBOOT2_HEADER_MAGIC + .long MULTIBOOT_ARCHITECTURE_I386 + .long HEADERLEN + .long -(MULTIBOOT2_HEADER_MAGIC + MULTIBOOT_ARCHITECTURE_I386 + HEADERLEN) + + .align 8 + .short MULTIBOOT_HEADER_TAG_FRAMEBUFFER + .short 0 + .long 20 + .long 0 + .long 0 + .long 32 + + .align 8 + .short MULTIBOOT_HEADER_TAG_MODULE_ALIGN + .short 0 + .long 8 + + .align 8 + .short MULTIBOOT_HEADER_TAG_END + .short 0 + .long 8 +multiboot_header_end: -- cgit v1.2.3