aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-05-14 02:04:38 +0200
committerAndreas Färber <afaerber@suse.de>2012-06-11 00:23:04 +0200
commit20e93374e902450fa90ddd30eb4bf7d46da9ab76 (patch)
treed2890a2860a8a6abf1badfb64798446a94f02bf9 /hw
parentf25608e9dd0d3c1edcf3076070afb08a6d8c5fdb (diff)
downloadqemu-20e93374e902450fa90ddd30eb4bf7d46da9ab76.zip
qemu-20e93374e902450fa90ddd30eb4bf7d46da9ab76.tar.gz
qemu-20e93374e902450fa90ddd30eb4bf7d46da9ab76.tar.bz2
versatilepb: Use cpu_arm_init() to obtain ARMCPU
Needed for arm_load_kernel(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/versatilepb.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/hw/versatilepb.c b/hw/versatilepb.c
index 7c79c54..d567af9 100644
--- a/hw/versatilepb.c
+++ b/hw/versatilepb.c
@@ -173,7 +173,7 @@ static void versatile_init(ram_addr_t ram_size,
const char *initrd_filename, const char *cpu_model,
int board_id)
{
- CPUARMState *env;
+ ARMCPU *cpu;
MemoryRegion *sysmem = get_system_memory();
MemoryRegion *ram = g_new(MemoryRegion, 1);
qemu_irq *cpu_pic;
@@ -189,10 +189,11 @@ static void versatile_init(ram_addr_t ram_size,
int done_smc = 0;
DriveInfo *dinfo;
- if (!cpu_model)
+ if (!cpu_model) {
cpu_model = "arm926";
- env = cpu_init(cpu_model);
- if (!env) {
+ }
+ cpu = cpu_arm_init(cpu_model);
+ if (!cpu) {
fprintf(stderr, "Unable to find CPU definition\n");
exit(1);
}
@@ -208,7 +209,7 @@ static void versatile_init(ram_addr_t ram_size,
qdev_init_nofail(sysctl);
sysbus_mmio_map(sysbus_from_qdev(sysctl), 0, 0x10000000);
- cpu_pic = arm_pic_init_cpu(env);
+ cpu_pic = arm_pic_init_cpu(&cpu->env);
dev = sysbus_create_varargs("pl190", 0x10140000,
cpu_pic[0], cpu_pic[1], NULL);
for (n = 0; n < 32; n++) {
@@ -338,7 +339,7 @@ static void versatile_init(ram_addr_t ram_size,
versatile_binfo.kernel_cmdline = kernel_cmdline;
versatile_binfo.initrd_filename = initrd_filename;
versatile_binfo.board_id = board_id;
- arm_load_kernel(env, &versatile_binfo);
+ arm_load_kernel(&cpu->env, &versatile_binfo);
}
static void vpb_init(ram_addr_t ram_size,