Message ID | 0035f071-15b6-1742-f1e7-fc63f5640fdf@bamkrs.de |
---|---|
State | New |
Headers | show |
Series | Correct sun8i-v3s SRAM size | expand |
On Tue, Apr 28, 2020 at 9:26 PM Benedikt-Alexander Mokro? <catchall at bamkrs.de> wrote: > > According to the Datasheet, the V3s has a 32KiB SRAM. > This patch corrects CONFIG_SPL_MAX_SIZE and LOW_LEVEL_SRAM_STACK > accordingly. Look like the existing value has taken from allwinner BSP, but did you find any issues with the existing one? Jagan.
Hi Jagan, I run into some size-related issues regarding my SPL configuration for a custom V3s board (mainly due to using fit images). In fact, the V3s has even more SRAM that could be used for the SPL. However the BROM won't boot anything larger than 32KiB. So I use this 32KiB limit in production now and found no issues with my 29KiB SPL whatsoever. And - if I read the BROM ASM correctly - there is no performance drawback for default (and smaller) SPL configurations since the BROM only loads the actual SPL size amount of pages/bytes. I think it would be much less frustrating for other users if they could use these 32KiB from the start since the current limit is hit pretty fast and there is no reason why it should be this 24k limit for the V3s. It's another poorly or even plain wrongly documented aspect of the Allwinner BSP. Benedikt Am 1. Juni 2020 19:00:30 MESZ schrieb Jagan Teki <jagan at amarulasolutions.com>: On Tue, Apr 28, 2020 at 9:26 PM Benedikt-Alexander Mokro? <catchall at bamkrs.de> wrote: According to the Datasheet, the V3s has a 32KiB SRAM. This patch corrects CONFIG_SPL_MAX_SIZE and LOW_LEVEL_SRAM_STACK accordingly. Look like the existing value has taken from allwinner BSP, but did you find any issues with the existing one? Jagan.
On Tue, Jun 02, 2020 at 09:10:08AM +0200, Benedikt-Alexander Mokro? wrote: > Hi Jagan, > > I run into some size-related issues regarding my SPL configuration for > a custom V3s board (mainly due to using fit images). In fact, the V3s > has even more SRAM that could be used for the SPL. However the BROM > won't boot anything larger than 32KiB. So I use this 32KiB limit in > production now and found no issues with my 29KiB SPL whatsoever. And - > if I read the BROM ASM correctly - there is no performance drawback > for default (and smaller) SPL configurations since the BROM only loads > the actual SPL size amount of pages/bytes. > > I think it would be much less frustrating for other users if they > could use these 32KiB from the start since the current limit is hit > pretty fast and there is no reason why it should be this 24k limit for > the V3s. It's another poorly or even plain wrongly documented aspect > of the Allwinner BSP. I agree Maxime -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200602/fbdc9a5f/attachment.sig>
On Tue, Jun 2, 2020 at 12:40 PM Benedikt-Alexander Mokro? <u-boot at bamkrs.de> wrote: > > Hi Jagan, > > I run into some size-related issues regarding my SPL configuration for a custom V3s board (mainly due to using fit images). In fact, the V3s has even more SRAM that could be used for the SPL. However the BROM won't boot anything larger than 32KiB. So I use this 32KiB limit in production now and found no issues with my 29KiB SPL whatsoever. And - if I read the BROM ASM correctly - there is no performance drawback for default (and smaller) SPL configurations since the BROM only loads the actual SPL size amount of pages/bytes. > > I think it would be much less frustrating for other users if they could use these 32KiB from the start since the current limit is hit pretty fast and there is no reason why it should be this 24k limit for the V3s. It's another poorly or even plain wrongly documented aspect of the Allwinner BSP. Can you rebase on master and send it with the proper commit head. "sunxi: Correct sun8i-v3s SRAM size"
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 0ef289fd64..623501edce 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -185,8 +185,11 @@ #define CONFIG_SPL_MAX_SIZE 0x7fa0 /* 32 KiB */ /* end of SRAM A2 on H6 for now */ #define LOW_LEVEL_SRAM_STACK 0x00118000 +#elif defined CONFIG_MACH_SUN8I_V3S +#define CONFIG_SPL_MAX_SIZE 0x7fa0 /* 32 KiB */ +#define LOW_LEVEL_SRAM_STACK 0x0000F000 /* End of sram */ #else #define CONFIG_SPL_MAX_SIZE 0x5fa0 /* 24KB on sun4i/sun7i */ #define LOW_LEVEL_SRAM_STACK 0x00008000 /* End of sram */ #endif
According to the Datasheet, the V3s has a 32KiB SRAM. This patch corrects CONFIG_SPL_MAX_SIZE and LOW_LEVEL_SRAM_STACK accordingly. Signed-off-by: Benedikt-Alexander Mokro? <u-boot at bamkrs.de> --- include/configs/sunxi-common.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)