[PATCH] ARM: Fix device tree blob corruption.
Grant Likely
grant.likely at secretlab.ca
Wed Sep 22 13:13:16 EST 2010
On Tue, Sep 21, 2010 at 3:24 AM, Shaju Abraham <shaju.abraham at linaro.org> wrote:
> 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);
Actually, the existing memblock_reserve line is buggy (copy & paste
error). I've fixed it in my tree now. I'll push it out once I get
home and have a chance to test it (Thursday).
g.
More information about the devicetree-discuss
mailing list