[PATCH] ARM: Fix device tree blob corruption.

Shaju Abraham shaju.abraham at linaro.org
Tue Sep 21 16:24:52 EST 2010


The device tree support for arm is broken in git://git.secretlab.ca/git/linux-2.6.git test-devtree. 
due to not reserving the memory used by the device tree blob.The device tree blob gets corrupted
as a result. The patch reserves the memblock used by device tree blob.

Signed-off-by: Shaju Abraham <shaju.abraham at linaro.org>
---
 arch/arm/mm/init.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 018b76e..c03ceb9 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -310,6 +310,8 @@ void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc)
 	}
 #endif
 #ifdef CONFIG_OF_FLATTREE
+	if (phys_devtree_size)
+		memblock_reserve(phys_devtree_start, phys_devtree_size);
 	if (phys_initrd_size)
 		memblock_reserve(phys_initrd_start, phys_initrd_size);
 #endif
-- 
1.7.2



More information about the devicetree-discuss mailing list