[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] generic-loader: remove the ram_size limit when a loading bin
From: |
Alistair Francis |
Subject: |
Re: [PATCH] generic-loader: remove the ram_size limit when a loading binary file |
Date: |
Thu, 7 Oct 2021 16:41:09 +1000 |
On Wed, Oct 6, 2021 at 10:04 PM Damien Hedde <damien.hedde@greensocs.com> wrote:
>
>
>
> On 10/6/21 13:49, Philippe Mathieu-Daudé wrote:
> > On 10/6/21 13:37, Damien Hedde wrote:
> >> Right now, we cannot load some binary file if it is bigger than the
> >> machine's ram size. This limitation only occurs when loading a
> >> binary file: we can load a corresponding elf file without this
> >> limitation.
> >>
> >> This is an issue for machines that have small ram or do not use the
> >> ram_size feature at all.
> >>
> >> Also get rid of "hw/boards.h" include, since we needed it only
> >> to access `current_machine`.
> >>
> >> Fixes: e481a1f63c9 ("generic-loader: Add a generic loader")
> >> Signed-off-by: Damien Hedde <damien.hedde@greensocs.com>
> >> ---
> >>
> >> Hi Alistair,
> >>
> >> I found this while experimenting with a ram_size=0 machine.
>
>
>
> >
> > Where are you loading your file?
> >
>
> In a rom.
>
> The loader does not check at all that we are loading to the machine's
> ram. It just check the size for the raw binary file format.
Hmmm... This is probably correct, in that a user might want to load a
binary into ROM and doesn't want to be blocked by the ram size.
In general though a user would expect an error if they are loading a
file into RAM that is larger then the RAM. So I'm not fully convinced
we want this change.
What error do you get if you try to load a binary that is too large
with this patch applied?
Alistair
>
> --
> Damien
>
>
>
- [PATCH] generic-loader: remove the ram_size limit when a loading binary file, Damien Hedde, 2021/10/06
- Re: [PATCH] generic-loader: remove the ram_size limit when a loading binary file,
Alistair Francis <=
- Re: [PATCH] generic-loader: remove the ram_size limit when a loading binary file, Philippe Mathieu-Daudé, 2021/10/07
- Re: [PATCH] generic-loader: remove the ram_size limit when a loading binary file, Damien Hedde, 2021/10/08
- Re: [PATCH] generic-loader: remove the ram_size limit when a loading binary file, Alistair Francis, 2021/10/10
- Re: [PATCH] generic-loader: remove the ram_size limit when a loading binary file, Damien Hedde, 2021/10/07