From 8109f738ffa79a63735cba29da26e7c2859977b5 Mon Sep 17 00:00:00 2001 From: Hugh Cole-Baker Date: Mon, 8 Jun 2020 22:24:36 +0100 Subject: [PATCH] rockchip: increase FDT buffer size The size of buffer currently used to store the FDT passed from U-Boot as a platform parameter is not large enough to store some RK3399 device trees. The largest RK3399 device tree currently in U-Boot (for the Pinebook Pro) is about 70KB in size when passed to TF-A, so increase the buffer size to 128K which gives some headroom for possibly larger FDTs in future. Signed-off-by: Hugh Cole-Baker Change-Id: I414caf20683cd47c02ee470dfa988544f3809919 --- plat/rockchip/common/params_setup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plat/rockchip/common/params_setup.c b/plat/rockchip/common/params_setup.c index b2fd2011e..2ff81eda7 100644 --- a/plat/rockchip/common/params_setup.c +++ b/plat/rockchip/common/params_setup.c @@ -37,7 +37,8 @@ static int dt_process_fdt(u_register_t param_from_bl2) static uint32_t rk_uart_base = PLAT_RK_UART_BASE; static uint32_t rk_uart_baudrate = PLAT_RK_UART_BAUDRATE; static uint32_t rk_uart_clock = PLAT_RK_UART_CLOCK; -static uint8_t fdt_buffer[0x10000]; +#define FDT_BUFFER_SIZE 0x20000 +static uint8_t fdt_buffer[FDT_BUFFER_SIZE]; void *plat_get_fdt(void) { @@ -136,7 +137,7 @@ static int dt_process_fdt(u_register_t param_from_bl2) void *fdt = plat_get_fdt(); int ret; - ret = fdt_open_into((void *)param_from_bl2, fdt, 0x10000); + ret = fdt_open_into((void *)param_from_bl2, fdt, FDT_BUFFER_SIZE); if (ret < 0) return ret;