From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4] Revert "sunxi: Move the SPL stack top to 0x1A000 on Allwinner A64/A80"
Date: Mon, 5 Sep 2016 07:12:17 +0300 [thread overview]
Message-ID: <20160905071217.2169d8e6@i7> (raw)
In-Reply-To: <1473035561-23420-2-git-send-email-andre.przywara@arm.com>
On Mon, 5 Sep 2016 01:32:38 +0100
Andre Przywara <andre.przywara@arm.com> wrote:
> This commit moved the SPL stack into SRAM C, which worked when the SPL
> set the AHB1 clock down to 100 MHz to cope with the flaky SRAM C access
> from the CPU.
> However booting with boot0 (and thus not using SPL at all) we still run
> with a 200 MHz AHB1, so any access to SRAM C is prone to fail.
> Since this commit does _not_ only affect the SPL code, but also the
> U-Boot proper, we fail when booting with boot0.
Yes, it unfortunately affected both the SPL and the U-Boot
proper because currently both CONFIG_SPL_STACK and
CONFIG_SYS_INIT_SP_ADDR defines affect the SPL stack
location and in practice this only works in a predictable
way if they are set to the same value. I have sent a patch
to address this problem (but the fix may be unsafe for
v2016.09 because many ARM platforms are affected):
https://patchwork.ozlabs.org/patch/665608/
After this problem is resolved, the CONFIG_SYS_INIT_SP_ADDR
define can be decoupled from CONFIG_SPL_STACK and configured to
even use the DRAM instead of thrashing some part of the scarce
SRAM space (which may be already occupied by the OpenRISC
firmware and/or the ATF at the time when the U-Boot proper is
starting).
> As the introduction of tiny-printf reduced the size of the SPL, we
> can afford to have the SPL stack in SRAM A1.
We still need to check how much space is really available. The FIT
support is rather heavyweight and we may want to enable some other
features too.
> This reverts commit 1a83fb4a17d959d7b037999ab7ed7e62429abe34
> and fixes booting the Pine64 when using boot0.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
But as discussed earlier, reverting this patch is a reasonable
solution for v2016.09, so it is
Reviewed-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
> ---
> include/configs/sunxi-common.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> index f64edd4..708ab17 100644
> --- a/include/configs/sunxi-common.h
> +++ b/include/configs/sunxi-common.h
> @@ -99,7 +99,7 @@
> * the 1 actually activates the mapping of the first 32 KiB to 0x00000000.
> */
> #define CONFIG_SYS_INIT_RAM_ADDR 0x10000
> -#define CONFIG_SYS_INIT_RAM_SIZE 0xA000 /* 40 KiB */
> +#define CONFIG_SYS_INIT_RAM_SIZE 0x08000 /* FIXME: 40 KiB ? */
> #else
> #define CONFIG_SYS_INIT_RAM_ADDR 0x0
> #define CONFIG_SYS_INIT_RAM_SIZE 0x8000 /* 32 KiB */
> @@ -220,7 +220,8 @@
> #define CONFIG_SPL_PAD_TO 32768 /* decimal for 'dd' */
>
> #if defined(CONFIG_MACH_SUN9I) || defined(CONFIG_MACH_SUN50I)
> -#define LOW_LEVEL_SRAM_STACK 0x0001A000
> +/* FIXME: 40 KiB instead of 32 KiB ? */
> +#define LOW_LEVEL_SRAM_STACK 0x00018000
> #define CONFIG_SPL_STACK LOW_LEVEL_SRAM_STACK
> #else
> /* end of 32 KiB in sram */
--
Best regards,
Siarhei Siamashka
next prev parent reply other threads:[~2016-09-05 4:12 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-05 0:32 [U-Boot] [PATCH 0/4] sunxi: Pine64 fixes Andre Przywara
2016-09-05 0:32 ` [U-Boot] [PATCH 1/4] Revert "sunxi: Move the SPL stack top to 0x1A000 on Allwinner A64/A80" Andre Przywara
2016-09-05 4:12 ` Siarhei Siamashka [this message]
2016-09-05 8:23 ` Andre Przywara
2016-09-08 10:51 ` Siarhei Siamashka
2016-09-08 13:23 ` Andre Przywara
2016-09-05 0:32 ` [U-Boot] [PATCH 2/4] Revert "sunxi: Downclock AHB1 to 100MHz on Allwinner A64" Andre Przywara
2016-09-05 4:48 ` Siarhei Siamashka
2016-09-05 8:32 ` Andre Przywara
2016-09-05 0:32 ` [U-Boot] [PATCH 3/4] sunxi: Kconfig: rename non-existent SUN50I_A64 config symbol Andre Przywara
2016-09-05 0:32 ` [U-Boot] [PATCH 4/4] sunxi: fix 64-bit compiler warning for SPL header parsing Andre Przywara
2016-09-05 5:00 ` Siarhei Siamashka
2016-09-07 15:13 ` [U-Boot] [PATCH 0/4] sunxi: Pine64 fixes Hans de Goede
2016-09-07 15:18 ` Andre Przywara
2016-09-07 15:48 ` Hans de Goede
2016-09-07 15:55 ` Andre Przywara
2016-09-07 16:12 ` Tom Rini
2016-09-07 16:20 ` Andre Przywara
2016-09-08 8:26 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160905071217.2169d8e6@i7 \
--to=siarhei.siamashka@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox