@@ -213,6 +213,8 @@ static void ti925t_reset(CPU *c)
arm_cpu_reset(c);
env->cp15.c0_cpuid = ARM_CPUID_TI925T; /* Depends on wiring. */
+ env->cp15.c15_i_max = 0x000;
+ env->cp15.c15_i_min = 0xff0;
}
static void ti925t_class_init(ARMCPUClass *klass, const ARMCPUInfo *info)
@@ -548,6 +550,8 @@ static void arm_cpu_initfn(Object *obj)
cpu->env.cpu_model_str = object_get_typename(obj);
cpu->env.cp15.c0_cpuid = cpu_class->cp15.c0_cpuid;
+
+ cpu_do_reset(CPU(cpu));
}
static void arm_cpu_class_init(ObjectClass *klass, void *data)
@@ -10,28 +10,9 @@
#include "sysemu.h"
#include "cpu-core.h"
-static void cpu_reset_model_id(CPUARMState *env, uint32_t id)
-{
- switch (id) {
- case ARM_CPUID_TI915T:
- case ARM_CPUID_TI925T:
- env->cp15.c15_i_max = 0x000;
- env->cp15.c15_i_min = 0xff0;
- break;
- default:
- break;
- }
-}
-
void cpu_reset(CPUARMState *env)
{
- uint32_t id;
-
cpu_do_reset(CPU(ENV_GET_OBJECT(env)));
-
- id = env->cp15.c0_cpuid;
- if (id)
- cpu_reset_model_id(env, id);
}
static int vfp_gdb_get_reg(CPUState *env, uint8_t *buf, int reg)
@@ -110,7 +91,6 @@ CPUARMState *cpu_arm_init(const char *cpu_model)
arm_translate_init();
}
- cpu_reset(env);
if (arm_feature(env, ARM_FEATURE_NEON)) {
gdb_register_coprocessor(env, vfp_gdb_get_reg, vfp_gdb_set_reg,
51, "arm-neon.xml", 0);
Move last remaining TI925T bits to ti925t_reset(). This reduces cpu_reset() to triviality and lets us reset the CPU directly from arm_cpu_initfn(). Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Peter Maydell <peter.maydell@linaro.org> --- target-arm/cpu.c | 4 ++++ target-arm/helper.c | 20 -------------------- 2 files changed, 4 insertions(+), 20 deletions(-)