On Fri, 16 Aug 2024 at 20:17, Simon Glass <s...@chromium.org> wrote: > > Hi Sughosh, > > On Fri, 16 Aug 2024 at 04:34, Sughosh Ganu <sughosh.g...@linaro.org> wrote: > > > > On Fri, 16 Aug 2024 at 02:02, Simon Glass <s...@chromium.org> wrote: > > > > > > Hi Sughosh, > > > > > > On Wed, 14 Aug 2024 at 05:02, Sughosh Ganu <sughosh.g...@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.g...@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. > > > > Like I had explained earlier [1], not using the LMB API for allocating > > the address results in issues, since the load command internally > > checks if the address can be used for reading the dtb. Without this > > patch, the cmd_ut test fails. I am not sure why you do not like this > > solution. But in any case, can you propose some other solution? I > > believe I can tweak the address to some other value, but that would > > not be a proper solution, but simply kicking the can down the road. > > Thanks. > > But this is why I suggested having lmb_push() and lmb_pop(), so you > should be able to use those in the few tests which have this problem.
Ah yes, I forgot about that change. Let me try running the test again and see what I get. Thanks. -sughosh > > If it becomes more widespread and affects a lot of tests, we could do > thing automatically in the test framework, but for now, that doesn't > seem necessary. > > > > > -sughosh > > > > [1] - https://lists.denx.de/pipermail/u-boot/2024-July/560569.html > > Regards, > Simon