antoni wrote:
I even have such a system. I have a bigger problem with completing the linked list of free physical memory.
I don't think anybody can help with that. Maybe first try to write a small program on your developer machine to figure out how to handle lists, and when it works, copy the code into your kernel. Using linked lists in C is basic and a required skill for OSDev.
antoni wrote:
GRUB's memory map doesn't give me any useful information:
https://pastebin.com/WUq1rzZQI read it in such a way, but it is rather correct:
https://pastebin.com/Y1wz47EfOf course, that's a memory map. You should get all the "available" records, put them into your allocator's free memory list on init, and forget about the other records (from the allocator's point of view).
antoni wrote:
There are a lot of things in memory. Like ACPI structures, or the VGA buffer. ACPI structures should be listed in the GRUB's map, I don't know why they aren't.
Because it's just an E820 map. Not all BIOS adds an ACPI record, you should look for
RSDP structure in the EBDA. That structure will hold a pointer to the root of the ACPI tables (either RSDT or XSDT). You might want to consider
BOOTBOOT, that returns a parsed, standardized and ordered memory map no matter the platform, and the ACPI pointer in
bootboot.x86_64.acpi_ptr as well (no need to search for it on BIOS and works with UEFI too).
Cheers,
bzt