The addr
field in MemoryRegion should be usize
not *const ()
MemoryRegion
is a general data structure to define a "mathematical" memory region, and not just some allocation, as might be implied by the use of a pointer for addr
. After doing some research into pointers, I believe the use of pointers like this actually counts as undefined behaviour, as addr
is not required by MemoryRegion
to be inside an allocation, but pointers are required to be in memory allocations.
To fix this, I think a lot of code will need to be changed, especially in the device_tree
module.