u-boot/arch/sandbox/include/asm
Simon Glass 4213fc2913 sandbox: Add un/map_sysmen() to deal with sandbox's ram_buf
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@chromium.org>
2013-02-28 19:09:22 -08:00
..
bitops.h sandbox: Add architecture header files 2011-10-17 22:45:50 +02:00
byteorder.h sandbox: Add architecture header files 2011-10-17 22:45:50 +02:00
cache.h sandbox: Add asm/cache.h for sandbox 2011-11-03 22:34:49 +01:00
config.h sandbox: Add architecture header files 2011-10-17 22:45:50 +02:00
errno.h sandbox: Add asm/errno.h 2012-09-29 10:00:29 -07:00
getopt.h sandbox: add getopt support 2012-03-12 11:06:01 -04:00
global_data.h sandbox: Use generic global_data 2013-02-04 09:05:46 -05:00
gpio.h sandbox: gpio: add basic driver for simulating GPIOs 2012-03-12 11:03:42 -04:00
io.h sandbox: Add un/map_sysmen() to deal with sandbox's ram_buf 2013-02-28 19:09:22 -08:00
posix_types.h sandbox: Add architecture header files 2011-10-17 22:45:50 +02:00
ptrace.h sandbox: Add architecture header files 2011-10-17 22:45:50 +02:00
sections.h sandbox: add getopt support 2012-03-12 11:06:01 -04:00
state.h sandbox: add getopt support 2012-03-12 11:06:01 -04:00
string.h sandbox: Add architecture header files 2011-10-17 22:45:50 +02:00
system.h sandbox: Add architecture header files 2011-10-17 22:45:50 +02:00
types.h sandbox: Add architecture header files 2011-10-17 22:45:50 +02:00
u-boot-sandbox.h sandbox: add getopt support 2012-03-12 11:06:01 -04:00
u-boot.h net: punt bd->bi_ip_addr 2012-05-15 17:32:05 -05:00
unaligned.h sandbox: Add architecture header files 2011-10-17 22:45:50 +02:00