[PATCH 1/1] sandbox: ensure that state->ram_buf is in low memory

Simon Glass sjg at chromium.org
Thu May 13 16:36:16 CEST 2021


Hi Heinrich,

On Wed, 12 May 2021 at 15:28, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> Am 12. Mai 2021 18:01:17 MESZ schrieb Simon Glass <sjg at chromium.org>:
> >Hi Heinrich,
> >
> >On Tue, 11 May 2021 at 13:03, Heinrich Schuchardt <xypron.glpk at gmx.de>
> >wrote:
> >>
> >> Addresses in state->ram_buf must be in the low 4 GiB of the address
> >space.
> >> Otherwise we cannot correctly fill SMBIOS tables. This shows up in
> >warnings
> >> like:
> >>
> >>     WARNING: SMBIOS table_address overflow 7f752735e020
> >
> >This sounds like a bug in the smbios-table code. For sandbox it should
> >perhaps use addresses instead of pointers.
> >
> >I think that code (that I unfortunately wrote) was an expeditious way
> >of getting it running, but is not correct.
>
> The field you are filling is only 32bit wide. I wonder how that table is meant to work on systems where the lowest memory address is above 4 GiB. Such ARMv8 systems exist.

map_to_sysmem() will give you a 32-bit wide address. Yes SMBIOS is
legacy and designed for 4GB.

Regards,
Simon


More information about the U-Boot mailing list