According to Documentation/arm64/booting.txt the dtb can occupy the same page as the initrd. In fact qemu aligns it to 4K. However on a kernel with 64K pages, you can end up freeing part of the device tree when the initrd RAM is freed, causing bugs like this one: https://bugs.launchpad.net/qemu/+bug/1383857 Don't free partial first/last page when freeing initrd. Signed-off-by: Richard W.M. Jones <rjones@xxxxxxxxxx> --- arch/arm64/mm/init.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 494297c..77bdc39 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -335,11 +335,12 @@ void free_initrd_mem(unsigned long start, unsigned long end) { if (!keep_initrd) { if (start == initrd_start) - start = round_down(start, PAGE_SIZE); + start = round_up(start, PAGE_SIZE); if (end == initrd_end) - end = round_up(end, PAGE_SIZE); + end = round_down(end, PAGE_SIZE); - free_reserved_area((void *)start, (void *)end, 0, "initrd"); + if (start < end) + free_reserved_area((void *)start, (void *)end, 0, "initrd"); } } -- 2.1.0 _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm