[U-Boot] [PATCH v4 04/16] sandbox: smbios: Update to support sandbox

Simon Glass sjg at chromium.org
Fri May 25 02:42:41 UTC 2018


Hi Alex,

On 24 May 2018 at 06:24, Alexander Graf <agraf at suse.de> wrote:
>
>
> On 16.05.18 17:42, Simon Glass wrote:
>> At present this code casts addresses to pointers so cannot be used with
>> sandbox. Update it to use mapmem instead.
>>
>> Signed-off-by: Simon Glass <sjg at chromium.org>
>
> I really dislike the whole fact that you have to call map_sysmem() at
> all. I don't quite understand the whole point of it either - it just
> seems to clutter the code and make it harder to follow.

The purpose is to map U-Boot addresses (e.g. 0x1234) to actual
user-space addresses in sandbox (gd->arch.ram_buf + 0x1234).

Otherwise we cannot write tests which use particular addresses, and
people have to worry about the host memory layout when using sandbox.

>
> Can't we just simply make sandbox behave like any other target instead?

Actually that's the goal of the sandbox support. Memory is modelled as
a contiguous chunk starting at 0x0, regardless of what the OS actually
gives U-Boot in terms of addresses.

Regards,
Simon


More information about the U-Boot mailing list