Message ID | 20211021144609.9319-5-pali@kernel.org |
---|---|
State | Accepted |
Commit | e6571f38c943f7ff1ed38b90940d1265f6c7b9ba |
Delegated to: | Stefan Roese |
Headers | show |
Series | arm: mvebu: Fix usage of BIN header arguments | expand |
On 21.10.21 16:46, Pali Rohár wrote: > U-Boot SPL binary does not read BIN header arguments, so passing some dummy > values 0000005b and 00000068 has no effect for U-Boot SPL code. > > Probably these two values comes from old Marvell DDR training code which > was separated from U-Boot and used it for some configuration. > > Seems that two 32-bit values were specified here to ensure SPL code > alignment to 128-bit boundary as it is required e.g. for A370 or AXP > processors. Main kwbimage header is 64-byte long which is aligned to > 128-bit boundary. Optional kwbheader is 32-bit long, number of BIN header > arguments is stored in 32-bit number. So for alignment to 128-bit boundary > is needed 64-bit padding which exactly these two 32-bit dummy arguments > provided. > > Now when mkimage correctly aligns start of executable code in BIN header to > 128-bit boundary, there is no requirement to put dummy argument values into > kwbimage. So remove them. > > Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de> Thanks, Stefan > --- > arch/arm/mach-mvebu/kwbimage.cfg.in | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/mach-mvebu/kwbimage.cfg.in b/arch/arm/mach-mvebu/kwbimage.cfg.in > index 72e67d75c325..049d23c6ef08 100644 > --- a/arch/arm/mach-mvebu/kwbimage.cfg.in > +++ b/arch/arm/mach-mvebu/kwbimage.cfg.in > @@ -9,4 +9,4 @@ VERSION 1 > #@BOOT_FROM > > # Binary Header (bin_hdr) with DDR3 training code > -BINARY spl/u-boot-spl.bin 0000005b 00000068 > +BINARY spl/u-boot-spl.bin > Viele Grüße, Stefan
diff --git a/arch/arm/mach-mvebu/kwbimage.cfg.in b/arch/arm/mach-mvebu/kwbimage.cfg.in index 72e67d75c325..049d23c6ef08 100644 --- a/arch/arm/mach-mvebu/kwbimage.cfg.in +++ b/arch/arm/mach-mvebu/kwbimage.cfg.in @@ -9,4 +9,4 @@ VERSION 1 #@BOOT_FROM # Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl.bin 0000005b 00000068 +BINARY spl/u-boot-spl.bin
U-Boot SPL binary does not read BIN header arguments, so passing some dummy values 0000005b and 00000068 has no effect for U-Boot SPL code. Probably these two values comes from old Marvell DDR training code which was separated from U-Boot and used it for some configuration. Seems that two 32-bit values were specified here to ensure SPL code alignment to 128-bit boundary as it is required e.g. for A370 or AXP processors. Main kwbimage header is 64-byte long which is aligned to 128-bit boundary. Optional kwbheader is 32-bit long, number of BIN header arguments is stored in 32-bit number. So for alignment to 128-bit boundary is needed 64-bit padding which exactly these two 32-bit dummy arguments provided. Now when mkimage correctly aligns start of executable code in BIN header to 128-bit boundary, there is no requirement to put dummy argument values into kwbimage. So remove them. Signed-off-by: Pali Rohár <pali@kernel.org> --- arch/arm/mach-mvebu/kwbimage.cfg.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)