From 54522c92917453be4b0395effb8516ec8a432f83 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Wed, 26 Apr 2017 01:32:42 +0100 Subject: sunxi: A64: move SPL stack to end of SRAM A2 The SPL stack is usually located at the end of SRAM A1, where it grows towards the end of the SPL. For the really big AArch64 binaries the stack overwrites code pretty soon, so move the SPL stack to the end of SRAM A2, which is unused at this time. Signed-off-by: Andre Przywara Reviewed-by: Simon Glass Acked-by: Maxime Ripard Acked-by: Jagan Teki --- include/configs/sunxi-common.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/configs/sunxi-common.h') diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 997a92c8be..0511397a5b 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -187,7 +187,12 @@ #ifdef CONFIG_SUNXI_HIGH_SRAM #define CONFIG_SPL_TEXT_BASE 0x10040 /* sram start+header */ #define CONFIG_SPL_MAX_SIZE 0x7fc0 /* 32 KiB */ +#ifdef CONFIG_ARM64 +/* end of SRAM A2 for now, as SRAM A1 is pretty tight for an ARM64 build */ +#define LOW_LEVEL_SRAM_STACK 0x00054000 +#else #define LOW_LEVEL_SRAM_STACK 0x00018000 +#endif /* !CONFIG_ARM64 */ #else #define CONFIG_SPL_TEXT_BASE 0x40 /* sram start+header */ #define CONFIG_SPL_MAX_SIZE 0x5fc0 /* 24KB on sun4i/sun7i */ -- cgit From d29adf8eef4e9557326fd0bc09a08c7dfa688eab Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Wed, 26 Apr 2017 01:32:48 +0100 Subject: sunxi: enable automatic FIT build for 64-bit SoCs The Allwinner SoCs with 64-bit cores use an ARM Trusted Firmware binary, which needs to be loaded alongside U-Boot proper. Set the respective Kconfig options to let them select this feature and also automatically build the FIT image. Signed-off-by: Andre Przywara Acked-by: Maxime Ripard [Rename Kconfig path to arch/arm/mach-sunxi/Kconfig] Signed-off-by: Jagan Teki Reviewed-by: Jagan Teki --- include/configs/sunxi-common.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/configs/sunxi-common.h') diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 0511397a5b..3f86cefe0f 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -32,6 +32,10 @@ # define CONFIG_MACH_TYPE_COMPAT_REV 1 #endif +#ifdef CONFIG_ARM64 +#define CONFIG_BUILD_TARGET "u-boot.itb" +#endif + /* Serial & console */ #define CONFIG_SYS_NS16550_SERIAL /* ns16550 reg in the low bits of cpu reg */ -- cgit From 7f0ef5a945a0a9cef773c2b05b157d2fef3ea7ad Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Wed, 26 Apr 2017 01:32:49 +0100 Subject: sunxi: Store the device tree name in the SPL header This patch updates the mksunxiboot tool to optionally add the default device tree name string to the SPL header. This information can be used by the firmware upgrade tools to protect users from harming themselves by trying to upgrade to an incompatible bootloader. The primary use case here is a non-removable bootable media (such as NAND, eMMC or SPI flash), which already may have a properly working, but a little bit outdated bootloader installed. For example, the user may download or build a new U-Boot image for "Cubieboard", and then attemept to install it on a "Cubieboard2" hardware by mistake as a replacement for the already existing bootloader. If this happens, the flash programming tool can identify this problem and warn the user. The size of the SPL header is also increased from 64 bytes to 96 bytes to provide enough space for the device tree name string. [Andre: split patch to remove OF_LIST hash feature] Signed-off-by: Siarhei Siamashka Signed-off-by: Andre Przywara --- include/configs/sunxi-common.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/configs/sunxi-common.h') diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 3f86cefe0f..f042f0d0c2 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -189,8 +189,8 @@ #endif #ifdef CONFIG_SUNXI_HIGH_SRAM -#define CONFIG_SPL_TEXT_BASE 0x10040 /* sram start+header */ -#define CONFIG_SPL_MAX_SIZE 0x7fc0 /* 32 KiB */ +#define CONFIG_SPL_TEXT_BASE 0x10060 /* sram start+header */ +#define CONFIG_SPL_MAX_SIZE 0x7fa0 /* 32 KiB */ #ifdef CONFIG_ARM64 /* end of SRAM A2 for now, as SRAM A1 is pretty tight for an ARM64 build */ #define LOW_LEVEL_SRAM_STACK 0x00054000 @@ -198,8 +198,8 @@ #define LOW_LEVEL_SRAM_STACK 0x00018000 #endif /* !CONFIG_ARM64 */ #else -#define CONFIG_SPL_TEXT_BASE 0x40 /* sram start+header */ -#define CONFIG_SPL_MAX_SIZE 0x5fc0 /* 24KB on sun4i/sun7i */ +#define CONFIG_SPL_TEXT_BASE 0x60 /* sram start+header */ +#define CONFIG_SPL_MAX_SIZE 0x5fa0 /* 24KB on sun4i/sun7i */ #define LOW_LEVEL_SRAM_STACK 0x00008000 /* End of sram */ #endif -- cgit