u-boot/arch/sandbox/include/asm
Simon Glass 781adb5710 sandbox: Provide a way to map from host RAM to U-Boot RAM
In many cases, pointers to memory are passed around, and these pointers
refer to U-Boot memory, not host memory. This in itself is not a
problem.

However, in a few places, we cast that pointer back to a ulong (being
a U-Boot memory address). It is possible to convert many of these cases
to avoid this. However there are data structures (e.g. struct
bootm_headers) which use pointers. We could with a lot of effort adjust
the structs and all code that uses them to use ulong instead of pointers.

This seems like an unacceptable cost, since our objective with sandbox
is to minimise the impact on U-Boot code while maximising the features
available to sandbox.

Therefore, create a map_to_sysmem() function which converts from a
pointer to a U-Boot address. This can be used sparingly when needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-05-01 11:17:21 -04: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: Provide a way to map from host RAM to U-Boot RAM 2013-05-01 11:17:21 -04: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 Introduce generic link section.h symbol files 2013-03-15 16:13:58 -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