From 621acbd055d712ab8bf79054911155598fdb74d0 Mon Sep 17 00:00:00 2001 From: Quentin Schulz Date: Mon, 14 Nov 2022 17:40:33 +0100 Subject: [PATCH] fix(rockchip): align fdt buffer on 8 bytes Since commit 94b2f94bd632 ("feat(libfdt): upgrade libfdt source files"), 8-byte alignment of the FDT address is enforced to follow the DT standard. Rockchip implementation of params_early_setup loads the FDT address as passed by the bootloader into a buffer. This buffer is currently made of uint8_t which means it is not 8-byte aligned and might result in fdt_open_into failing. Instead, let's make this buffer uint64_t to make it 8-byte aligned. Cc: Quentin Schulz Signed-off-by: Quentin Schulz Change-Id: Ifcf0e0cf4000e3661d76d3c3a2fe3921f7fe44b9 --- plat/rockchip/common/params_setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plat/rockchip/common/params_setup.c b/plat/rockchip/common/params_setup.c index aec53eee2..68054ad19 100644 --- a/plat/rockchip/common/params_setup.c +++ b/plat/rockchip/common/params_setup.c @@ -38,7 +38,7 @@ 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; #define FDT_BUFFER_SIZE 0x20000 -static uint8_t fdt_buffer[FDT_BUFFER_SIZE]; +static uint64_t fdt_buffer[FDT_BUFFER_SIZE / 8]; void *plat_get_fdt(void) {