[PATCH v2 27/32] test: cedit: use allocated address for reading file

Tom Rini trini at konsulko.com
Fri Aug 16 20:35:51 CEST 2024


On Fri, Aug 16, 2024 at 11:58:46PM +0530, Sughosh Ganu wrote:
> On Fri, 16 Aug 2024 at 11:36 PM, Tom Rini <trini at konsulko.com> wrote:
> 
> > On Thu, Aug 15, 2024 at 09:32:29PM +0100, Simon Glass wrote:
> > > Hi Sughosh,
> > >
> > > On Wed, 14 Aug 2024 at 05:02, Sughosh Ganu <sughosh.ganu at linaro.org>
> > wrote:
> > > >
> > > > Instead of a randomly selected address, use an LMB allocated one for
> > > > reading the file into memory. With the LMB map now being persistent
> > > > and global, the address used for reading the file might be already
> > > > allocated as non-overwritable, resulting in a failure. Get a valid
> > > > address from LMB and then read the file to that address.
> > > >
> > > > Signed-off-by: Sughosh Ganu <sughosh.ganu at linaro.org>
> > > > ---
> > > > Changes since V1:
> > > > * Don't use the API version with flags parameter.
> > > >
> > > >  test/boot/cedit.c | 6 +++++-
> > > >  1 file changed, 5 insertions(+), 1 deletion(-)
> > > >
> > >
> > > No, this address needs to work fine without using lmb. Same with any
> > > other tests. Tests make use of the sandbox memory space memory
> > > addresses and it makes things easier to code and debug.
> >
> > Can't we just request/free that address from LMB then?
> 
> 
> Very good point. Because that is precisely what this patch does :)

Ah, I think the wording is unclear then in the commit message. It needs
to reflect that we're taking a previously intentional address and now
reserving/releasing it with LMB. And perhaps not change from hex to
decimal too.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240816/3903c753/attachment.sig>


More information about the U-Boot mailing list