fix: use correct multiboot2 framebuffer info tag type (8 not 5)

Co-authored-by: aider (openrouter/anthropic/claude-opus-4.7) <aider@aider.chat>
This commit is contained in:
2026-05-05 22:28:09 +03:00
parent 1d16c23fc5
commit b50883b3ed
+5 -1
View File
@@ -317,9 +317,13 @@ void forth_printf(const char* fmt, ...) {
void kernel_main(uint64_t mboot_ptr) { void kernel_main(uint64_t mboot_ptr) {
extern void isr_keyboard(void); extern void isr_keyboard(void);
/* Multiboot2 info tag types:
* 5 = BIOS boot device, 6 = memory map, 8 = framebuffer info, ...
* Note: in the *header* (request side), type 5 means "framebuffer
* request", but the bootloader's *response* tag uses type 8. */
struct mboot_tag* tag = (struct mboot_tag*)(mboot_ptr + 8); struct mboot_tag* tag = (struct mboot_tag*)(mboot_ptr + 8);
while (tag->type != 0) { while (tag->type != 0) {
if (tag->type == 5) { if (tag->type == 8) {
struct mboot_tag_framebuffer* fb = (struct mboot_tag_framebuffer*)tag; struct mboot_tag_framebuffer* fb = (struct mboot_tag_framebuffer*)tag;
fb_addr = fb->framebuffer_addr; fb_addr = fb->framebuffer_addr;
fb_pitch = fb->framebuffer_pitch; fb_pitch = fb->framebuffer_pitch;