Page 1 of 1

Multiboot Info issues in Rust

Posted: Fri Mar 29, 2024 10:16 pm
by tux7k
This morning I started working on a "kernel" in Rust. I cloned the rust-barebones-kernel repo by thepowersgang on GitHub. After getting IDT working, I went ahead and started working on Multiboot2 info struct parsing. The value that gets passed on for the pointer is equal to 0x9500 on QEMU, which I believe is the physical address. When trying to use this value to parse it into a struct, I just get a page fault and nothing else. After doing some research I figured I might have to add the kernel base (located at 0xFFFFFFFF80000000), which does "work" but leads to crazy values in the multiboot tag struct (type: 129920, size: 2147549183).

Here is my code in a gist (sorry if gists are not accepted, first time posting here)

Thanks for any help y'all can give :D

Re: Multiboot Info issues in Rust

Posted: Tue Jun 11, 2024 6:48 pm
by Octocontrabass
Multiboot and Multiboot2 have different boot information formats. You're trying to parse Multiboot2 boot information, but your bootloader is giving you Multiboot boot information.