diff options
author | Tom Rini <trini@konsulko.com> | 2018-01-03 12:27:12 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-01-03 12:27:12 -0500 |
commit | ca833ca9579b29c5667ea2fa7a9d3f89f1599a94 (patch) | |
tree | 3de537db351a343d21ae1a496c9622c742b242eb | |
parent | f9d891f0a903820100b42f25ba47593519b6b516 (diff) | |
parent | e2a75f022d3503b6a5bfcbee660e56383666d107 (diff) | |
download | u-boot-ca833ca9579b29c5667ea2fa7a9d3f89f1599a94.tar.gz u-boot-ca833ca9579b29c5667ea2fa7a9d3f89f1599a94.tar.bz2 u-boot-ca833ca9579b29c5667ea2fa7a9d3f89f1599a94.zip |
Merge git://git.denx.de/u-boot-rockchip
-rw-r--r-- | board/theobroma-systems/lion_rk3368/Kconfig | 6 | ||||
-rw-r--r-- | common/spl/Kconfig | 18 | ||||
-rw-r--r-- | common/spl/spl_atf.c | 12 | ||||
-rw-r--r-- | configs/firefly-rk3399_defconfig | 1 |
4 files changed, 34 insertions, 3 deletions
diff --git a/board/theobroma-systems/lion_rk3368/Kconfig b/board/theobroma-systems/lion_rk3368/Kconfig index d7aa487abd..fddbf826df 100644 --- a/board/theobroma-systems/lion_rk3368/Kconfig +++ b/board/theobroma-systems/lion_rk3368/Kconfig @@ -12,4 +12,10 @@ config SYS_CONFIG_NAME config BOARD_SPECIFIC_OPTIONS # dummy def_bool y +config ENV_SIZE + default 0x2000 + +config ENV_OFFSET + default 0x3c000 if ENV_IS_IN_SPI_FLASH + endif diff --git a/common/spl/Kconfig b/common/spl/Kconfig index aef0034b33..9d35f41233 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -721,10 +721,24 @@ config SPL_ATF bool "Support ARM Trusted Firmware" depends on ARM64 help - ATF(ARM Trusted Firmware) is a component for ARM arch64 which - is loaded by SPL(which is considered as BL2 in ATF terminology). + ATF(ARM Trusted Firmware) is a component for ARM AArch64 which + is loaded by SPL (which is considered as BL2 in ATF terminology). More detail at: https://github.com/ARM-software/arm-trusted-firmware +config SPL_ATF_NO_PLATFORM_PARAM + bool "Pass no platform parameter" + depends on SPL_ATF + help + While we expect to call a pointer to a valid FDT (or NULL) + as the platform parameter to an ATF, some ATF versions are + not U-Boot aware and have an insufficiently robust parameter + validation to gracefully reject a FDT being passed. + + If this option is enabled, the spl_atf os-type handler will + always pass NULL for the platform parameter. + + If your ATF is affected, say Y. + config TPL bool depends on SUPPORT_TPL diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c index 63557c01e8..a942de9964 100644 --- a/common/spl/spl_atf.c +++ b/common/spl/spl_atf.c @@ -144,6 +144,7 @@ void spl_invoke_atf(struct spl_image_info *spl_image) { uintptr_t bl33_entry = CONFIG_SYS_TEXT_BASE; void *blob = spl_image->fdt_addr; + uintptr_t platform_param = (uintptr_t)blob; int node; /* @@ -158,8 +159,17 @@ void spl_invoke_atf(struct spl_image_info *spl_image) bl33_entry = spl_fit_images_get_entry(blob, node); /* + * If ATF_NO_PLATFORM_PARAM is set, we override the platform + * parameter and always pass 0. This is a workaround for + * older ATF versions that have insufficiently robust (or + * overzealous) argument validation. + */ + if (CONFIG_IS_ENABLED(ATF_NO_PLATFORM_PARAM)) + platform_param = 0; + + /* * We don't provide a BL3-2 entry yet, but this will be possible * using similar logic. */ - bl31_entry(spl_image->entry_point, bl33_entry, (uintptr_t)blob); + bl31_entry(spl_image->entry_point, bl33_entry, platform_param); } diff --git a/configs/firefly-rk3399_defconfig b/configs/firefly-rk3399_defconfig index ab2501528f..4071fea933 100644 --- a/configs/firefly-rk3399_defconfig +++ b/configs/firefly-rk3399_defconfig @@ -15,6 +15,7 @@ CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-rockchip/make_fit_atf.py" CONFIG_SPL_STACK_R=y CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x4000 CONFIG_SPL_ATF=y +CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPT=y CONFIG_CMD_MMC=y |