Hi Carlo, Thank you for the patch.
> RAM FIT loading currently assumes a configured image address. Downloaded > images need the same loader with a caller-provided buffer and length so > reads cannot run beyond the received data. > > Expose a reusable RAM FIT loader with header validation, bounded reads > and overlap-safe copying. Keep preloaded images working when their buffer > size is unknown. Add tests for embedded and external FIT data. > > Signed-off-by: Carlo Caione <[email protected]> > > diff --git a/MAINTAINERS b/MAINTAINERS > index d1f51d9197d9..f464e0bd2bce 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -1923,5 +1923,6 @@ Q: http://patchwork.ozlabs.org/project/uboot/list/ > S: Maintained > T: git https://git.u-boot-project.org/u-boot/u-boot.git > F: configs/tools-only_defconfig > +F: test/image/spl_ram.c > F: * > F: */ > diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c > index 0c501cf02f28..ee588ef4718b 100644 > --- a/common/spl/spl_ram.c > +++ b/common/spl/spl_ram.c > @@ -16,32 +16,39 @@ > #include <spl.h> > #include <linux/libfdt.h> > > -static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector, > +struct spl_ram_image { > + const void *data; > + size_t size; > +}; > + > +static ulong spl_ram_load_read(struct spl_load_info *load, ulong offset, Why changing sector -> offset? It makes the diff more difficult to read and as far as I understand, the callers are still passing the same argument to this function. > ulong count, void *buf) > { > - ulong addr = 0; > - > - debug("%s: sector %lx, count %lx, buf %lx\n", > - __func__, sector, count, (ulong)buf); Why is this dropped? It's not mentioned in the commit message. Rest looks good, thanks -- Mattijs Korpershoek <[email protected]>
