diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-10 16:23:59 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-10 16:23:59 +0000 |
commit | 7ec632b45c223bc6a01a8f5a6549854e8624b0c0 (patch) | |
tree | 8baa43f3512ceb9962c193624e40b7df9cc9573b /hw/ppc440_bamboo.c | |
parent | 5c130f659b20d53667e07957ebaa3e656f72b276 (diff) | |
download | qemu-7ec632b45c223bc6a01a8f5a6549854e8624b0c0.zip qemu-7ec632b45c223bc6a01a8f5a6549854e8624b0c0.tar.gz qemu-7ec632b45c223bc6a01a8f5a6549854e8624b0c0.tar.bz2 |
Wean device tree code off phys_ram_base.
Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7068 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/ppc440_bamboo.c')
-rw-r--r-- | hw/ppc440_bamboo.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c index c407b18..b249e00 100644 --- a/hw/ppc440_bamboo.c +++ b/hw/ppc440_bamboo.c @@ -27,7 +27,7 @@ #define BINARY_DEVICE_TREE_FILE "bamboo.dtb" -static void *bamboo_load_device_tree(void *addr, +static void *bamboo_load_device_tree(target_phys_addr_t addr, uint32_t ramsize, target_phys_addr_t initrd_base, target_phys_addr_t initrd_size, @@ -37,6 +37,7 @@ static void *bamboo_load_device_tree(void *addr, #ifdef HAVE_FDT uint32_t mem_reg_property[] = { 0, 0, ramsize }; char *path; + int fdt_size; int pathlen; int ret; @@ -45,7 +46,7 @@ static void *bamboo_load_device_tree(void *addr, snprintf(path, pathlen, "%s/%s", bios_dir, BINARY_DEVICE_TREE_FILE); - fdt = load_device_tree(path, addr); + fdt = load_device_tree(path, &fdt_size); free(path); if (fdt == NULL) goto out; @@ -75,6 +76,8 @@ static void *bamboo_load_device_tree(void *addr, if (kvm_enabled()) kvmppc_fdt_update(fdt); + cpu_physical_memory_write (addr, (void *)fdt, fdt_size); + out: #endif @@ -165,7 +168,7 @@ static void bamboo_init(ram_addr_t ram_size, int vga_ram_size, else dt_base = kernel_size + loadaddr; - fdt = bamboo_load_device_tree(phys_ram_base + dt_base, ram_size, + fdt = bamboo_load_device_tree(dt_base, ram_size, initrd_base, initrd_size, kernel_cmdline); if (fdt == NULL) { fprintf(stderr, "couldn't load device tree\n"); |