Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aarch64: re-introduce dtb relocation
This allows us to use the global dtb pointer again after switching to the runtime page tables. Qemu reserves 1MB for the device tree, but only ~7KB of this is actually used. Use fdt_pack() to shrink the size of the dtb to the minimum, then relocate it into the 64KB reserved area, overwriting the preboot.S code as explained in the following commit: 3024ac3 aarch64: dtb: read amount of memory from device tree This partially reverts the following commit: 69a0ce3 arm: do not relocate DTB, instead read it ahead of time Use fdt_open_into() to relocate the DTB, and reserve the whole 64KB area to allow for some extra room in case any OSv driver would ever want to manipulate or add properties to the device tree after relocation. The 64KB reserved area should hopefully be large enough to describe any device we'd see when running as a hypervisor guest. I have seen DTBs as large as 58KB, but in that case there were a ton of extra peripherals that we'd be unlikely to ever see when running as a hypervisor guest. Signed-off-by: Stewart Hildebrand <stewart.hildebrand@dornerworks.com> Message-Id: <20210219215249.25453-2-stewart.hildebrand@dornerworks.com>
- Loading branch information