u-boot-brain/arch/sandbox
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
..
cpu sandbox: Provide a way to map from host RAM to U-Boot RAM 2013-05-01 11:17:21 -04:00
include/asm sandbox: Provide a way to map from host RAM to U-Boot RAM 2013-05-01 11:17:21 -04:00
lib sandbox: Move ram_buf to arch_global_data 2013-02-04 09:05:45 -05:00
config.mk sandbox: Add un/map_sysmen() to deal with sandbox's ram_buf 2013-02-28 19:09:22 -08:00