Revision 906879a9 target-arm/helper.c

b/target-arm/helper.c
76 76
        env->cp15.c0_cachetype = 0x1dd20d2;
77 77
        env->cp15.c1_sys = 0x00090078;
78 78
        break;
79
    case ARM_CPUID_ARM1136_R2:
80 79
    case ARM_CPUID_ARM1136:
80
        /* This is the 1136 r1, which is a v6K core */
81
        set_feature(env, ARM_FEATURE_V6K);
82
        /* Fall through */
83
    case ARM_CPUID_ARM1136_R2:
84
        /* What qemu calls "arm1136_r2" is actually the 1136 r0p2, ie an
85
         * older core than plain "arm1136". In particular this does not
86
         * have the v6K features.
87
         */
81 88
        set_feature(env, ARM_FEATURE_V4T);
82 89
        set_feature(env, ARM_FEATURE_V5);
83 90
        set_feature(env, ARM_FEATURE_V6);
84 91
        set_feature(env, ARM_FEATURE_VFP);
85 92
        set_feature(env, ARM_FEATURE_AUXCR);
93
        /* These ID register values are correct for 1136 but may be wrong
94
         * for 1136_r2 (in particular r0p2 does not actually implement most
95
         * of the ID registers).
96
         */
86 97
        env->vfp.xregs[ARM_VFP_FPSID] = 0x410120b4;
87 98
        env->vfp.xregs[ARM_VFP_MVFR0] = 0x11111111;
88 99
        env->vfp.xregs[ARM_VFP_MVFR1] = 0x00000000;
......
98 109
        set_feature(env, ARM_FEATURE_V6K);
99 110
        set_feature(env, ARM_FEATURE_VFP);
100 111
        set_feature(env, ARM_FEATURE_AUXCR);
112
        set_feature(env, ARM_FEATURE_VAPA);
101 113
        env->vfp.xregs[ARM_VFP_FPSID] = 0x410120b5;
102 114
        env->vfp.xregs[ARM_VFP_MVFR0] = 0x11111111;
103 115
        env->vfp.xregs[ARM_VFP_MVFR1] = 0x00000000;
......
113 125
        set_feature(env, ARM_FEATURE_V6K);
114 126
        set_feature(env, ARM_FEATURE_VFP);
115 127
        set_feature(env, ARM_FEATURE_AUXCR);
128
        set_feature(env, ARM_FEATURE_VAPA);
116 129
        env->vfp.xregs[ARM_VFP_FPSID] = 0x410120b4;
117 130
        env->vfp.xregs[ARM_VFP_MVFR0] = 0x11111111;
118 131
        env->vfp.xregs[ARM_VFP_MVFR1] = 0x00000000;
......
243 256
        cpu_abort(env, "Bad CPU ID: %x\n", id);
244 257
        break;
245 258
    }
259

  
260
    /* Some features automatically imply others: */
261
    if (arm_feature(env, ARM_FEATURE_V7)) {
262
        set_feature(env, ARM_FEATURE_VAPA);
263
    }
246 264
}
247 265

  
248 266
void cpu_reset(CPUARMState *env)
......
1524 1542
            goto bad_reg;
1525 1543
        }
1526 1544
        /* No cache, so nothing to do except VA->PA translations. */
1527
        if (arm_feature(env, ARM_FEATURE_V6K)) {
1545
        if (arm_feature(env, ARM_FEATURE_VAPA)) {
1528 1546
            switch (crm) {
1529 1547
            case 4:
1530 1548
                if (arm_feature(env, ARM_FEATURE_V7)) {

Also available in: Unified diff