[PATCH] cmd: bcb: fix bcb struct alignment issue
sbabic at denx.de
sbabic at denx.de
Sat Feb 5 17:40:27 CET 2022
> Without this patch the bcb struct could be located at an odd address
> which resulted in data not being copied to the buffer.
> Here was the repro steps (from Mattijs):
> => mmc dev 1
> => bcb load 1 misc
> => bcb dump command
> 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> => part start mmc 1 misc misc_start
> => mmc read ${loadaddr} ${misc_start} 4
> => bcb load 1 misc
> => bcb dump command
> 00000000: 62 6f 6f 74 6f 6e 63 65 2d 62 6f 6f 74 6c 6f 61
> 00000010: 64 65 72 00 00 00 00 00 00 00 00 00 00 00 00 00
> This behavior was observed on an Amlogic A311D (ARM64) platform with a
> recent GCC toolchain (11.2.0) but is most likely affecting other
> platforms.
> To avoid issues the structure is aligned on DMA minimum alignment value
> as it is passed directly to the read function.
> Signed-off-by: Gary Bisson <gary.bisson at boundarydevices.com>
> Tested-by: Mattijs Korpershoek <mkorpershoek at baylibre.com> # on khadas vim3
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
More information about the U-Boot
mailing list