serenity icon indicating copy to clipboard operation
serenity copied to clipboard

Kernel/riscv64: Get the memory map from the FDT and dump it

Open Hendiadyoin1 opened this issue 2 years ago • 2 comments

LibDeviceTree: Make the dump more akin to the original fdtdump

This also makes it possible to compile the library in the Kernel

Meta: Compile fdtdump on lagom

Kernel/riscv64: Take the memory map from the FDT and dump it

For this the BootInfo struct was made architecture specific

Kernel/riscv64: Initialize PCI controllers with the help of the FDT

Currently the search path is limited to /soc/ but this is enough to get it to work on qemu.


depends on #22924 ~~and (not actually) on #22923~~

Hendiadyoin1 avatar Jan 26 '24 13:01 Hendiadyoin1

Conflicts with the hacky multiboot memory map, and some comments to address :)

ADKaster avatar Feb 08 '24 14:02 ADKaster

You don't seem to use validate_flattened_device_tree anywhere. Verifying that the FDT is valid might be a good idea. It looks like you should be able to use that function in init before MemoryManager init.

We sadly can't use that function in pre_init, as it uses warnln everywhere. Maybe at least verify the magic bytes before copying the fdt based on its totalsize?

spholz avatar Feb 22 '24 13:02 spholz