Re: [PATCH] firmware: zynqmp-fpga: fix use of uninitialized addr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux