aboutsummaryrefslogtreecommitdiff
path: root/hw/arm_boot.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-05-05 12:40:39 +0200
committerAndreas Färber <afaerber@suse.de>2012-06-04 23:00:41 +0200
commit351d56662175bd00473326b0460516c94a427876 (patch)
tree481fc9ca099575706cb277c53f16edb7d86b41a5 /hw/arm_boot.c
parent31363f12f56c98015a9e98dc46658f17b6477d24 (diff)
arm_boot: Pass ARMCPU to do_cpu_reset()
Allows us to use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm_boot.c')
-rw-r--r--hw/arm_boot.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/arm_boot.c b/hw/arm_boot.c
index 7447f5c169..eb2d1760b0 100644
--- a/hw/arm_boot.c
+++ b/hw/arm_boot.c
@@ -274,10 +274,11 @@ static int load_dtb(target_phys_addr_t addr, const struct arm_boot_info *binfo)
static void do_cpu_reset(void *opaque)
{
- CPUARMState *env = opaque;
+ ARMCPU *cpu = opaque;
+ CPUARMState *env = &cpu->env;
const struct arm_boot_info *info = env->boot_info;
- cpu_state_reset(env);
+ cpu_reset(CPU(cpu));
if (info) {
if (!info->is_linux) {
/* Jump to the entry point. */
@@ -302,6 +303,7 @@ static void do_cpu_reset(void *opaque)
void arm_load_kernel(CPUARMState *env, struct arm_boot_info *info)
{
+ ARMCPU *cpu;
int kernel_size;
int initrd_size;
int n;
@@ -406,7 +408,8 @@ void arm_load_kernel(CPUARMState *env, struct arm_boot_info *info)
info->is_linux = is_linux;
for (; env; env = env->next_cpu) {
+ cpu = arm_env_get_cpu(env);
env->boot_info = info;
- qemu_register_reset(do_cpu_reset, env);
+ qemu_register_reset(do_cpu_reset, cpu);
}
}