summaryrefslogtreecommitdiff
path: root/hw/petalogix_ml605_mmu.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-05-05 12:30:53 +0200
committerAndreas Färber <afaerber@suse.de>2012-06-04 23:00:42 +0200
commitbf494367fa77b5ed872d8add50677542a7141836 (patch)
treef5c220a348f60b08de950e4c9c82fd54fa9ab7cc /hw/petalogix_ml605_mmu.c
parent3ed607333e979a1637cc08af66858b7b37bd37ff (diff)
downloadqemu-bf494367fa77b5ed872d8add50677542a7141836.tar.gz
microblaze_boot: Pass MicroBlazeCPU to microblaze_load_kernel()
Allows us to use cpu_reset() in place of cpu_state_reset() in main_cpu_reset(). Also pass it through to its reset callbacks, while at it. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'hw/petalogix_ml605_mmu.c')
-rw-r--r--hw/petalogix_ml605_mmu.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/petalogix_ml605_mmu.c b/hw/petalogix_ml605_mmu.c
index 681924199e..bff63e389a 100644
--- a/hw/petalogix_ml605_mmu.c
+++ b/hw/petalogix_ml605_mmu.c
@@ -54,8 +54,10 @@
#define AXIENET_BASEADDR 0x82780000
#define AXIDMA_BASEADDR 0x84600000
-static void machine_cpu_reset(CPUMBState *env)
+static void machine_cpu_reset(MicroBlazeCPU *cpu)
{
+ CPUMBState *env = &cpu->env;
+
env->pvr.regs[10] = 0x0e000000; /* virtex 6 */
/* setup pvr to match kernel setting */
env->pvr.regs[5] |= PVR5_DCACHE_WRITEBACK_MASK;
@@ -133,7 +135,7 @@ petalogix_ml605_init(ram_addr_t ram_size,
irq[1], irq[0], 100 * 1000000);
}
- microblaze_load_kernel(env, ddr_base, ram_size, BINARY_DEVICE_TREE_FILE,
+ microblaze_load_kernel(cpu, ddr_base, ram_size, BINARY_DEVICE_TREE_FILE,
machine_cpu_reset);
}