ARM64: rockchip: atf: place PBL malloc area within barebox proper malloc area

We should restrict pbl_malloc_init to PBL_MALLOC_SIZE as memsize[0] as a
whole also contains non-malloc area parts like barebox proper location,
the stack and the OP-TEE region if any.

Signed-off-by: Ahmad Fatoum <[email protected]>
---
 arch/arm/mach-rockchip/atf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-rockchip/atf.c b/arch/arm/mach-rockchip/atf.c
index f9dbc8b20c5a..8e10d6af445d 100644
--- a/arch/arm/mach-rockchip/atf.c
+++ b/arch/arm/mach-rockchip/atf.c
@@ -173,7 +173,7 @@ static void rockchip_atf_load_bl31(void *fdt)
        unsigned long bl31_ep;
 
        mmu_early_enable(membase[0], memsize[0]);
-       pbl_malloc_init(membase[0], memsize[0]);
+       pbl_malloc_init(membase[0], PBL_MALLOC_SIZE);
 
        bl31_ep = load_elf64_image_phdr(&bl31);
 
-- 
2.47.3


Reply via email to