Fix ARM1136, ARM11MPCORE and CORTEXA8 cpuid bug
PATCH 1/1 Fix ARM1136, ARM11MPCORE and CORTEXA8 cpuid bug
I found that ARM1136, ARM11MPCore and CortexA8 targets failed to run because of the following copy-and-paste bug.
HyeonSeung Jang.
--- target-arm/helper.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
target-arm/helper.c +4 -3
@@ -1,3 +1,4 @@ +#include <stdio.h> #include <stdlib.h> #include <string.h>
@@ -61,7 +62,7 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) env->vfp.xregs[ARM_VFP_MVFR0 ] =0x11111111 ; env->vfp.xregs[ARM_VFP_MVFR1 ] =0x00000000 ;memcpy (env->cp15.c0_c1, arm1136_cp15_c0_c1,8 *sizeof (uint32_t )); -memcpy (env->cp15.c0_c1, arm1136_cp15_c0_c2,8 *sizeof (uint32_t )); +memcpy (env->cp15.c0_c2, arm1136_cp15_c0_c2,8 *sizeof (uint32_t )); env->cp15.c0_cachetype =0x1dd20d2 ;break ;case ARM_CPUID_ARM11MPCORE :
@@ -73,7 +74,7 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) env->vfp.xregs[ARM_VFP_MVFR0 ] =0x11111111 ; env->vfp.xregs[ARM_VFP_MVFR1 ] =0x00000000 ;memcpy (env->cp15.c0_c1, mpcore_cp15_c0_c1,8 *sizeof (uint32_t )); -memcpy (env->cp15.c0_c1, mpcore_cp15_c0_c2,8 *sizeof (uint32_t )); +memcpy (env->cp15.c0_c2, mpcore_cp15_c0_c2,8 *sizeof (uint32_t )); env->cp15.c0_cachetype =0x1dd20d2 ;break ;case ARM_CPUID_CORTEXA8 :
@@ -89,7 +90,7 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) env->vfp.xregs[ARM_VFP_MVFR0 ] =0x11110222 ; env->vfp.xregs[ARM_VFP_MVFR1 ] =0x00011100 ;memcpy (env->cp15.c0_c1, cortexa8_cp15_c0_c1,8 *sizeof (uint32_t )); -memcpy (env->cp15.c0_c1, cortexa8_cp15_c0_c2,8 *sizeof (uint32_t )); +memcpy (env->cp15.c0_c2, cortexa8_cp15_c0_c2,8 *sizeof (uint32_t )); env->cp15.c0_cachetype =0x1dd20d2 ;break ;case ARM_CPUID_CORTEXM3 :