aboutsummaryrefslogtreecommitdiff
path: root/hw/m68k
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2014-10-19 07:42:22 +0400
committerMax Filippov <jcmvbkbc@gmail.com>2014-11-03 00:59:10 +0300
commit25bda50a0c7241dcb247483af2b7f961632020cc (patch)
tree513752bed41420a65b2bf8b46b7d6cfe60745f59 /hw/m68k
parentc9e9521fcb840b14ec0ae9117b224ff8a71418da (diff)
downloadqemu-25bda50a0c7241dcb247483af2b7f961632020cc.zip
qemu-25bda50a0c7241dcb247483af2b7f961632020cc.tar.gz
qemu-25bda50a0c7241dcb247483af2b7f961632020cc.tar.bz2
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 'hw/m68k')
-rw-r--r--hw/m68k/an5206.c3
-rw-r--r--hw/m68k/dummy_m68k.c3
-rw-r--r--hw/m68k/mcf5208.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/hw/m68k/an5206.c b/hw/m68k/an5206.c
index a9ac270..f1f1350 100644
--- a/hw/m68k/an5206.c
+++ b/hw/m68k/an5206.c
@@ -74,7 +74,8 @@ static void an5206_init(MachineState *machine)
NULL, NULL, 1, ELF_MACHINE, 0);
entry = elf_entry;
if (kernel_size < 0) {
- kernel_size = load_uimage(kernel_filename, &entry, NULL, NULL);
+ kernel_size = load_uimage(kernel_filename, &entry, NULL, NULL,
+ NULL, NULL);
}
if (kernel_size < 0) {
kernel_size = load_image_targphys(kernel_filename, KERNEL_LOAD_ADDR,
diff --git a/hw/m68k/dummy_m68k.c b/hw/m68k/dummy_m68k.c
index 957ef82..facd561 100644
--- a/hw/m68k/dummy_m68k.c
+++ b/hw/m68k/dummy_m68k.c
@@ -50,7 +50,8 @@ static void dummy_m68k_init(MachineState *machine)
NULL, NULL, 1, ELF_MACHINE, 0);
entry = elf_entry;
if (kernel_size < 0) {
- kernel_size = load_uimage(kernel_filename, &entry, NULL, NULL);
+ kernel_size = load_uimage(kernel_filename, &entry, NULL, NULL,
+ NULL, NULL);
}
if (kernel_size < 0) {
kernel_size = load_image_targphys(kernel_filename,
diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c
index 188230f..a01a445 100644
--- a/hw/m68k/mcf5208.c
+++ b/hw/m68k/mcf5208.c
@@ -279,7 +279,8 @@ static void mcf5208evb_init(MachineState *machine)
NULL, NULL, 1, ELF_MACHINE, 0);
entry = elf_entry;
if (kernel_size < 0) {
- kernel_size = load_uimage(kernel_filename, &entry, NULL, NULL);
+ kernel_size = load_uimage(kernel_filename, &entry, NULL, NULL,
+ NULL, NULL);
}
if (kernel_size < 0) {
kernel_size = load_image_targphys(kernel_filename, 0x40000000,