aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-05-04 16:09:50 +0200
committerAndreas Färber <afaerber@suse.de>2012-06-04 23:00:41 +0200
commit0f37c99b27b7e89c77d30c82f46485fd2bc61ab8 (patch)
tree6dd17da92922ad76f6cc45aa8f42b9c1755e27fc /hw
parent5f4ef08b20ece1b3711bcfb3751efb13986d17e5 (diff)
downloadqemu-0f37c99b27b7e89c77d30c82f46485fd2bc61ab8.zip
qemu-0f37c99b27b7e89c77d30c82f46485fd2bc61ab8.tar.gz
qemu-0f37c99b27b7e89c77d30c82f46485fd2bc61ab8.tar.bz2
armv7m: Use cpu_arm_init() to obtain ARMCPU
Needed for armv7m_reset(). 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/armv7m.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/armv7m.c b/hw/armv7m.c
index 4aac076..4e5971c 100644
--- a/hw/armv7m.c
+++ b/hw/armv7m.c
@@ -160,6 +160,7 @@ qemu_irq *armv7m_init(MemoryRegion *address_space_mem,
int flash_size, int sram_size,
const char *kernel_filename, const char *cpu_model)
{
+ ARMCPU *cpu;
CPUARMState *env;
DeviceState *nvic;
/* FIXME: make this local state. */
@@ -177,13 +178,15 @@ qemu_irq *armv7m_init(MemoryRegion *address_space_mem,
flash_size *= 1024;
sram_size *= 1024;
- if (!cpu_model)
+ if (cpu_model == NULL) {
cpu_model = "cortex-m3";
- env = cpu_init(cpu_model);
- if (!env) {
+ }
+ cpu = cpu_arm_init(cpu_model);
+ if (cpu == NULL) {
fprintf(stderr, "Unable to find CPU definition\n");
exit(1);
}
+ env = &cpu->env;
#if 0
/* > 32Mb SRAM gets complicated because it overlaps the bitband area.