summaryrefslogtreecommitdiff
path: root/hw/unicore32
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2015-02-26 17:37:48 -0300
committerAndreas Färber <afaerber@suse.de>2015-03-10 17:07:28 +0100
commitc3898f770bffd6be5c1558abeaca9cd1fb18b6ca (patch)
tree12c94cdb1601834177780496268c262ee4007023 /hw/unicore32
parenteeff620f820f9f0a4f400dec1437bc251402051a (diff)
downloadqemu-c3898f770bffd6be5c1558abeaca9cd1fb18b6ca.zip
unicore32: Use uc32_cpu_init()
Instead of using the legacy cpu_init() function, use uc32_cpu_init() to create a UniCore32CPU object. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/unicore32')
-rw-r--r--hw/unicore32/puv3.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/unicore32/puv3.c b/hw/unicore32/puv3.c
index c41499e38e..cc9a21a712 100644
--- a/hw/unicore32/puv3.c
+++ b/hw/unicore32/puv3.c
@@ -109,6 +109,7 @@ static void puv3_init(MachineState *machine)
const char *kernel_filename = machine->kernel_filename;
const char *initrd_filename = machine->initrd_filename;
CPUUniCore32State *env;
+ UniCore32CPU *cpu;
if (initrd_filename) {
hw_error("Please use kernel built-in initramdisk.\n");
@@ -118,10 +119,11 @@ static void puv3_init(MachineState *machine)
cpu_model = "UniCore-II";
}
- env = cpu_init(cpu_model);
- if (!env) {
+ cpu = uc32_cpu_init(cpu_model);
+ if (!cpu) {
hw_error("Unable to find CPU definition\n");
}
+ env = &cpu->env;
puv3_soc_init(env);
puv3_board_init(env, ram_size);