From 4b2f23e55f27b6baccf3e858234e69685d51fcf4 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Tue, 15 Mar 2022 11:20:56 +0100 Subject: [PATCH] feat(stm32mp1): configure the serial boot load address For product with 128MB DDR size, the OP-TEE is located at the end of the DDR and the FIP can't be loaded at the default location because it overlap the OP-TEE final location. So the default value for DWL_BUFFER_BASE is invalid. To avoid this conflict the serial boot load address = DWL_BUFFER_BASE can be modified with a configuration flags. Signed-off-by: Patrick Delaunay Change-Id: Ie27b87c10c57fea5d4c6200ce4f624e775b9a080 --- docs/plat/stm32mp1.rst | 2 ++ plat/st/stm32mp1/include/platform_def.h | 1 - plat/st/stm32mp1/platform.mk | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/plat/stm32mp1.rst b/docs/plat/stm32mp1.rst index 7ae98b1d2..be86ae48b 100644 --- a/docs/plat/stm32mp1.rst +++ b/docs/plat/stm32mp1.rst @@ -144,6 +144,8 @@ Other configuration flags: - | ``DTB_FILE_NAME``: to precise board device-tree blob to be used. | Default: stm32mp157c-ev1.dtb +- | ``DWL_BUFFER_BASE``: the 'serial boot' load address of FIP, + | default location (end of the first 128MB) is used when absent - | ``STM32MP_EARLY_CONSOLE``: to enable early traces before clock driver is setup. | Default: 0 (disabled) - | ``STM32MP_UART_BAUDRATE``: to select UART baud rate. diff --git a/plat/st/stm32mp1/include/platform_def.h b/plat/st/stm32mp1/include/platform_def.h index 9c552264e..fe4ef3d44 100644 --- a/plat/st/stm32mp1/include/platform_def.h +++ b/plat/st/stm32mp1/include/platform_def.h @@ -103,7 +103,6 @@ #define PLAT_STM32MP_NS_IMAGE_OFFSET BL33_BASE /* Needed by STM32CubeProgrammer support */ -#define DWL_BUFFER_BASE (STM32MP_DDR_BASE + U(0x07000000)) #define DWL_BUFFER_SIZE U(0x01000000) /* diff --git a/plat/st/stm32mp1/platform.mk b/plat/st/stm32mp1/platform.mk index 7203de88d..be07a4bf8 100644 --- a/plat/st/stm32mp1/platform.mk +++ b/plat/st/stm32mp1/platform.mk @@ -121,6 +121,9 @@ STM32MP_EMMC_BOOT ?= 0 STM32MP_USB_PROGRAMMER ?= 0 STM32MP_UART_PROGRAMMER ?= 0 +# Download load address for serial boot devices +DWL_BUFFER_BASE ?= 0xC7000000 + # Device tree ifeq ($(STM32MP13),1) BL2_DTSI := stm32mp13-bl2.dtsi @@ -225,6 +228,7 @@ $(eval $(call assert_numerics,\ $(eval $(call add_defines,\ $(sort \ + DWL_BUFFER_BASE \ PLAT_PARTITION_MAX_ENTRIES \ PLAT_XLAT_TABLES_DYNAMIC \ STM32_TF_A_COPIES \