target/arm: Restrict TCG cpus to TCG accel
cover target/arm: Restrict TCG cpus to TCG accel
These are the uncontroversial patches from "Support disabling TCG on ARM (part 2)"
https://www.mail-archive.com/[email protected]/msg689168.html
The other patches are blocked by the "accel: Allow targets to use Kconfig" series:
https://www.mail-archive.com/[email protected]/msg689024.html
Sending this series now for review for 5.1.
Regards,
Phil.
Philippe Mathieu-Daudé (4):
target/arm: Restric the Address Translate write operation to TCG accel target/arm/cpu: Use ARRAY_SIZE() to iterate over ARMCPUInfo[] target/arm/cpu: Update coding style to make checkpatch.pl happy target/arm: Restrict TCG cpus to TCG accel
Thomas Huth (2):
target/arm: Make set_feature() available for other files target/arm: Make cpu_register() available for other files
target/arm/cpu-qom.h | 9 +- target/arm/cpu.h | 10 + target/arm/cpu.c | 657 +------------------------------------- target/arm/cpu64.c | 27 +- target/arm/cpu_tcg.c | 663 +++++++++++++++++++++++++++++++++++++++ target/arm/helper.c | 17 + target/arm/Makefile.objs | 1 + 7 files changed, 708 insertions(+), 676 deletions(-) create mode 100644 target/arm/cpu_tcg.c
Signature · 1 line
2.21.1
PATCH 1/6 target/arm: Restric the Address Translate write operation to TCG accel
Under KVM these registers are written by the hardware. Restrict the writefn handlers to TCG to avoid when building without TCG:
LINK aarch64-softmmu/qemu-system-aarch64
target/arm/helper.o: In function `do_ats_write':
target/arm/helper.c:3524: undefined reference to `raise_exception'
---
Better explanation:
https://www.mail-archive.com/[email protected]/msg689388.html
--- target/arm/helper.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
target/arm/helper.c +17 -0
@@ -3442,6 +3442,7 @@ static CPAccessResult ats_access(CPUARMState *env, const ARMCPRegInfo *ri,return CP_ACCESS_OK ; } +#ifdef CONFIG_TCG static uint64_t do_ats_write (CPUARMState *env,uint64_t value,MMUAccessType access_type,ARMMMUIdx mmu_idx) {
@@ -3602,9 +3603,11 @@ static uint64_t do_ats_write(CPUARMState *env, uint64_t value, }return par64; } +#endif /* CONFIG_TCG */ static void ats_write (CPUARMState *env,const ARMCPRegInfo *ri,uint64_t value) { +#ifdef CONFIG_TCG MMUAccessType access_type = ri->opc2 &1 ?MMU_DATA_STORE :MMU_DATA_LOAD ;uint64_t par64;ARMMMUIdx mmu_idx;
@@ -3664,17 +3667,26 @@ static void ats_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value) par64 =do_ats_write (env, value, access_type, mmu_idx);A32_BANKED_CURRENT_REG_SET (env, par, par64); +#else +/* Handled by hardware accelerator. */ +g_assert_not_reached (); +#endif /* CONFIG_TCG */ }static void ats1h_write (CPUARMState *env,const ARMCPRegInfo *ri,uint64_t value) { +#ifdef CONFIG_TCG MMUAccessType access_type = ri->opc2 &1 ?MMU_DATA_STORE :MMU_DATA_LOAD ;uint64_t par64; par64 =do_ats_write (env, value, access_type, ARMMMUIdx_E2);A32_BANKED_CURRENT_REG_SET (env, par, par64); +#else +/* Handled by hardware accelerator. */ +g_assert_not_reached (); +#endif /* CONFIG_TCG */ } static CPAccessResult at_s1e2_access(CPUARMState *env, const ARMCPRegInfo *ri,
@@ -3689,6 +3701,7 @@ static CPAccessResult at_s1e2_access(CPUARMState *env, const ARMCPRegInfo *ri,static void ats_write64 (CPUARMState *env,const ARMCPRegInfo *ri,uint64_t value) { +#ifdef CONFIG_TCG MMUAccessType access_type = ri->opc2 &1 ?MMU_DATA_STORE :MMU_DATA_LOAD ;ARMMMUIdx mmu_idx;int secure =arm_is_secure_below_el3 (env);
@@ -3728,6 +3741,10 @@ static void ats_write64(CPUARMState *env, const ARMCPRegInfo *ri, } env->cp15.par_el[1 ] =do_ats_write (env, value, access_type, mmu_idx); +#else +/* Handled by hardware accelerator. */ +g_assert_not_reached (); +#endif /* CONFIG_TCG */ }#endif
Signature · 1 line
2.21.1
Re: [PATCH 1/6] target/arm: Restric the Address Translate write operation to TCG accel
Quoted 8 lines · Philippe Mathieu-Daudé
Under KVM these registers are written by the hardware. Restrict the writefn handlers to TCG to avoid when building without TCG:
LINK aarch64-softmmu/qemu-system-aarch64
target/arm/helper.o: In function `do_ats_write':
target/arm/helper.c:3524: undefined reference to `raise_exception'
Quoted 8 lines
Suggested-by Richard Henderson <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
Better explanation:
https://www.mail-archive.com/[email protected]/msg689388.html--- target/arm/helper.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
r~
PATCH 2/6 target/arm: Make set_feature() available for other files
In reply to Philippe Mathieu-DaudéFrom: Thomas Huth <[email protected]>
Move the common set_feature() and unset_feature() functions from cpu.c and cpu64.c to cpu.h.
Message-ID: <[email protected]>
--- target/arm/cpu.h | 10 ++++++++++ target/arm/cpu.c | 10 ---------- target/arm/cpu64.c | 11 +---------- 3 files changed, 11 insertions(+), 20 deletions(-)
target/arm/cpu.h +10 -0
@@ -696,6 +696,16 @@ typedef struct CPUARMState {void *gicv3state; } CPUARMState; +static inline void set_feature (CPUARMState *env,int feature) +{ + env->features |=1ULL << feature; +} + +static inline void unset_feature (CPUARMState *env,int feature) +{ + env->features &= ~(1ULL << feature); +} +/** * ARMELChangeHookFn: * type of a function which can be registered via arm_register_el_change_hook()
target/arm/cpu.c +0 -10
@@ -724,16 +724,6 @@ static bool arm_cpu_virtio_is_big_endian(CPUState *cs)#endif -static inline void set_feature (CPUARMState *env,int feature) -{ - env->features |=1ULL << feature; -} - -static inline void unset_feature (CPUARMState *env,int feature) -{ - env->features &= ~(1ULL << feature); -} -static int print_insn_thumb1 (bfd_vma pc,disassemble_info *info) {
target/arm/cpu64.c +1 -10
@@ -21,6 +21,7 @@#include "qemu/osdep.h" #include "qapi/error.h" #include "cpu.h" +#include "internals.h" #include "qemu/module.h" #if !defined(CONFIG_USER_ONLY )#include "hw/loader.h"
@@ -29,16 +30,6 @@#include "kvm_arm.h" #include "qapi/visitor.h" -static inline void set_feature (CPUARMState *env,int feature) -{ - env->features |=1ULL << feature; -} - -static inline void unset_feature (CPUARMState *env,int feature) -{ - env->features &= ~(1ULL << feature); -} -#ifndef CONFIG_USER_ONLY static uint64_t a57_a53_l2ctlr_read (CPUARMState *env,const ARMCPRegInfo *ri) {
Signature · 1 line
2.21.1
Re: [PATCH 2/6] target/arm: Make set_feature() available for other files
Quoted 25 lines · Philippe Mathieu-Daudé
From: Thomas Huth <[email protected]>
Move the common
set_feature()andunset_feature()functions fromcpu.candcpu64.ctocpu.h.Suggested-by Peter Maydell <[email protected]>Signed-off-by Thomas Huth <[email protected]>Reviewed-by Richard Henderson <[email protected]>Reviewed-by Eric Auger <[email protected]>Message-ID: <[email protected]>
[PMD: Split Thomas's patch in two: set_feature, cpu_register (later)]Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- target/arm/cpu.h | 10 ++++++++++ target/arm/cpu.c | 10 ---------- target/arm/cpu64.c | 11 +---------- 3 files changed, 11 insertions(+), 20 deletions(-)target/arm/cpu.h +0
-0@@ -696,6 +696,16 @@ typedef struct CPUARMState {void *gicv3state; } CPUARMState;
target/arm/cpu.h typedef struct CPUARMState { · line 707
Quoted 10 lines
target/arm/cpu.h +9
-0+static inline void set_feature (CPUARMState *env,int feature) +{ + env->features |=1ULL << feature; +} + +static inline void unset_feature (CPUARMState *env,int feature) +{ + env->features &= ~(1ULL << feature); +}
Nack sigh... This still doesn't work:
target/arm/kvm64.c: At top level:target/arm/kvm64.c:450:20: error: conflicting types for ‘set_feature’
static inline void set_feature(uint64_t *features, int feature)
^~~~~~~~~~~
In file included from include/sysemu/kvm.h:252:0,
from target/arm/kvm64.c:27:
target/arm/cpu.h:699:20: note: previous definition of ‘set_feature’ was here
static inline void set_feature(CPUARMState *env, int feature)
^~~~~~~~~~~
target/arm/kvm64.c:455:20: error: conflicting types for ‘unset_feature’
static inline void unset_feature(uint64_t *features, int feature)
^~~~~~~~~~~~~
In file included from include/sysemu/kvm.h:252:0,
from target/arm/kvm64.c:27:
target/arm/cpu.h:704:20: note: previous definition of ‘unset_feature’ was here
static inline void unset_feature(CPUARMState *env, int feature)
^~~~~~~~~~~~~rules.mak:69: recipe for target 'target/arm/kvm64.o' failed
make: *** [target/arm/kvm64.o] Error 1
Quoted 30 lines
target/arm/cpu.h +1
-0+/** * ARMELChangeHookFn: * type of a function which can be registered via arm_register_el_change_hook() target/arm/cpu.c +0
-10@@ -724,16 +724,6 @@ static bool arm_cpu_virtio_is_big_endian(CPUState *cs)#endif -static inline void set_feature (CPUARMState *env,int feature) -{ - env->features |=1ULL << feature; -} - -static inline void unset_feature (CPUARMState *env,int feature) -{ - env->features &= ~(1ULL << feature); -} -static int print_insn_thumb1 (bfd_vma pc,disassemble_info *info) {target/arm/cpu64.c +0
-0
target/arm/cpu64.c line 24
Quoted 4 lines
target/arm/cpu64.c +1
-0@@ -21,6 +21,7 @@#include "qemu/osdep.h" #include "qapi/error.h" #include "cpu.h" +#include "internals.h"
This include is not necessary.
Quoted 21 lines
target/arm/cpu64.c +0
-10#include "qemu/module.h" #if !defined(CONFIG_USER_ONLY )#include "hw/loader.h" @@ -29,16 +30,6 @@#include "kvm_arm.h" #include "qapi/visitor.h" -static inline void set_feature (CPUARMState *env,int feature) -{ - env->features |=1ULL << feature; -} - -static inline void unset_feature (CPUARMState *env,int feature) -{ - env->features &= ~(1ULL << feature); -} -#ifndef CONFIG_USER_ONLY static uint64_t a57_a53_l2ctlr_read (CPUARMState *env,const ARMCPRegInfo *ri) {
PATCH 3/6 target/arm: Make cpu_register() available for other files
In reply to Philippe Mathieu-DaudéFrom: Thomas Huth <[email protected]>
Make cpu_register() (renamed to arm_cpu_register()) available from internals.h so we can register CPUs also from other files in the future.
Message-ID: <[email protected]>
--- target/arm/cpu-qom.h | 9 ++++++++- target/arm/cpu.c | 10 ++-------- target/arm/cpu64.c | 8 +------- 3 files changed, 11 insertions(+), 16 deletions(-)
target/arm/cpu-qom.h +8 -1
@@ -35,7 +35,14 @@ struct arm_boot_info;#define TYPE_ARM_MAX_CPU "max-" TYPE_ARM_CPU -typedef struct ARMCPUInfo ARMCPUInfo ; +typedef struct ARMCPUInfo { +const char *name; +void (*initfn)(Object *obj); +void (*class_init)(ObjectClass *oc,void *data); +}ARMCPUInfo ; + +void arm_cpu_register (const ARMCPUInfo *info); +void aarch64_cpu_register (const ARMCPUInfo *info);/** * ARMCPUClass:
target/arm/cpu.c +2 -8
@@ -2683,12 +2683,6 @@ static void arm_max_initfn(Object *obj)#endif /* !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64) */ -struct ARMCPUInfo { -const char *name; -void (*initfn)(Object *obj); -void (*class_init)(ObjectClass *oc,void *data); -}; -static const ARMCPUInfo arm_cpus[] = { #if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64) { .name = "arm926", .initfn = arm926_initfn },
@@ -2854,7 +2848,7 @@ static void cpu_register_class_init(ObjectClass *oc, void *data) acc->info = data; } -static void cpu_register (const ARMCPUInfo *info) +void arm_cpu_register (const ARMCPUInfo *info) {TypeInfo type_info = { .parent =TYPE_ARM_CPU ,
@@ -2895,7 +2889,7 @@ static void arm_cpu_register_types(void)type_register_static (&idau_interface_type_info);while (info->name) { -cpu_register (info); +arm_cpu_register (info); info++; }
target/arm/cpu64.c +1 -7
@@ -728,12 +728,6 @@ static void aarch64_max_initfn(Object *obj) cpu_max_set_sve_max_vq, NULL, NULL, &error_fatal); } -struct ARMCPUInfo { -const char *name; -void (*initfn)(Object *obj); -void (*class_init)(ObjectClass *oc,void *data); -}; -static const ARMCPUInfo aarch64_cpus[] = { { .name ="cortex-a57" , .initfn = aarch64_a57_initfn }, { .name ="cortex-a53" , .initfn = aarch64_a53_initfn },
@@ -816,7 +810,7 @@ static void cpu_register_class_init(ObjectClass *oc, void *data) acc->info = data; } -static void aarch64_cpu_register (const ARMCPUInfo *info) +void aarch64_cpu_register (const ARMCPUInfo *info) {TypeInfo type_info = { .parent =TYPE_AARCH64_CPU ,
Signature · 1 line
2.21.1
PATCH 4/6 target/arm/cpu: Use ARRAY_SIZE() to iterate over ARMCPUInfo[]
In reply to Philippe Mathieu-Daudé--- target/arm/cpu.c | 8 +++----- target/arm/cpu64.c | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-)
target/arm/cpu.c +3 -5
@@ -2735,7 +2735,6 @@ static const ARMCPUInfo arm_cpus[] = { { .name = "any", .initfn = arm_max_initfn }, #endif #endif - { .name = NULL } }; static Property arm_cpu_properties[] = {
@@ -2883,14 +2882,13 @@ static const TypeInfo idau_interface_type_info = {static void arm_cpu_register_types (void ) { -const ARMCPUInfo *info = arm_cpus; +size_t i;type_register_static (&arm_cpu_type_info);type_register_static (&idau_interface_type_info); -while (info->name) { -arm_cpu_register (info); - info++; +for (i =0 ; i <ARRAY_SIZE (arm_cpus); ++i) { +arm_cpu_register (&arm_cpus[i]); }#ifdef CONFIG_KVM
target/arm/cpu64.c +3 -5
@@ -733,7 +733,6 @@ static const ARMCPUInfo aarch64_cpus[] = { { .name = "cortex-a53", .initfn = aarch64_a53_initfn }, { .name = "cortex-a72", .initfn = aarch64_a72_initfn }, { .name = "max", .initfn = aarch64_max_initfn }, - { .name = NULL } };static bool aarch64_cpu_get_aarch64 (Object *obj,Error **errp)
@@ -839,13 +838,12 @@ static const TypeInfo aarch64_cpu_type_info = {static void aarch64_cpu_register_types (void ) { -const ARMCPUInfo *info = aarch64_cpus; +size_t i;type_register_static (&aarch64_cpu_type_info); -while (info->name) { -aarch64_cpu_register (info); - info++; +for (i =0 ; i <ARRAY_SIZE (aarch64_cpus); ++i) { +aarch64_cpu_register (&aarch64_cpus[i]); } }
Signature · 1 line
2.21.1
Re: [PATCH 4/6] target/arm/cpu: Use ARRAY_SIZE() to iterate over ARMCPUInfo[]
Quoted 6 lines · Philippe Mathieu-Daudé
Suggested-by Richard Henderson <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- target/arm/cpu.c | 8 +++----- target/arm/cpu64.c | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-)
r~
PATCH 5/6 target/arm/cpu: Update coding style to make checkpatch.pl happy
In reply to Philippe Mathieu-DaudéWe will move this code in the next commit. Clean it up first to avoid checkpatch.pl errors.
--- target/arm/cpu.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
target/arm/cpu.c +6 -3
@@ -582,7 +582,8 @@ static bool arm_v7m_cpu_exec_interrupt(CPUState *cs, int interrupt_request)CPUARMState *env = &cpu->env;bool ret = false; -/* ARMv7-M interrupt masking works differently than -A or -R. +/* +* ARMv7-M interrupt masking works differently than -A or -R. * There is no FIQ/IRQ distinction. Instead of I and F bits * masking FIQ and IRQ interrupts, an exception is taken only * if it is higher priority than the current execution priority
@@ -1902,7 +1903,8 @@ static void arm1026_initfn(Object *obj)static void arm1136_r2_initfn (Object *obj) {ARMCPU *cpu =ARM_CPU (obj); -/* What qemu calls "arm1136_r2" is actually the 1136 r0p2, ie an +/* +* What qemu calls "arm1136_r2" is actually the 1136 r0p2, ie an * older core than plain "arm1136". In particular this does not * have the v6K features. * These ID register values are correct for 1136 but may be wrong
@@ -2688,7 +2690,8 @@ static const ARMCPUInfo arm_cpus[] = { { .name = "arm926", .initfn = arm926_initfn }, { .name = "arm946", .initfn = arm946_initfn }, { .name = "arm1026", .initfn = arm1026_initfn }, -/* What QEMU calls "arm1136-r2" is actually the 1136 r0p2, i.e. an +/* +* What QEMU calls "arm1136-r2" is actually the 1136 r0p2, i.e. an * older core than plain "arm1136". In particular this does not * have the v6K features. */
Signature · 1 line
2.21.1
Re: [PATCH 5/6] target/arm/cpu: Update coding style to make checkpatch.pl happy
Quoted 7 lines · Philippe Mathieu-Daudé
We will move this code in the next commit. Clean it up first to avoid checkpatch.pl errors.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- target/arm/cpu.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
r~
PATCH 6/6 target/arm: Restrict TCG cpus to TCG accel
In reply to Philippe Mathieu-DaudéA KVM-only build won't be able to run TCG cpus.
---
This patch review is funnier using:
'git-diff --color-moved=dimmed-zebra'
--- target/arm/cpu.c | 634 ------------------------------------- target/arm/cpu_tcg.c | 663 +++++++++++++++++++++++++++++++++++++++ target/arm/Makefile.objs | 1 + 3 files changed, 664 insertions(+), 634 deletions(-) create mode 100644 target/arm/cpu_tcg.c
target/arm/cpu.c +0 -634
@@ -574,32 +574,6 @@ bool arm_cpu_exec_interrupt(CPUState *cs, int interrupt_request)return true; } -#if !defined(CONFIG_USER_ONLY ) || !defined(TARGET_AARCH64 ) -static bool arm_v7m_cpu_exec_interrupt (CPUState *cs,int interrupt_request) -{ -CPUClass *cc =CPU_GET_CLASS (cs); -ARMCPU *cpu =ARM_CPU (cs); -CPUARMState *env = &cpu->env; -bool ret = false; - -/* -* ARMv7-M interrupt masking works differently than -A or -R. -* There is no FIQ/IRQ distinction. Instead of I and F bits -* masking FIQ and IRQ interrupts, an exception is taken only -* if it is higher priority than the current execution priority -* (which depends on state like BASEPRI, FAULTMASK and the -* currently active exception). -*/ -if (interrupt_request &CPU_INTERRUPT_HARD - && (armv7m_nvic_can_take_pending_exception (env->nvic))) { - cs->exception_index =EXCP_IRQ ; - cc->do_interrupt (cs); - ret = true; - } -return ret; -} -#endif -void arm_cpu_update_virq (ARMCPU *cpu) {/*
@@ -1820,406 +1794,6 @@ static ObjectClass *arm_cpu_class_by_name(const char *cpu_model)/* CPU models. These are not needed for the AArch64 linux-user build. */ #if !defined(CONFIG_USER_ONLY ) || !defined(TARGET_AARCH64 ) -static void arm926_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - - cpu->dtb_compatible ="arm,arm926" ; -set_feature (&cpu->env,ARM_FEATURE_V5 ); -set_feature (&cpu->env,ARM_FEATURE_DUMMY_C15_REGS ); -set_feature (&cpu->env,ARM_FEATURE_CACHE_TEST_CLEAN ); - 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 ); -/* -* Similarly, we need to set MVFR0 fields to enable vfp and short vector -* support even though ARMv5 doesn't have this register. -*/ - cpu->isar.mvfr0 =FIELD_DP32 (cpu->isar.mvfr0,MVFR0 ,FPSHVEC ,1 ); - cpu->isar.mvfr0 =FIELD_DP32 (cpu->isar.mvfr0,MVFR0 ,FPSP ,1 ); - cpu->isar.mvfr0 =FIELD_DP32 (cpu->isar.mvfr0,MVFR0 ,FPDP ,1 ); -} - -static void arm946_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - - cpu->dtb_compatible ="arm,arm946" ; -set_feature (&cpu->env,ARM_FEATURE_V5 ); -set_feature (&cpu->env,ARM_FEATURE_PMSA ); -set_feature (&cpu->env,ARM_FEATURE_DUMMY_C15_REGS ); - cpu->midr =0x41059461 ; - cpu->ctr =0x0f004006 ; - cpu->reset_sctlr =0x00000078 ; -} - -static void arm1026_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - - cpu->dtb_compatible ="arm,arm1026" ; -set_feature (&cpu->env,ARM_FEATURE_V5 ); -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 ); - 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 ); -/* -* Similarly, we need to set MVFR0 fields to enable vfp and short vector -* support even though ARMv5 doesn't have this register. -*/ - cpu->isar.mvfr0 =FIELD_DP32 (cpu->isar.mvfr0,MVFR0 ,FPSHVEC ,1 ); - cpu->isar.mvfr0 =FIELD_DP32 (cpu->isar.mvfr0,MVFR0 ,FPSP ,1 ); - cpu->isar.mvfr0 =FIELD_DP32 (cpu->isar.mvfr0,MVFR0 ,FPDP ,1 ); - - { -/* The 1026 had an IFAR at c6,c0,0,1 rather than the ARMv6 c6,c0,0,2 */ -ARMCPRegInfo ifar = { - .name ="IFAR" , .cp =15 , .crn =6 , .crm =0 , .opc1 =0 , .opc2 =1 , - .access =PL1_RW , - .fieldoffset = offsetof(CPUARMState, cp15.ifar_ns), - .resetvalue =0 - }; -define_one_arm_cp_reg (cpu, &ifar); - } -} - -static void arm1136_r2_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); -/* -* What qemu calls "arm1136_r2" is actually the 1136 r0p2, ie an -* older core than plain "arm1136". In particular this does not -* have the v6K features. -* These ID register values are correct for 1136 but may be wrong -* for 1136_r2 (in particular r0p2 does not actually implement most -* of the ID registers). -*/ - - cpu->dtb_compatible ="arm,arm1136" ; -set_feature (&cpu->env,ARM_FEATURE_V6 ); -set_feature (&cpu->env,ARM_FEATURE_DUMMY_C15_REGS ); -set_feature (&cpu->env,ARM_FEATURE_CACHE_DIRTY_REG ); -set_feature (&cpu->env,ARM_FEATURE_CACHE_BLOCK_OPS ); - cpu->midr =0x4107b362 ; - cpu->reset_fpsid =0x410120b4 ; - cpu->isar.mvfr0 =0x11111111 ; - cpu->isar.mvfr1 =0x00000000 ; - cpu->ctr =0x1dd20d2 ; - cpu->reset_sctlr =0x00050078 ; - cpu->id_pfr0 =0x111 ; - cpu->id_pfr1 =0x1 ; - cpu->isar.id_dfr0 =0x2 ; - cpu->id_afr0 =0x3 ; - cpu->isar.id_mmfr0 =0x01130003 ; - cpu->isar.id_mmfr1 =0x10030302 ; - cpu->isar.id_mmfr2 =0x01222110 ; - cpu->isar.id_isar0 =0x00140011 ; - cpu->isar.id_isar1 =0x12002111 ; - cpu->isar.id_isar2 =0x11231111 ; - cpu->isar.id_isar3 =0x01102131 ; - cpu->isar.id_isar4 =0x141 ; - cpu->reset_auxcr =7 ; -} - -static void arm1136_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - - cpu->dtb_compatible ="arm,arm1136" ; -set_feature (&cpu->env,ARM_FEATURE_V6K ); -set_feature (&cpu->env,ARM_FEATURE_V6 ); -set_feature (&cpu->env,ARM_FEATURE_DUMMY_C15_REGS ); -set_feature (&cpu->env,ARM_FEATURE_CACHE_DIRTY_REG ); -set_feature (&cpu->env,ARM_FEATURE_CACHE_BLOCK_OPS ); - cpu->midr =0x4117b363 ; - cpu->reset_fpsid =0x410120b4 ; - cpu->isar.mvfr0 =0x11111111 ; - cpu->isar.mvfr1 =0x00000000 ; - cpu->ctr =0x1dd20d2 ; - cpu->reset_sctlr =0x00050078 ; - cpu->id_pfr0 =0x111 ; - cpu->id_pfr1 =0x1 ; - cpu->isar.id_dfr0 =0x2 ; - cpu->id_afr0 =0x3 ; - cpu->isar.id_mmfr0 =0x01130003 ; - cpu->isar.id_mmfr1 =0x10030302 ; - cpu->isar.id_mmfr2 =0x01222110 ; - cpu->isar.id_isar0 =0x00140011 ; - cpu->isar.id_isar1 =0x12002111 ; - cpu->isar.id_isar2 =0x11231111 ; - cpu->isar.id_isar3 =0x01102131 ; - cpu->isar.id_isar4 =0x141 ; - cpu->reset_auxcr =7 ; -} - -static void arm1176_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - - cpu->dtb_compatible ="arm,arm1176" ; -set_feature (&cpu->env,ARM_FEATURE_V6K ); -set_feature (&cpu->env,ARM_FEATURE_VAPA ); -set_feature (&cpu->env,ARM_FEATURE_DUMMY_C15_REGS ); -set_feature (&cpu->env,ARM_FEATURE_CACHE_DIRTY_REG ); -set_feature (&cpu->env,ARM_FEATURE_CACHE_BLOCK_OPS ); -set_feature (&cpu->env,ARM_FEATURE_EL3 ); - cpu->midr =0x410fb767 ; - cpu->reset_fpsid =0x410120b5 ; - cpu->isar.mvfr0 =0x11111111 ; - cpu->isar.mvfr1 =0x00000000 ; - cpu->ctr =0x1dd20d2 ; - cpu->reset_sctlr =0x00050078 ; - cpu->id_pfr0 =0x111 ; - cpu->id_pfr1 =0x11 ; - cpu->isar.id_dfr0 =0x33 ; - cpu->id_afr0 =0 ; - cpu->isar.id_mmfr0 =0x01130003 ; - cpu->isar.id_mmfr1 =0x10030302 ; - cpu->isar.id_mmfr2 =0x01222100 ; - cpu->isar.id_isar0 =0x0140011 ; - cpu->isar.id_isar1 =0x12002111 ; - cpu->isar.id_isar2 =0x11231121 ; - cpu->isar.id_isar3 =0x01102131 ; - cpu->isar.id_isar4 =0x01141 ; - cpu->reset_auxcr =7 ; -} - -static void arm11mpcore_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - - cpu->dtb_compatible ="arm,arm11mpcore" ; -set_feature (&cpu->env,ARM_FEATURE_V6K ); -set_feature (&cpu->env,ARM_FEATURE_VAPA ); -set_feature (&cpu->env,ARM_FEATURE_MPIDR ); -set_feature (&cpu->env,ARM_FEATURE_DUMMY_C15_REGS ); - cpu->midr =0x410fb022 ; - cpu->reset_fpsid =0x410120b4 ; - cpu->isar.mvfr0 =0x11111111 ; - cpu->isar.mvfr1 =0x00000000 ; - cpu->ctr =0x1d192992 ;/* 32K icache 32K dcache */ - cpu->id_pfr0 =0x111 ; - cpu->id_pfr1 =0x1 ; - cpu->isar.id_dfr0 =0 ; - cpu->id_afr0 =0x2 ; - cpu->isar.id_mmfr0 =0x01100103 ; - cpu->isar.id_mmfr1 =0x10020302 ; - cpu->isar.id_mmfr2 =0x01222000 ; - cpu->isar.id_isar0 =0x00100011 ; - cpu->isar.id_isar1 =0x12002111 ; - cpu->isar.id_isar2 =0x11221011 ; - cpu->isar.id_isar3 =0x01102131 ; - cpu->isar.id_isar4 =0x141 ; - cpu->reset_auxcr =1 ; -} - -static void cortex_m0_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); -set_feature (&cpu->env,ARM_FEATURE_V6 ); -set_feature (&cpu->env,ARM_FEATURE_M ); - - cpu->midr =0x410cc200 ; -} - -static void cortex_m3_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); -set_feature (&cpu->env,ARM_FEATURE_V7 ); -set_feature (&cpu->env,ARM_FEATURE_M ); -set_feature (&cpu->env,ARM_FEATURE_M_MAIN ); - cpu->midr =0x410fc231 ; - cpu->pmsav7_dregion =8 ; - cpu->id_pfr0 =0x00000030 ; - cpu->id_pfr1 =0x00000200 ; - cpu->isar.id_dfr0 =0x00100000 ; - cpu->id_afr0 =0x00000000 ; - cpu->isar.id_mmfr0 =0x00000030 ; - cpu->isar.id_mmfr1 =0x00000000 ; - cpu->isar.id_mmfr2 =0x00000000 ; - cpu->isar.id_mmfr3 =0x00000000 ; - cpu->isar.id_isar0 =0x01141110 ; - cpu->isar.id_isar1 =0x02111000 ; - cpu->isar.id_isar2 =0x21112231 ; - cpu->isar.id_isar3 =0x01111110 ; - cpu->isar.id_isar4 =0x01310102 ; - cpu->isar.id_isar5 =0x00000000 ; - cpu->isar.id_isar6 =0x00000000 ; -} - -static void cortex_m4_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - -set_feature (&cpu->env,ARM_FEATURE_V7 ); -set_feature (&cpu->env,ARM_FEATURE_M ); -set_feature (&cpu->env,ARM_FEATURE_M_MAIN ); -set_feature (&cpu->env,ARM_FEATURE_THUMB_DSP ); - cpu->midr =0x410fc240 ;/* r0p0 */ - cpu->pmsav7_dregion =8 ; - cpu->isar.mvfr0 =0x10110021 ; - cpu->isar.mvfr1 =0x11000011 ; - cpu->isar.mvfr2 =0x00000000 ; - cpu->id_pfr0 =0x00000030 ; - cpu->id_pfr1 =0x00000200 ; - cpu->isar.id_dfr0 =0x00100000 ; - cpu->id_afr0 =0x00000000 ; - cpu->isar.id_mmfr0 =0x00000030 ; - cpu->isar.id_mmfr1 =0x00000000 ; - cpu->isar.id_mmfr2 =0x00000000 ; - cpu->isar.id_mmfr3 =0x00000000 ; - cpu->isar.id_isar0 =0x01141110 ; - cpu->isar.id_isar1 =0x02111000 ; - cpu->isar.id_isar2 =0x21112231 ; - cpu->isar.id_isar3 =0x01111110 ; - cpu->isar.id_isar4 =0x01310102 ; - cpu->isar.id_isar5 =0x00000000 ; - cpu->isar.id_isar6 =0x00000000 ; -} - -static void cortex_m7_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - -set_feature (&cpu->env,ARM_FEATURE_V7 ); -set_feature (&cpu->env,ARM_FEATURE_M ); -set_feature (&cpu->env,ARM_FEATURE_M_MAIN ); -set_feature (&cpu->env,ARM_FEATURE_THUMB_DSP ); - cpu->midr =0x411fc272 ;/* r1p2 */ - cpu->pmsav7_dregion =8 ; - cpu->isar.mvfr0 =0x10110221 ; - cpu->isar.mvfr1 =0x12000011 ; - cpu->isar.mvfr2 =0x00000040 ; - cpu->id_pfr0 =0x00000030 ; - cpu->id_pfr1 =0x00000200 ; - cpu->isar.id_dfr0 =0x00100000 ; - cpu->id_afr0 =0x00000000 ; - cpu->isar.id_mmfr0 =0x00100030 ; - cpu->isar.id_mmfr1 =0x00000000 ; - cpu->isar.id_mmfr2 =0x01000000 ; - cpu->isar.id_mmfr3 =0x00000000 ; - cpu->isar.id_isar0 =0x01101110 ; - cpu->isar.id_isar1 =0x02112000 ; - cpu->isar.id_isar2 =0x20232231 ; - cpu->isar.id_isar3 =0x01111131 ; - cpu->isar.id_isar4 =0x01310132 ; - cpu->isar.id_isar5 =0x00000000 ; - cpu->isar.id_isar6 =0x00000000 ; -} - -static void cortex_m33_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - -set_feature (&cpu->env,ARM_FEATURE_V8 ); -set_feature (&cpu->env,ARM_FEATURE_M ); -set_feature (&cpu->env,ARM_FEATURE_M_MAIN ); -set_feature (&cpu->env,ARM_FEATURE_M_SECURITY ); -set_feature (&cpu->env,ARM_FEATURE_THUMB_DSP ); - cpu->midr =0x410fd213 ;/* r0p3 */ - cpu->pmsav7_dregion =16 ; - cpu->sau_sregion =8 ; - cpu->isar.mvfr0 =0x10110021 ; - cpu->isar.mvfr1 =0x11000011 ; - cpu->isar.mvfr2 =0x00000040 ; - cpu->id_pfr0 =0x00000030 ; - cpu->id_pfr1 =0x00000210 ; - cpu->isar.id_dfr0 =0x00200000 ; - cpu->id_afr0 =0x00000000 ; - cpu->isar.id_mmfr0 =0x00101F40 ; - cpu->isar.id_mmfr1 =0x00000000 ; - cpu->isar.id_mmfr2 =0x01000000 ; - cpu->isar.id_mmfr3 =0x00000000 ; - cpu->isar.id_isar0 =0x01101110 ; - cpu->isar.id_isar1 =0x02212000 ; - cpu->isar.id_isar2 =0x20232232 ; - cpu->isar.id_isar3 =0x01111131 ; - cpu->isar.id_isar4 =0x01310132 ; - cpu->isar.id_isar5 =0x00000000 ; - cpu->isar.id_isar6 =0x00000000 ; - cpu->clidr =0x00000000 ; - cpu->ctr =0x8000c000 ; -} - -static void arm_v7m_class_init (ObjectClass *oc,void *data) -{ -ARMCPUClass *acc =ARM_CPU_CLASS (oc); -CPUClass *cc =CPU_CLASS (oc); - - acc->info = data; -#ifndef CONFIG_USER_ONLY - cc->do_interrupt = arm_v7m_cpu_do_interrupt; -#endif - - cc->cpu_exec_interrupt = arm_v7m_cpu_exec_interrupt; -} - -static const ARMCPRegInfo cortexr5_cp_reginfo[] = { -/* Dummy the TCM region regs for the moment */ - { .name ="ATCM" , .cp =15 , .opc1 =0 , .crn =9 , .crm =1 , .opc2 =0 , - .access =PL1_RW , .type =ARM_CP_CONST }, - { .name ="BTCM" , .cp =15 , .opc1 =0 , .crn =9 , .crm =1 , .opc2 =1 , - .access =PL1_RW , .type =ARM_CP_CONST }, - { .name ="DCACHE_INVAL" , .cp =15 , .opc1 =0 , .crn =15 , .crm =5 , - .opc2 =0 , .access =PL1_W , .type =ARM_CP_NOP }, -REGINFO_SENTINEL -}; - -static void cortex_r5_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - -set_feature (&cpu->env,ARM_FEATURE_V7 ); -set_feature (&cpu->env,ARM_FEATURE_V7MP ); -set_feature (&cpu->env,ARM_FEATURE_PMSA ); -set_feature (&cpu->env,ARM_FEATURE_PMU ); - cpu->midr =0x411fc153 ;/* r1p3 */ - cpu->id_pfr0 =0x0131 ; - cpu->id_pfr1 =0x001 ; - cpu->isar.id_dfr0 =0x010400 ; - cpu->id_afr0 =0x0 ; - cpu->isar.id_mmfr0 =0x0210030 ; - cpu->isar.id_mmfr1 =0x00000000 ; - cpu->isar.id_mmfr2 =0x01200000 ; - cpu->isar.id_mmfr3 =0x0211 ; - cpu->isar.id_isar0 =0x02101111 ; - cpu->isar.id_isar1 =0x13112111 ; - cpu->isar.id_isar2 =0x21232141 ; - cpu->isar.id_isar3 =0x01112131 ; - cpu->isar.id_isar4 =0x0010142 ; - cpu->isar.id_isar5 =0x0 ; - cpu->isar.id_isar6 =0x0 ; - cpu->mp_is_up = true; - cpu->pmsav7_dregion =16 ; -define_arm_cp_regs (cpu, cortexr5_cp_reginfo); -} - -static void cortex_r5f_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - -cortex_r5_initfn (obj); - cpu->isar.mvfr0 =0x10110221 ; - cpu->isar.mvfr1 =0x00000011 ; -} -static const ARMCPRegInfo cortexa8_cp_reginfo[] = { { .name ="L2LOCKDOWN" , .cp =15 , .crn =9 , .crm =0 , .opc1 =1 , .opc2 =0 , .access = PL1_RW, .type = ARM_CP_CONST, .resetvalue = 0 },
@@ -2446,174 +2020,6 @@ static void cortex_a15_initfn(Object *obj)define_arm_cp_regs (cpu, cortexa15_cp_reginfo); } -static void ti925t_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); -set_feature (&cpu->env,ARM_FEATURE_V4T ); -set_feature (&cpu->env,ARM_FEATURE_OMAPCP ); - cpu->midr =ARM_CPUID_TI925T ; - cpu->ctr =0x5109149 ; - cpu->reset_sctlr =0x00000070 ; -} - -static void sa1100_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - - cpu->dtb_compatible ="intel,sa1100" ; -set_feature (&cpu->env,ARM_FEATURE_STRONGARM ); -set_feature (&cpu->env,ARM_FEATURE_DUMMY_C15_REGS ); - cpu->midr =0x4401A11B ; - cpu->reset_sctlr =0x00000070 ; -} - -static void sa1110_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); -set_feature (&cpu->env,ARM_FEATURE_STRONGARM ); -set_feature (&cpu->env,ARM_FEATURE_DUMMY_C15_REGS ); - cpu->midr =0x6901B119 ; - cpu->reset_sctlr =0x00000070 ; -} - -static void pxa250_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - - cpu->dtb_compatible ="marvell,xscale" ; -set_feature (&cpu->env,ARM_FEATURE_V5 ); -set_feature (&cpu->env,ARM_FEATURE_XSCALE ); - cpu->midr =0x69052100 ; - cpu->ctr =0xd172172 ; - cpu->reset_sctlr =0x00000078 ; -} - -static void pxa255_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - - cpu->dtb_compatible ="marvell,xscale" ; -set_feature (&cpu->env,ARM_FEATURE_V5 ); -set_feature (&cpu->env,ARM_FEATURE_XSCALE ); - cpu->midr =0x69052d00 ; - cpu->ctr =0xd172172 ; - cpu->reset_sctlr =0x00000078 ; -} - -static void pxa260_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - - cpu->dtb_compatible ="marvell,xscale" ; -set_feature (&cpu->env,ARM_FEATURE_V5 ); -set_feature (&cpu->env,ARM_FEATURE_XSCALE ); - cpu->midr =0x69052903 ; - cpu->ctr =0xd172172 ; - cpu->reset_sctlr =0x00000078 ; -} - -static void pxa261_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - - cpu->dtb_compatible ="marvell,xscale" ; -set_feature (&cpu->env,ARM_FEATURE_V5 ); -set_feature (&cpu->env,ARM_FEATURE_XSCALE ); - cpu->midr =0x69052d05 ; - cpu->ctr =0xd172172 ; - cpu->reset_sctlr =0x00000078 ; -} - -static void pxa262_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - - cpu->dtb_compatible ="marvell,xscale" ; -set_feature (&cpu->env,ARM_FEATURE_V5 ); -set_feature (&cpu->env,ARM_FEATURE_XSCALE ); - cpu->midr =0x69052d06 ; - cpu->ctr =0xd172172 ; - cpu->reset_sctlr =0x00000078 ; -} - -static void pxa270a0_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - - cpu->dtb_compatible ="marvell,xscale" ; -set_feature (&cpu->env,ARM_FEATURE_V5 ); -set_feature (&cpu->env,ARM_FEATURE_XSCALE ); -set_feature (&cpu->env,ARM_FEATURE_IWMMXT ); - cpu->midr =0x69054110 ; - cpu->ctr =0xd172172 ; - cpu->reset_sctlr =0x00000078 ; -} - -static void pxa270a1_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - - cpu->dtb_compatible ="marvell,xscale" ; -set_feature (&cpu->env,ARM_FEATURE_V5 ); -set_feature (&cpu->env,ARM_FEATURE_XSCALE ); -set_feature (&cpu->env,ARM_FEATURE_IWMMXT ); - cpu->midr =0x69054111 ; - cpu->ctr =0xd172172 ; - cpu->reset_sctlr =0x00000078 ; -} - -static void pxa270b0_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - - cpu->dtb_compatible ="marvell,xscale" ; -set_feature (&cpu->env,ARM_FEATURE_V5 ); -set_feature (&cpu->env,ARM_FEATURE_XSCALE ); -set_feature (&cpu->env,ARM_FEATURE_IWMMXT ); - cpu->midr =0x69054112 ; - cpu->ctr =0xd172172 ; - cpu->reset_sctlr =0x00000078 ; -} - -static void pxa270b1_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - - cpu->dtb_compatible ="marvell,xscale" ; -set_feature (&cpu->env,ARM_FEATURE_V5 ); -set_feature (&cpu->env,ARM_FEATURE_XSCALE ); -set_feature (&cpu->env,ARM_FEATURE_IWMMXT ); - cpu->midr =0x69054113 ; - cpu->ctr =0xd172172 ; - cpu->reset_sctlr =0x00000078 ; -} - -static void pxa270c0_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - - cpu->dtb_compatible ="marvell,xscale" ; -set_feature (&cpu->env,ARM_FEATURE_V5 ); -set_feature (&cpu->env,ARM_FEATURE_XSCALE ); -set_feature (&cpu->env,ARM_FEATURE_IWMMXT ); - cpu->midr =0x69054114 ; - cpu->ctr =0xd172172 ; - cpu->reset_sctlr =0x00000078 ; -} - -static void pxa270c5_initfn (Object *obj) -{ -ARMCPU *cpu =ARM_CPU (obj); - - cpu->dtb_compatible ="marvell,xscale" ; -set_feature (&cpu->env,ARM_FEATURE_V5 ); -set_feature (&cpu->env,ARM_FEATURE_XSCALE ); -set_feature (&cpu->env,ARM_FEATURE_IWMMXT ); - cpu->midr =0x69054117 ; - cpu->ctr =0xd172172 ; - cpu->reset_sctlr =0x00000078 ; -} -#ifndef TARGET_AARCH64 /* -cpu max: if KVM is enabled, like -cpu host (best possible with this host); * otherwise, a CPU with as many features enabled as our emulation supports.
@@ -2687,50 +2093,10 @@ static void arm_max_initfn(Object *obj)static const ARMCPUInfo arm_cpus[] = { #if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64) - { .name ="arm926" , .initfn = arm926_initfn }, - { .name ="arm946" , .initfn = arm946_initfn }, - { .name ="arm1026" , .initfn = arm1026_initfn }, -/* -* What QEMU calls "arm1136-r2" is actually the 1136 r0p2, i.e. an -* older core than plain "arm1136". In particular this does not -* have the v6K features. -*/ - { .name ="arm1136-r2" , .initfn = arm1136_r2_initfn }, - { .name ="arm1136" , .initfn = arm1136_initfn }, - { .name ="arm1176" , .initfn = arm1176_initfn }, - { .name ="arm11mpcore" , .initfn = arm11mpcore_initfn }, - { .name ="cortex-m0" , .initfn = cortex_m0_initfn, - .class_init = arm_v7m_class_init }, - { .name ="cortex-m3" , .initfn = cortex_m3_initfn, - .class_init = arm_v7m_class_init }, - { .name ="cortex-m4" , .initfn = cortex_m4_initfn, - .class_init = arm_v7m_class_init }, - { .name ="cortex-m7" , .initfn = cortex_m7_initfn, - .class_init = arm_v7m_class_init }, - { .name ="cortex-m33" , .initfn = cortex_m33_initfn, - .class_init = arm_v7m_class_init }, - { .name ="cortex-r5" , .initfn = cortex_r5_initfn }, - { .name ="cortex-r5f" , .initfn = cortex_r5f_initfn }, { .name ="cortex-a7" , .initfn = cortex_a7_initfn }, { .name ="cortex-a8" , .initfn = cortex_a8_initfn }, { .name ="cortex-a9" , .initfn = cortex_a9_initfn }, { .name ="cortex-a15" , .initfn = cortex_a15_initfn }, - { .name ="ti925t" , .initfn = ti925t_initfn }, - { .name ="sa1100" , .initfn = sa1100_initfn }, - { .name ="sa1110" , .initfn = sa1110_initfn }, - { .name ="pxa250" , .initfn = pxa250_initfn }, - { .name ="pxa255" , .initfn = pxa255_initfn }, - { .name ="pxa260" , .initfn = pxa260_initfn }, - { .name ="pxa261" , .initfn = pxa261_initfn }, - { .name ="pxa262" , .initfn = pxa262_initfn }, -/* "pxa270" is an alias for "pxa270-a0" */ - { .name ="pxa270" , .initfn = pxa270a0_initfn }, - { .name ="pxa270-a0" , .initfn = pxa270a0_initfn }, - { .name ="pxa270-a1" , .initfn = pxa270a1_initfn }, - { .name ="pxa270-b0" , .initfn = pxa270b0_initfn }, - { .name ="pxa270-b1" , .initfn = pxa270b1_initfn }, - { .name ="pxa270-c0" , .initfn = pxa270c0_initfn }, - { .name ="pxa270-c5" , .initfn = pxa270c5_initfn }, #ifndef TARGET_AARCH64 { .name ="max" , .initfn = arm_max_initfn }, #endif
target/arm/cpu_tcg.c new file +663 -0
663 lines not on this page · raw message
target/arm/Makefile.objs +1 -0
@@ -61,6 +61,7 @@ obj-y += translate.o op_helper.o obj-y += crypto_helper.o obj-y += iwmmxt_helper.o vec_helper.o neon_helper.o obj-y += m_helper.o +obj-y += cpu_tcg.o obj-$(CONFIG_SOFTMMU) += psci.o
Signature · 1 line
2.21.1
Quoted 6 lines · Philippe Mathieu-Daudé
A KVM-only build won't be able to run TCG cpus.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
This patch review is funnier using:
'git-diff --color-moved=dimmed-zebra'
Quoted 6 lines
--- target/arm/cpu.c | 634 ------------------------------------- target/arm/cpu_tcg.c | 663 +++++++++++++++++++++++++++++++++++++++ target/arm/Makefile.objs | 1 + 3 files changed, 664 insertions(+), 634 deletions(-) create mode 100644 target/arm/cpu_tcg.c
r~
Quoted 14 lines · Richard Henderson
Quoted 6 lines · Philippe Mathieu-Daudé
A KVM-only build won't be able to run TCG cpus.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
This patch review is funnier using:
'git-diff --color-moved=dimmed-zebra'Quoted 6 lines
--- target/arm/cpu.c | 634 ------------------------------------- target/arm/cpu_tcg.c | 663 +++++++++++++++++++++++++++++++++++++++ target/arm/Makefile.objs | 1 + 3 files changed, 664 insertions(+), 634 deletions(-)create mode 100644
target/arm/cpu_tcg.c
Quoted 1 line
Reviewed-by Richard Henderson <[email protected]>
Thank you Richard for reviewing 6 different time the same code movement...!
Quoted 12 lines · Philippe Mathieu-Daudé
A KVM-only build won't be able to run TCG cpus.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
This patch review is funnier using:
'git-diff --color-moved=dimmed-zebra'--- target/arm/cpu.c | 634 ------------------------------------- target/arm/cpu_tcg.c | 663 +++++++++++++++++++++++++++++++++++++++ target/arm/Makefile.objs | 1 + 3 files changed, 664 insertions(+), 634 deletions(-)create mode 100644
target/arm/cpu_tcg.c
[...]
target/arm/cpu_tcg.c line 3
Quoted 9 lines
target/arm/cpu_tcg.c new file +3
-0@@ -0,0 +1,663 @@ +/* +* ARM generic helpers. +* QEMU ARM CPU
Here I meant one line "QEMU ARM TCG CPU" instead of "ARM generic helpers. QEMU ARM CPU"
Quoted 12 lines
target/arm/cpu_tcg.c new file +12
-0+* +* This code is licensed under the GNU GPL v2 or later. +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include "qemu/osdep.h" +#include "cpu.h" +#include "internals.h" + +/* CPU models. These are not needed for the AArch64 linux-user build. */ +#if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64)[...]