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:
+5
-1
@@ -317,9 +317,13 @@ void forth_printf(const char* fmt, ...) {
|
||||
void kernel_main(uint64_t mboot_ptr) {
|
||||
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);
|
||||
while (tag->type != 0) {
|
||||
if (tag->type == 5) {
|
||||
if (tag->type == 8) {
|
||||
struct mboot_tag_framebuffer* fb = (struct mboot_tag_framebuffer*)tag;
|
||||
fb_addr = fb->framebuffer_addr;
|
||||
fb_pitch = fb->framebuffer_pitch;
|
||||
|
||||
Reference in New Issue
Block a user