From a08957914b955eb08d85e5397403871b5f44f30d Mon Sep 17 00:00:00 2001 From: czjstmax Date: Tue, 24 Feb 2026 15:19:31 +0100 Subject: fix limine configuration Signed-off-by: czjstmax --- Makefile | 2 +- README.md | 3 +++ limine.conf | 11 ++++++----- src/kernel/main.c | 29 ++++++++++++++++------------- 4 files changed, 26 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index b016f4f..9184028 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ iso: $(KERNEL) limine bios-install $(ISO_IMAGE) run: iso - qemu-system-x86_64 -cdrom $(ISO_IMAGE) + qemu-system-x86_64 -cdrom $(ISO_IMAGE) #-vga std -device VGA,edid=on,xres=640,yres=320 clean: rm -vrf $(BUILD_DIR) diff --git a/README.md b/README.md index 2d92016..e40896b 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,9 @@ a minimal and experimental x86_64 heapless unix-like OS von czjstmax. \ the name is based off the german word for trash. haha. +  +> you can test müllos by running `make run` in the cloned repo. + --- #### things diff --git a/limine.conf b/limine.conf index 9cd51e0..30bbf0e 100644 --- a/limine.conf +++ b/limine.conf @@ -1,6 +1,7 @@ -TIMEOUT=0 -DEFAULT_ENTRY=mullos +default_entry: mullos +timeout: 0 + +/mullos + protocol: limine + kernel_path: boot():/boot/kernel.elf -:mullos - PROTOCOL=limine - KERNEL_PATH=boot:///kernel.elf diff --git a/src/kernel/main.c b/src/kernel/main.c index 7584827..e62740c 100644 --- a/src/kernel/main.c +++ b/src/kernel/main.c @@ -1,6 +1,3 @@ -#ifndef MÜLL_KERN -#define MÜLL_KERN - /* * müll_kernel */ @@ -9,27 +6,35 @@ #include // external includes -#include "limine.h" +#include "headers/limine.h" -// API includes -#include "api/io.h" +// limine things +__attribute__((used, section(".limine_requests_start"))) +static volatile uint64_t limine_requests_start_marker[] = LIMINE_REQUESTS_START_MARKER; __attribute__((used, section(".limine_requests"))) -static volatile LIMINE_BASE_REVISION(2); +static volatile uint64_t limine_base_revision[] = LIMINE_BASE_REVISION(3); -static volatile struct limine_framebuffer_request fb_request = { - .id = LIMINE_FRAMEBUFFER_REQUEST, +__attribute__((used, section(".limine_requests"))) +static volatile struct limine_framebuffer_request framebuffer_request = { + .id = LIMINE_FRAMEBUFFER_REQUEST_ID, .revision = 0 }; +__attribute__((used, section(".limine_requests_end"))) +static volatile uint64_t limine_requests_end_marker[] = LIMINE_REQUESTS_END_MARKER; + +// API includes +#include "api/io.h" + void kmain(void) __attribute__((noreturn)); void _start(void) { - if (!fb_request.response) { + if (!framebuffer_request.response) { for (;;) __asm__("hlt"); } struct limine_framebuffer *fb = - fb_request.response->framebuffers[0]; + framebuffer_request.response->framebuffers[0]; uint32_t *pix = fb->address; pix[0] = 0x00FFFFFF; // white pixel @@ -38,5 +43,3 @@ void _start(void) { for (;;) __asm__("hlt"); } -#endif - -- cgit v1.3.1