Memory map from device tree
Posted: Sun Apr 06, 2025 10:03 am
Is it possible to derive a memory map using a device tree, avoiding various hard-coded assumptions about regions?
I'm focusing on rpi4, mainly on qemu for now. I'd like to map the MMIO region and the Arm local peripheral regions based on the device tree, but the register blocks all seem to be fragmented, and some smaller than a page.
There doesn't seem to be a way of identifying them as larger regions.
Is this futile? Should I just hardcode per board I want to support?
I'm focusing on rpi4, mainly on qemu for now. I'd like to map the MMIO region and the Arm local peripheral regions based on the device tree, but the register blocks all seem to be fragmented, and some smaller than a page.
There doesn't seem to be a way of identifying them as larger regions.
Is this futile? Should I just hardcode per board I want to support?