target/arm: Add Neoverse-N1 registers
PATCH v2 1/1 target/arm: Add Neoverse-N1 registers
Add implementation defined registers for neoverse-n1 which would be accessed by TF-A. Since there is no DSU in Qemu, CPUCFR_EL1.SCU bit is set to 1 to avoid DSU registers definition.
--- target/arm/cpu64.c | 2 ++ target/arm/cpu_tcg.c | 62 ++++++++++++++++++++++++++++++++++++++++++ target/arm/internals.h | 2 ++ 3 files changed, 66 insertions(+)
target/arm/cpu64.c +2 -0
@@ -1094,6 +1094,8 @@ static void aarch64_neoverse_n1_initfn(Object *obj)/* From D5.1 AArch64 PMU register summary */ cpu->isar.reset_pmcr_el0 =0x410c3000 ; + +define_neoverse_n1_cp_reginfo (cpu); }static void aarch64_host_initfn (Object *obj)
target/arm/cpu_tcg.c +62 -0
68 lines not on this page · raw message
target/arm/internals.h +2 -0
@@ -1356,8 +1356,10 @@ void arm_cpu_lpa2_finalize(ARMCPU *cpu, Error **errp);#ifdef CONFIG_USER_ONLY static inline void define_cortex_a72_a57_a53_cp_reginfo (ARMCPU *cpu) { } +static inline void define_neoverse_n1_cp_reginfo (ARMCPU *cpu) {}#else void define_cortex_a72_a57_a53_cp_reginfo (ARMCPU *cpu); +void define_neoverse_n1_cp_reginfo (ARMCPU *cpu);#endif bool el_is_in_host (CPUARMState *env,int el);
Signature · 1 line
2.37.3
Quoted 5 lines · Chen Baozi
Add implementation defined registers for neoverse-n1 which would be accessed by TF-A. Since there is no DSU in Qemu, CPUCFR_EL1.SCU bit is set to 1 to avoid DSU registers definition.
Quoted 7 lines
Signed-off-by Chen Baozi <[email protected]>Tested-by Marcin Juszkiewicz <[email protected]>--- target/arm/cpu64.c | 2 ++ target/arm/cpu_tcg.c | 62 ++++++++++++++++++++++++++++++++++++++++++ target/arm/internals.h | 2 ++ 3 files changed, 66 insertions(+)
We should add a comment here:
/*
* Report CPUCFR_EL1.SCU as 1, as we do not implement the DSU
* (and in particular its system registers).
*/
If that's the only issue with this version of the patch I'll fix it up when I add this into target-arm.next.
target/arm/cpu_tcg.c void define_cortex_a72_a57_a53_cp_reginfo(ARMCPU *cpu) · line 181
Quoted 3 lines
target/arm/cpu_tcg.c +3
-0+ { .name = "CPUCFR_EL1", .state = ARM_CP_STATE_AA64, + .opc0 = 3, .opc1 = 0, .crn = 15, .crm = 0, .opc2 = 0, + .access = PL1_R, .type = ARM_CP_CONST, .resetvalue = 4 },
thanks
-- PMM
Quoted 7 lines · Chen Baozi
Add implementation defined registers for neoverse-n1 which would be accessed by TF-A. Since there is no DSU in Qemu, CPUCFR_EL1.SCU bit is set to 1 to avoid DSU registers definition.
Signed-off-by Chen Baozi <[email protected]>Tested-by Marcin Juszkiewicz <[email protected]>
Did Marcin test this version of the patch ?
thanks
-- PMM
W dniu 6.03.2023 o 16:37, Peter Maydell pisze:
Quoted 10 lines · Chen Baozi
Quoted 7 lines
Add implementation defined registers for neoverse-n1 which would be accessed by TF-A. Since there is no DSU in Qemu, CPUCFR_EL1.SCU bit is set to 1 to avoid DSU registers definition.
Signed-off-by Chen Baozi <[email protected]>Tested-by Marcin Juszkiewicz <[email protected]>Did Marcin test this version of the patch ?
Hard to test it without updating TF-A first to not use DSU. Older TF-A starts and then hangs.
Waiting for Chen to provide patch to TF-A and will test.
Marcin Juszkiewicz
Tested-byW dniu 6.03.2023 o 18:13, Marcin Juszkiewicz pisze:
Quoted 8 lines
W dniu 6.03.2023 o 16:37, Peter Maydell pisze:
Quoted 1 line
On Mon, 6 Mar 2023 at 15:12, Chen Baozi <[email protected]>
Quoted 5 lines · wrote:
Quoted 5 lines
Add implementation defined registers for neoverse-n1 which would be accessed by TF-A. Since there is no DSU in Qemu, CPUCFR_EL1.SCU bit is set to 1 to avoid DSU registers definition.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Signed-off-by Chen Baozi <[email protected]>Tested-by Marcin Juszkiewicz <[email protected]>Did Marcin test this version of the patch ?
Hard to test it without updating TF-A first to not use DSU. Older TF-A starts and then hangs.
Waiting for Chen to provide patch to TF-A and will test.
Adding neoverse_n_common.S turned out to be enough:
~ # cat /proc/cpuinfo
processor : 0
BogoMIPS : 125.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x4
CPU part : 0xd0c
CPU revision : 1