target/arm: Add cortex-a35
PATCH 1/1 target/arm: Add cortex-a35
Add cortex A35 core and enable it for virt board.
--- docs/system/arm/virt.rst | 1 + hw/arm/virt.c | 1 + target/arm/cpu64.c | 69 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+)
docs/system/arm/virt.rst +1 -0
@@ -52,6 +52,7 @@ Supported guest CPU types: - ``cortex-a7`` (32-bit) - ``cortex-a15`` (32-bit; the default) +- ``cortex-a35`` (64-bit) - ``cortex-a53`` (64-bit) - ``cortex-a57`` (64-bit) - ``cortex-a72`` (64-bit)
hw/arm/virt.c +1 -0
@@ -199,6 +199,7 @@ static const int a15irqmap[] = {static const char *valid_cpus[] = {ARM_CPU_TYPE_NAME ("cortex-a7" ),ARM_CPU_TYPE_NAME ("cortex-a15" ), +ARM_CPU_TYPE_NAME ("cortex-a35" ),ARM_CPU_TYPE_NAME ("cortex-a53" ),ARM_CPU_TYPE_NAME ("cortex-a57" ),ARM_CPU_TYPE_NAME ("cortex-a72" ),
target/arm/cpu64.c +69 -0
81 lines not on this page · raw message
Signature · 1 line
2.37.1.595.g718a3a8f04-goog
Quoted 12 lines · Hao Wu
Add cortex A35 core and enable it for virt board.
Signed-off-by Hao Wu <[email protected]>Reviewed-by Joe Komlodi <[email protected]>target/arm/cpu64.c +6
-0+static void aarch64_a35_initfn (Object *obj) +{ +ARMCPU *cpu =ARM_CPU (obj); + + cpu->dtb_compatible ="arm,cortex-a35" ; +set_feature (&cpu->env,ARM_FEATURE_V8 );
target/arm/cpu64.c line 54
Quoted 10 lines
target/arm/cpu64.c +10
-0+set_feature (&cpu->env,ARM_FEATURE_NEON ); +set_feature (&cpu->env,ARM_FEATURE_GENERIC_TIMER ); +set_feature (&cpu->env,ARM_FEATURE_AARCH64 ); +set_feature (&cpu->env,ARM_FEATURE_CBAR_RO ); +set_feature (&cpu->env,ARM_FEATURE_EL2 ); +set_feature (&cpu->env,ARM_FEATURE_EL3 ); +set_feature (&cpu->env,ARM_FEATURE_PMU ); + +/* From B2.2 AArch64 identification registers. */ + cpu->midr =0x410fd042 ;
The r1p0 TRM is out, so we might as well emulate that: 0x411FD040
A few fields are missing:
cpu->isar.dbgdidr
cpu->isar.dbgdevid
cpu->isar.dbgdevid1
cpu->isar.reset_pmcr_el0
cpu->gic_pribits
(these probably landed after you wrote these patch).
Otherwise looks OK.
Remind me, what did you want the Cortex-A35 in particular for ?
thanks
-- PMM
Hi,
This is used by a new series of Nuvoton SoC (NPCM8XX) which contains 4 Cortex A-35 cores.
I'll update the missing fields in a follow-up patch set.
Quoted 43 lines · Peter Maydell
Quoted 12 lines · Hao Wu
Add cortex A35 core and enable it for virt board.
Signed-off-by Hao Wu <[email protected]>Reviewed-by Joe Komlodi <[email protected]>target/arm/cpu64.c +6
-0+static void aarch64_a35_initfn (Object *obj) +{ +ARMCPU *cpu =ARM_CPU (obj); + + cpu->dtb_compatible ="arm,cortex-a35" ; +set_feature (&cpu->env,ARM_FEATURE_V8 );target/arm/cpu64.c line 54
Quoted 10 lines
target/arm/cpu64.c +10
-0+set_feature (&cpu->env,ARM_FEATURE_NEON ); +set_feature (&cpu->env,ARM_FEATURE_GENERIC_TIMER ); +set_feature (&cpu->env,ARM_FEATURE_AARCH64 ); +set_feature (&cpu->env,ARM_FEATURE_CBAR_RO ); +set_feature (&cpu->env,ARM_FEATURE_EL2 ); +set_feature (&cpu->env,ARM_FEATURE_EL3 ); +set_feature (&cpu->env,ARM_FEATURE_PMU ); + +/* From B2.2 AArch64 identification registers. */ + cpu->midr =0x410fd042 ;The r1p0 TRM is out, so we might as well emulate that:
0x411FD040A few fields are missing:
cpu->isar.dbgdidr
cpu->isar.dbgdevid
cpu->isar.dbgdevid1
cpu->isar.reset_pmcr_el0
cpu->gic_pribits(these probably landed after you wrote these patch).
Otherwise looks OK.
Remind me, what did you want the Cortex-A35 in particular for ?
thanks
-- PMM