[Top][All Lists]

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

Re: [PATCH v2] generic-loader: check that binary file target location ex

From: Damien Hedde
Subject: Re: [PATCH v2] generic-loader: check that binary file target location exists
Date: Tue, 2 Nov 2021 15:38:23 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.2

On 11/2/21 15:15, Peter Maydell wrote:
On Tue, 2 Nov 2021 at 14:04, Damien Hedde <damien.hedde@greensocs.com> wrote:

On 11/1/21 11:53, Peter Maydell wrote:
Won't this break the case of loading a file that spans two
consecutive-but-different memory regions ?

yes. I did not thought about that.

                                            I think if we want
to catch "we tried to load something to an address not backed
by something" we should do that by making load_image_targetphys_as()
correctly handle errors from the memory accesses it makes and
propagate an error-return to the caller.

The problem is that load_image_targetphys_as() just uses rom_load_...().
And these macros/functions only put some "rom to load" objects in a list
without doing any real accesses.

Oh yes, I'd forgotten that this was all using the rom blob
mechanism underneath.

I think in that case that whatever we do we should aim
to be consistent between the different load-image functions;
we shouldn't add a check to load_image_targetphys_as() which
we don't do in eg load_elf_as(). That probably means we should
only be looking to warn or error at the point where we actually
load the ROM blobs into memory.

-- PMM

I'll look into that.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]