From: sbabic@denx.de
To: Gary Bisson <gary.bisson@boundarydevices.com>,u-boot@lists.denx.de
Subject: [PATCH] cmd: bcb: fix bcb struct alignment issue
Date: Sat, 5 Feb 2022 17:40:27 +0100 (CET) [thread overview]
Message-ID: <20220205164030.96F6783BC7@phobos.denx.de> (raw)
In-Reply-To: <20220111170606.2042950-1-gary.bisson@boundarydevices.com>
> 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@boundarydevices.com>
> Tested-by: Mattijs Korpershoek <mkorpershoek@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@denx.de
=====================================================================
prev parent reply other threads:[~2022-02-05 16:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-11 17:06 [PATCH] cmd: bcb: fix bcb struct alignment issue Gary Bisson
2022-01-12 8:08 ` Mattijs Korpershoek
2022-02-05 16:40 ` sbabic [this message]
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=20220205164030.96F6783BC7@phobos.denx.de \
--to=sbabic@denx.de \
--cc=gary.bisson@boundarydevices.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