From: Quentin Schulz Date: Mon, 14 Nov 2022 16:40:33 +0000 (+0100) Subject: fix(rockchip): align fdt buffer on 8 bytes X-Git-Tag: baikal/aarch64/sdk5.9~13^2 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=621acbd055d712ab8bf79054911155598fdb74d0;p=arm-tf.git 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 --- 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) {