limine-bootloader / limine

Modern, advanced, portable, multiprotocol bootloader and boot manager.
https://limine-bootloader.org
BSD 2-Clause "Simplified" License
1.87k stars 141 forks source link

[protocol/limine] DTB is marked as usable memory, not reclaimable memory #384

Closed robotman2412 closed 4 months ago

robotman2412 commented 4 months ago

In BadgerOS, I'm currently working on supporting the DTB format for detecting devices. The limine protocol has a way to get a pointer to the DTB, this is the part that works.

What doesn't work is the memmap; the pointer to the DTB is in an area of memory marked "usable" (instead of bootloader/ACPI/whatever reclaimable). Because this is also the largest area of free memory, the kernel uses it for early alloc and as part of that zeroes the entire thing.

Small problem: That includes the DTB itself, which I still need. I currently have no good way to work around this other than eliminating memories with the DTB in it as candidates for early alloc.

robotman2412 commented 4 months ago

All files related to interaction with the limine protocol in BadgerOS are here: https://github.com/badgeteam/BadgerOS/tree/dtb/kernel/port/generic

robotman2412 commented 4 months ago

lmao nice