From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: u-boot@lists.denx.de
Subject: [PATCH 1/1] sandbox: ensure that state->ram_buf is in low memory
Date: Thu, 13 May 2021 16:53:12 +0200 [thread overview]
Message-ID: <d8871d43-7fe9-e65c-41b5-c70488d94d63@gmx.de> (raw)
In-Reply-To: <CAPnjgZ2Ekkj=_beHukL5zPLOdnjAxVBOOuveCb38sKzQoe9DJw@mail.gmail.com>
On 5/13/21 4:36 PM, Simon Glass wrote:
> Hi Heinrich,
>
> On Wed, 12 May 2021 at 15:28, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>>
>> Am 12. Mai 2021 18:01:17 MESZ schrieb Simon Glass <sjg@chromium.org>:
>>> Hi Heinrich,
>>>
>>> On Tue, 11 May 2021 at 13:03, Heinrich Schuchardt <xypron.glpk@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.
I know map_to_sysmem(). But you wrote in lib/smbios.c:487:
/*
?* We must use a pointer here so things work correctly on sandbox. The
?* user of this table is not aware of the mapping of addresses to
?* sandbox's DRAM buffer.
*/
For testing you could start a binary with command 'bootefi' or 'booti'
and that binary would analyze the table. So yes, your comment holds true
and you must not use map_to_sysmem() here.
Best regards
Heinrich
next prev parent reply other threads:[~2021-05-13 14:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-11 19:03 [PATCH 1/1] sandbox: ensure that state->ram_buf is in low memory Heinrich Schuchardt
2021-05-12 16:01 ` Simon Glass
2021-05-12 21:28 ` Heinrich Schuchardt
2021-05-13 14:36 ` Simon Glass
2021-05-13 14:53 ` Heinrich Schuchardt [this message]
2021-05-13 23:56 ` Simon Glass
2021-05-14 6:10 ` Heinrich Schuchardt
2021-05-14 20:44 ` Simon Glass
2021-05-15 0:34 ` Heinrich Schuchardt
2021-05-15 15:19 ` Simon Glass
2021-05-15 15:33 ` Heinrich Schuchardt
2021-05-15 16:09 ` Simon Glass
2021-07-04 20:15 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d8871d43-7fe9-e65c-41b5-c70488d94d63@gmx.de \
--to=xypron.glpk@gmx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox