diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2014-10-19 07:42:22 +0400 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2014-11-03 00:59:10 +0300 |
commit | 25bda50a0c7241dcb247483af2b7f961632020cc (patch) | |
tree | 513752bed41420a65b2bf8b46b7d6cfe60745f59 /include/hw/loader.h | |
parent | c9e9521fcb840b14ec0ae9117b224ff8a71418da (diff) |
hw/core/loader: implement address translation in uimage loader
Such address translation is needed when load address recorded in uImage
is a virtual address. When the actual load address is requested, return
untranslated address: user that needs the translated address can always
apply translation function to it and those that need it untranslated
don't need to do the inverse translation.
Add translation function pointer and its parameter to uimage_load
prototype. Update all existing users.
No user-visible functional changes.
Cc: qemu-stable@nongnu.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include/hw/loader.h')
-rw-r--r-- | include/hw/loader.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/hw/loader.h b/include/hw/loader.h index 9190387b8e..054c6a22b5 100644 --- a/include/hw/loader.h +++ b/include/hw/loader.h @@ -30,7 +30,9 @@ int load_elf(const char *filename, uint64_t (*translate_fn)(void *, uint64_t), int load_aout(const char *filename, hwaddr addr, int max_sz, int bswap_needed, hwaddr target_page_size); int load_uimage(const char *filename, hwaddr *ep, - hwaddr *loadaddr, int *is_linux); + hwaddr *loadaddr, int *is_linux, + uint64_t (*translate_fn)(void *, uint64_t), + void *translate_opaque); /** * load_ramdisk: |