[PATCH 2/3] sunxi: h616: lower SPL stack address to avoid BROM data

Samuel Holland samuel at sholland.org
Sun Jan 8 21:49:19 CET 2023


On 7/13/22 10:27, Andre Przywara wrote:
> When using the USB OTG FEL mode on the Allwinner H616, the BootROM
> stores some data at the end of SRAM C. This is also the location where
> we place the initial SPL stack, so it will overwrite this data.
> We still need the BROM code after running the SPL, so should leave that
> area alone.
> Interestingly this does not seem to have an adverse effect, I guess on
> the "way out" (when we return to FEL after the SPL has run), this data
> is not needed by the BROM, for just the trailing end of the USB operation.
> However this is still wrong, and we should not clobber BROM data.
> 
> Lower the SPL stack address to be situated right below the swap buffers
> we use in sunxi-fel: that should be out of the way of everyone else.

If we are going to limit SPL size based on these buffers, we should
ensure they are as close to the end of SRAM as possible.

> Signed-off-by: Andre Przywara <andre.przywara at arm.com>
> ---
>  include/configs/sunxi-common.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Samuel Holland <samuel at sholland.org>
Tested-by: Samuel Holland <samuel at sholland.org>



More information about the U-Boot mailing list