[U-Boot] [PATCH 04/20] sandbox: Add un/map_sysmen() to deal with sandbox's ram_buf

Simon Glass sjg at chromium.org
Sat Feb 16 00:51:39 CET 2013


On Wed, Dec 26, 2012 at 10:56 AM, Simon Glass <sjg at chromium.org> wrote:
> Sandbox doesn't actually provide U-Boot access to the machine's physical
> memory. Instead it provides a RAM buffer of configurable size, and all
> memory accesses are within that buffer. Sandbox memory starts at 0 and
> is CONFIG_DRAM_SIZE bytes in size. Allowing access outside this buffer
> might produce unpredictable results in the event of an error, and would
> expose the host machine's memory architecture to the sandbox U-Boot.
>
> Most U-Boot functions assume that they can just access memory at given
> address. For sandbox this is not true.
>
> Add a map_sysmem() call which converts a U-Boot address to a system
> address. In most cases this is a NOP, but for sandbox it returns a
> pointer to that memory inside the RAM buffer.
>
> To get a U-Boot feature to work correctly within sandbox, you should call
> map_sysmem() to get a pointer to the address, and then use that address for
> any U-Boot memory accesses.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>

I haven't seen any comments on this one, either because no one noticed
or because it is OK. I am collecting up this series and will send a
pull request, for Tom to review.

Applied to x86/master.


More information about the U-Boot mailing list