Cortex-A15 support: target-arm patches
cover Cortex-A15 support: target-arm patches
Just a retransmit of the target-arm parts of the Cortex-A15 series, with the tiny change of
s/ARM_FEATURE_GENERICTIMER/ARM_FEATURE_GENERIC_TIMER/
and no other changes from the versions in v2 of the vexpress-a15 patchset.
Peter Maydell (2):
Add dummy implementation of generic timer cp15 registers Add Cortex-A15 CPU definition
target-arm/cpu.h | 2 + target-arm/helper.c | 68 +++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 63 insertions(+), 7 deletions(-)
PATCH 1/2 Add dummy implementation of generic timer cp15 registers
Add a dummy implementation of the cp15 registers for the generic timer (found in the Cortex-A15), just sufficient for Linux to decide that it can't use it. This requires at least CNTP_CTL and CNTFRQ to be implemented as RAZ/WI; we RAZ/WI all of c14.
--- target-arm/cpu.h | 1 + target-arm/helper.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-)
target-arm/cpu.h +1 -0
@@ -382,6 +382,7 @@ enum arm_features {ARM_FEATURE_VAPA ,/* cp15 VA to PA lookups */ ARM_FEATURE_ARM_DIV ,/* divide supported in ARM encoding */ ARM_FEATURE_VFP4 ,/* VFPv4 (implies that NEON is v2) */ + ARM_FEATURE_GENERIC_TIMER, };static inline int arm_feature (CPUARMState *env,int feature)
target-arm/helper.c +10 -2
@@ -1764,7 +1764,11 @@ void HELPER(set_cp15)(CPUState *env, uint32_t insn, uint32_t val) goto bad_reg; }break ; -case 14 :/* Reserved. */ +case 14 :/* Generic timer */ +if (arm_feature (env,ARM_FEATURE_GENERIC_TIMER )) { +/* Dummy implementation: RAZ/WI for all */ +break ; + } goto bad_reg;case 15 :/* Implementation specific. */ if (arm_feature (env,ARM_FEATURE_XSCALE )) {
@@ -2134,7 +2138,11 @@ uint32_t HELPER(get_cp15)(CPUState *env, uint32_t insn)default : goto bad_reg; } -case 14 :/* Reserved. */ +case 14 :/* Generic timer */ +if (arm_feature (env,ARM_FEATURE_GENERIC_TIMER )) { +/* Dummy implementation: RAZ/WI for all */ +return 0 ; + } goto bad_reg;case 15 :/* Implementation specific. */ if (arm_feature (env,ARM_FEATURE_XSCALE )) {
Signature · 1 line
1.7.1
Re: [Qemu-devel] [PATCH 1/2] Add dummy implementation of generic timer cp15 registers
Am 25.01.2012 14:32, schrieb Peter Maydell:
Quoted 6 lines
Add a dummy implementation of the cp15 registers for the generic timer (found in the Cortex-A15), just sufficient for Linux to decide that it can't use it. This requires at least
CNTP_CTLand CNTFRQ to be implemented as RAZ/WI; we RAZ/WI all of c14.Signed-off-by Peter Maydell <[email protected]>
Took me a bit to figure out RAZ/WI. ;)
Andreas
Quoted 47 lines
--- target-arm/cpu.h | 1 + target-arm/helper.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-)target-arm/cpu.h +1
-0@@ -382,6 +382,7 @@ enum arm_features {ARM_FEATURE_VAPA ,/* cp15 VA to PA lookups */ ARM_FEATURE_ARM_DIV ,/* divide supported in ARM encoding */ ARM_FEATURE_VFP4 ,/* VFPv4 (implies that NEON is v2) */ + ARM_FEATURE_GENERIC_TIMER, };static inline int arm_feature (CPUARMState *env,int feature)target-arm/helper.c +10
-2@@ -1764,7 +1764,11 @@ void HELPER(set_cp15)(CPUState *env, uint32_t insn, uint32_t val) goto bad_reg; }break ; -case 14 :/* Reserved. */ +case 14 :/* Generic timer */ +if (arm_feature (env,ARM_FEATURE_GENERIC_TIMER )) { +/* Dummy implementation: RAZ/WI for all */ +break ; + } goto bad_reg;case 15 :/* Implementation specific. */ if (arm_feature (env,ARM_FEATURE_XSCALE )) {@@ -2134,7 +2138,11 @@ uint32_t HELPER(get_cp15)(CPUState *env, uint32_t insn)default : goto bad_reg; } -case 14 :/* Reserved. */ +case 14 :/* Generic timer */ +if (arm_feature (env,ARM_FEATURE_GENERIC_TIMER )) { +/* Dummy implementation: RAZ/WI for all */ +return 0 ; + } goto bad_reg;case 15 :/* Implementation specific. */ if (arm_feature (env,ARM_FEATURE_XSCALE )) {
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Re: [Qemu-devel] [PATCH 1/2] Add dummy implementation of generic timer cp15 registers
Quoted 11 lines · Andreas Färber
Am 25.01.2012 14:32, schrieb Peter Maydell:
Quoted 6 lines
Add a dummy implementation of the cp15 registers for the generic timer (found in the Cortex-A15), just sufficient for Linux to decide that it can't use it. This requires at least
CNTP_CTLand CNTFRQ to be implemented as RAZ/WI; we RAZ/WI all of c14.Signed-off-by Peter Maydell <[email protected]>Reviewed-by Andreas Färber <[email protected]>Took me a bit to figure out RAZ/WI. ;)
Sorry, that's ARM ARM jargon :-)
(Read As Zero/Writes Ignored, for anybody still baffled.)
-- PMM
PATCH 2/2 Add Cortex-A15 CPU definition
In reply to Peter MaydellAdd a definition of a Cortex-A15 CPU. Note that for the moment we do not implement any of:
* Large Physical Address Extensions (LPAE)
* Virtualization Extensions
* Generic Timer
* TrustZone (this is also true of our existing Cortex-A9 model, etc)
This CPU model is sufficient to boot a Linux kernel which has been compiled for an A15 without LPAE enabled.
--- target-arm/cpu.h | 1 + target-arm/helper.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 52 insertions(+), 5 deletions(-)
target-arm/cpu.h +1 -0
@@ -433,6 +433,7 @@ void cpu_arm_set_cp_io(CPUARMState *env, int cpnum,#define ARM_CPUID_ARM11MPCORE 0x410fb022#define ARM_CPUID_CORTEXA8 0x410fc080#define ARM_CPUID_CORTEXA9 0x410fc090 +#define ARM_CPUID_CORTEXA15 0x412fc0f1#define ARM_CPUID_CORTEXM3 0x410fc231#define ARM_CPUID_ANY 0xffffffff
target-arm/helper.c +51 -5
94 lines not on this page · raw message
Signature · 1 line
1.7.1