On Thu, 17 Feb 2022 at 21:39, Stafford Horne <sho...@gmail.com> wrote:
>
> On Thu, Feb 17, 2022 at 06:18:58PM +0000, Peter Maydell wrote:
> > If the user doesn't specify a kernel file, we'll still load the FDT,
> > at address zero. Is that sensible/intended behaviour ?
>
> Good point,  I guess we can add some space to not override the interrupt
> vectors.  The system booting with no kernel will probably not very useful
> anyway.  But I imaging one could connect a debugger and load some binary into
> memory and having the FDT in memory would be helpful.
>
> So moving the fdt offset to 0 + 1-page would give enough space.  Does this 
> sound
> OK?

I don't have a strong opinion -- you can not load the fdt, or you can
define a "this is probably sensible for firmware" FDT load location.
If you do define something like that you should document it, though.
Bear in mind that if you put the FDT at 0+1-page then it will prevent
users loading a bare-metal binary with eg the generic loader that starts
at address 0, though (because it will show up as two overlapping
ROM blobs). So unless you have a definite use case in mind that will
want the fdt in memory it might be better to not load it. You can always
add code to load it later if there is a concrete requirement later.

-- PMM

Reply via email to