mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
target/arm: Convert jazelle from feature bit to isar1 test
Having V6 alone imply jazelle was wrong for cortex-m0. Change to an assertion for V6 & !M. This was harmless, because the only place we tested ARM_FEATURE_JAZELLE was for 'bxj' in disas_arm(), which is unreachable for M-profile cores. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20181016223115.24100-6-richard.henderson@linaro.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
7e0cf8b47f
commit
09cbd50198
3 changed files with 20 additions and 5 deletions
|
@ -854,8 +854,8 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)
|
|||
}
|
||||
if (arm_feature(env, ARM_FEATURE_V6)) {
|
||||
set_feature(env, ARM_FEATURE_V5);
|
||||
set_feature(env, ARM_FEATURE_JAZELLE);
|
||||
if (!arm_feature(env, ARM_FEATURE_M)) {
|
||||
assert(cpu_isar_feature(jazelle, cpu));
|
||||
set_feature(env, ARM_FEATURE_AUXCR);
|
||||
}
|
||||
}
|
||||
|
@ -1082,11 +1082,16 @@ static void arm926_initfn(Object *obj)
|
|||
set_feature(&cpu->env, ARM_FEATURE_VFP);
|
||||
set_feature(&cpu->env, ARM_FEATURE_DUMMY_C15_REGS);
|
||||
set_feature(&cpu->env, ARM_FEATURE_CACHE_TEST_CLEAN);
|
||||
set_feature(&cpu->env, ARM_FEATURE_JAZELLE);
|
||||
cpu->midr = 0x41069265;
|
||||
cpu->reset_fpsid = 0x41011090;
|
||||
cpu->ctr = 0x1dd20d2;
|
||||
cpu->reset_sctlr = 0x00090078;
|
||||
|
||||
/*
|
||||
* ARMv5 does not have the ID_ISAR registers, but we can still
|
||||
* set the field to indicate Jazelle support within QEMU.
|
||||
*/
|
||||
cpu->isar.id_isar1 = FIELD_DP32(cpu->isar.id_isar1, ID_ISAR1, JAZELLE, 1);
|
||||
}
|
||||
|
||||
static void arm946_initfn(Object *obj)
|
||||
|
@ -1112,12 +1117,18 @@ static void arm1026_initfn(Object *obj)
|
|||
set_feature(&cpu->env, ARM_FEATURE_AUXCR);
|
||||
set_feature(&cpu->env, ARM_FEATURE_DUMMY_C15_REGS);
|
||||
set_feature(&cpu->env, ARM_FEATURE_CACHE_TEST_CLEAN);
|
||||
set_feature(&cpu->env, ARM_FEATURE_JAZELLE);
|
||||
cpu->midr = 0x4106a262;
|
||||
cpu->reset_fpsid = 0x410110a0;
|
||||
cpu->ctr = 0x1dd20d2;
|
||||
cpu->reset_sctlr = 0x00090078;
|
||||
cpu->reset_auxcr = 1;
|
||||
|
||||
/*
|
||||
* ARMv5 does not have the ID_ISAR registers, but we can still
|
||||
* set the field to indicate Jazelle support within QEMU.
|
||||
*/
|
||||
cpu->isar.id_isar1 = FIELD_DP32(cpu->isar.id_isar1, ID_ISAR1, JAZELLE, 1);
|
||||
|
||||
{
|
||||
/* The 1026 had an IFAR at c6,c0,0,1 rather than the ARMv6 c6,c0,0,2 */
|
||||
ARMCPRegInfo ifar = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue