[PATCH u-boot-mvebu 1/3] arm: mvebu: a37xx: Fix calling build_mem_map()

Marek Behún marek.behun at nic.cz
Tue Feb 15 14:15:56 CET 2022

On Tue, 15 Feb 2022 00:28:33 +0100
Pali Rohár <pali at kernel.org> wrote:

> Function build_mem_map() modifies global variable mem_map. This variable is
> used by the get_page_table_size() function which is called by function
> arm_reserve_mmu() (as aliased macro PGTABLE_SIZE). Function
> arm_reserve_mmu() is called earlier than enable_caches() which calls
> build_mem_map(). So arm_reserve_mmu() does not calculate reserved memory
> correctly.
> Fix this issue by calling build_mem_map() from a3700_dram_init() which is
> called before arm_reserve_mmu().
> Signed-off-by: Pali Rohár <pali at kernel.org>

Reviewed-by: Marek Behún <marek.behun at nic.cz>

More information about the U-Boot mailing list