mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Michael Tretter <m.tretter@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] firmware: zynqmp-fpga: fix use of uninitialized addr
Date: Thu, 3 Feb 2022 11:16:18 +0100	[thread overview]
Message-ID: <20220203101618.GK23490@pengutronix.de> (raw)
In-Reply-To: <20220202101054.3924339-1-m.tretter@pengutronix.de>

On Wed, Feb 02, 2022 at 11:10:54AM +0100, Michael Tretter wrote:
> The bitstream loading API of the firmware is a bit clunky, as the driver
> needs to either pass the size of the bitstream or a pointer to the size
> of the bitstream.
> 
> Commit 2f29ee311f1d ("firmware: zynqmp-fpga: do not use DMA coherent
> memory for bitstream") broke the loading by address, as the pointer to
> the bitstream size was set using the uninitialized DMA address.
> 
> Fix it by determining the argument that is passed to the firmware after
> the bitstream has been mapped and always write the size of the bitstream
> at the end of the passed buffer.
> 
> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
> ---
>  drivers/firmware/zynqmp-fpga.c | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


      reply	other threads:[~2022-02-03 10:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-02 10:10 Michael Tretter
2022-02-03 10:16 ` Sascha Hauer [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=20220203101618.GK23490@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=m.tretter@pengutronix.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