Ask HN: How does an OS become aware of memory layout?
2 comments
PCs enumerate hardware with
https://en.wikipedia.org/wiki/ACPI
In that process the OS figures out the attached hardware and how to access it.
https://en.wikipedia.org/wiki/ACPI
In that process the OS figures out the attached hardware and how to access it.
RISC-V does majorly use the Device Tree[0].
[0] https://en.wikipedia.org/wiki/Devicetree
[0] https://en.wikipedia.org/wiki/Devicetree
One thing that isn't made very clear is how computers in the real world "know" the memory layout for memory mapped i/o (like, which addresses map to which devices in the physical address space).
I have a couple of questions: 1. Whose responsibility is it to define the memory layout (is it the ISA's? The MMU's?) 2. Do kernels know beforehand the layout? Or is it more common for them to discover at runtime?
Thanks