Skip to contentSkip to conversation

xlnx-zynqmp: Change the Cortex-R5 for Cortex-R5F

PATCH Superseded Edgar E. Iglesias 5 participants 10 messages May 3, 2018 – May 29, 2018 Arm/Zynq architecture

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover xlnx-zynqmp: Change the Cortex-R5 for Cortex-R5F

From: "Edgar E. Iglesias" <[email protected]>

The ZynqMP actually has Cortex-R5Fs with the optional FPU enabled.

Cheers,
Edgar

Edgar E. Iglesias (2):
target-arm: Add the Cortex-R5F
xlnx-zynqmp: Swap Cortex-R5 for Cortex-R5F

 hw/arm/xlnx-zynqmp.c | 2 +-
 target/arm/cpu.c     | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/2 target-arm: Add the Cortex-R5F

From: "Edgar E. Iglesias" <[email protected]>

Add the Cortex-R5F with the optional FPU enabled.

---
 target/arm/cpu.c | 9 +++++++++
 1 file changed, 9 insertions(+)
target/arm/cpu.c +9 -0
index d175c5e94f..7a7035c037 100644
@@ -1341,6 +1341,14 @@ static void cortex_r5_initfn(Object *obj)
     define_arm_cp_regs(cpu, cortexr5_cp_reginfo);
 }
 
+static void cortex_r5f_initfn(Object *obj)
+{
+    ARMCPU *cpu = ARM_CPU(obj);
+
+    cortex_r5_initfn(obj);
+    set_feature(&cpu->env, ARM_FEATURE_VFP3);
+}
+
 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 },
@@ -1801,6 +1809,7 @@ static const ARMCPUInfo arm_cpus[] = {
     { .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 },
Signature · 1 line
2.14.1
Reviewed-by on v1 1/2
#2 lore raw

Re: [Qemu-devel] [PATCH v1 1/2] target-arm: Add the Cortex-R5F

Quoted 4 lines · Edgar E. Iglesias

From: "Edgar E. Iglesias" <[email protected]>

Add the Cortex-R5F with the optional FPU enabled.

Seems ok to me.

Quoted 33 lines
---
  target/arm/cpu.c | 9 +++++++++
  1 file changed, 9 insertions(+)
target/arm/cpu.c +9 -0
index d175c5e94f..7a7035c037 100644
@@ -1341,6 +1341,14 @@ static void cortex_r5_initfn(Object *obj)
      define_arm_cp_regs(cpu, cortexr5_cp_reginfo);
  }
 
+static void cortex_r5f_initfn(Object *obj)
+{
+    ARMCPU *cpu = ARM_CPU(obj);
+
+    cortex_r5_initfn(obj);
+    set_feature(&cpu->env, ARM_FEATURE_VFP3);
+}
+
  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 },
@@ -1801,6 +1809,7 @@ static const ARMCPUInfo arm_cpus[] = {
      { .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 },
Reviewed-by on v1 1/2
#3 lore raw

Re: [Qemu-devel] [PATCH v1 1/2] target-arm: Add the Cortex-R5F

In reply to Edgar E. Iglesias
Quoted 5 lines · Edgar E. Iglesias

From: "Edgar E. Iglesias" <[email protected]>

Add the Cortex-R5F with the optional FPU enabled.

Alistair

Quoted 12 lines
---
  target/arm/cpu.c | 9 +++++++++
  1 file changed, 9 insertions(+)
target/arm/cpu.c +0 -0
index d175c5e94f..7a7035c037 100644
@@ -1341,6 +1341,14 @@ static void cortex_r5_initfn(Object *obj)
      define_arm_cp_regs(cpu, cortexr5_cp_reginfo);
  }
 

target/arm/cpu.c static void cortex_r5_initfn(Object *obj) · line 1353

Quoted 10 lines
target/arm/cpu.c +8 -0
+static void cortex_r5f_initfn(Object *obj)
+{
+    ARMCPU *cpu = ARM_CPU(obj);
+
+    cortex_r5_initfn(obj);
+    set_feature(&cpu->env, ARM_FEATURE_VFP3);
+}
+
  static const ARMCPRegInfo cortexa8_cp_reginfo[] = {
      { .name = "L2LOCKDOWN", .cp = 15, .crn = 9, .crm = 0, .opc1 = 1,

.opc2 = 0,

Quoted 11 lines
target/arm/cpu.c +1 -1
        .access = PL1_RW, .type = ARM_CP_CONST, .resetvalue = 0 },
@@ -1801,6 +1809,7 @@ static const ARMCPUInfo arm_cpus[] = {
      { .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 },
--

2.14.1

Reviewed-by Tested-by on v1 1/2
#4 lore raw

Re: [Qemu-devel] [Qemu-arm] [PATCH v1 1/2] target-arm: Add the Cortex-R5F

In reply to Edgar E. Iglesias
Quoted 5 lines · Edgar E. Iglesias

From: "Edgar E. Iglesias" <[email protected]>

Add the Cortex-R5F with the optional FPU enabled.

Quoted 32 lines
---
 target/arm/cpu.c | 9 +++++++++
 1 file changed, 9 insertions(+)
target/arm/cpu.c +9 -0
index d175c5e94f..7a7035c037 100644
@@ -1341,6 +1341,14 @@ static void cortex_r5_initfn(Object *obj)
     define_arm_cp_regs(cpu, cortexr5_cp_reginfo);
 }
 
+static void cortex_r5f_initfn(Object *obj)
+{
+    ARMCPU *cpu = ARM_CPU(obj);
+
+    cortex_r5_initfn(obj);
+    set_feature(&cpu->env, ARM_FEATURE_VFP3);
+}
+
 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 },
@@ -1801,6 +1809,7 @@ static const ARMCPUInfo arm_cpus[] = {
     { .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 },
#5 lore raw

PATCH 2/2 xlnx-zynqmp: Swap Cortex-R5 for Cortex-R5F

In reply to Edgar E. Iglesias

From: "Edgar E. Iglesias" <[email protected]>

The ZynqMP has Cortex-R5Fs with the optional FPU enabled.

---
 hw/arm/xlnx-zynqmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/xlnx-zynqmp.c +1 -1
index 505253e0d2..efeb53c732 100644
@@ -116,7 +116,7 @@ static void xlnx_zynqmp_create_rpu(XlnxZynqMPState *s, const char *boot_cpu,
         char *name;
 
         object_initialize(&s->rpu_cpu[i], sizeof(s->rpu_cpu[i]),
-                          "cortex-r5-" TYPE_ARM_CPU);
+                          "cortex-r5f-" TYPE_ARM_CPU);
         object_property_add_child(OBJECT(s), "rpu-cpu[*]",
                                   OBJECT(&s->rpu_cpu[i]), &error_abort);
 
Signature · 1 line
2.14.1
Reviewed-by on v1 2/2
#6 lore raw

Re: [Qemu-arm] [PATCH v1 2/2] xlnx-zynqmp: Swap Cortex-R5 for Cortex-R5F

Quoted 4 lines · Edgar E. Iglesias

From: "Edgar E. Iglesias" <[email protected]>

The ZynqMP has Cortex-R5Fs with the optional FPU enabled.

Seems ok to me according to the documentation.

Quoted 19 lines
---
  hw/arm/xlnx-zynqmp.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/xlnx-zynqmp.c +1 -1
index 505253e0d2..efeb53c732 100644
@@ -116,7 +116,7 @@ static void xlnx_zynqmp_create_rpu(XlnxZynqMPState *s, const char *boot_cpu,
          char *name;
 
          object_initialize(&s->rpu_cpu[i], sizeof(s->rpu_cpu[i]),
-                          "cortex-r5-" TYPE_ARM_CPU);
+                          "cortex-r5f-" TYPE_ARM_CPU);
          object_property_add_child(OBJECT(s), "rpu-cpu[*]",
                                    OBJECT(&s->rpu_cpu[i]), &error_abort);
 
Reviewed-by on v1 2/2
#7 lore raw

Re: [Qemu-devel] [PATCH v1 2/2] xlnx-zynqmp: Swap Cortex-R5 for Cortex-R5F

In reply to Edgar E. Iglesias
Quoted 5 lines · Edgar E. Iglesias

From: "Edgar E. Iglesias" <[email protected]>

The ZynqMP has Cortex-R5Fs with the optional FPU enabled.

Alistair

hw/arm/xlnx-zynqmp.c static void xlnx_zynqmp_create_rpu(XlnxZynqMPState

Quoted 9 lines
---
  hw/arm/xlnx-zynqmp.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/xlnx-zynqmp.c +0 -0
index 505253e0d2..efeb53c732 100644
@@ -116,7 +116,7 @@ static void xlnx_zynqmp_create_rpu(XlnxZynqMPState

*s, const char *boot_cpu,

Quoted 10 lines
hw/arm/xlnx-zynqmp.c +1 -2
          char *name;
 
          object_initialize(&s->rpu_cpu[i], sizeof(s->rpu_cpu[i]),
-                          "cortex-r5-" TYPE_ARM_CPU);
+                          "cortex-r5f-" TYPE_ARM_CPU);
          object_property_add_child(OBJECT(s), "rpu-cpu[*]",
                                    OBJECT(&s->rpu_cpu[i]), &error_abort);
 
--

2.14.1

Reviewed-by Tested-by on v1 2/2
#8 lore raw

Re: [Qemu-arm] [PATCH v1 2/2] xlnx-zynqmp: Swap Cortex-R5 for Cortex-R5F

In reply to Edgar E. Iglesias

Hi Edgar,

Quoted 3 lines · Edgar E. Iglesias

From: "Edgar E. Iglesias" <[email protected]>

The ZynqMP has Cortex-R5Fs with the optional FPU enabled.

What about updating the xlnx-zcu102 machine description too?

mc->desc = "Xilinx ZynqMP ZCU102 board with 4xA53s and 2xR5Fs ..."

Quoted 2 lines

I just noticed we can not get information for the R profile cores via the monitor:

(qemu) info cpus
* CPU #0: thread_id=19283
CPU #1: thread_id=19284
CPU #2: thread_id=19285
CPU #3: thread_id=19286

same with "info registers -a"

Quoted 18 lines
---
 hw/arm/xlnx-zynqmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/xlnx-zynqmp.c +1 -1
index 505253e0d2..efeb53c732 100644
@@ -116,7 +116,7 @@ static void xlnx_zynqmp_create_rpu(XlnxZynqMPState *s, const char *boot_cpu,
         char *name;
 
         object_initialize(&s->rpu_cpu[i], sizeof(s->rpu_cpu[i]),
-                          "cortex-r5-" TYPE_ARM_CPU);
+                          "cortex-r5f-" TYPE_ARM_CPU);
         object_property_add_child(OBJECT(s), "rpu-cpu[*]",
                                   OBJECT(&s->rpu_cpu[i]), &error_abort);
 
#9 lore raw

Re: [Qemu-arm] [PATCH v1 2/2] xlnx-zynqmp: Swap Cortex-R5 for Cortex-R5F

Quoted 10 lines · Philippe Mathieu-Daudé

Hi Edgar,

Quoted 3 lines · Edgar E. Iglesias

From: "Edgar E. Iglesias" <[email protected]>

The ZynqMP has Cortex-R5Fs with the optional FPU enabled.

What about updating the xlnx-zcu102 machine description too?

mc->desc = "Xilinx ZynqMP ZCU102 board with 4xA53s and 2xR5Fs ..."

Yes, I've added the 'F' in v2 (I've kept the Rb and Tb lines). Will send v2 in a moment.

Cheers,
Edgar

Quoted 36 lines
Quoted 3 lines

I just noticed we can not get information for the R profile cores via the monitor:

(qemu) info cpus
* CPU #0: thread_id=19283
CPU #1: thread_id=19284
CPU #2: thread_id=19285
CPU #3: thread_id=19286

same with "info registers -a"

Quoted 18 lines
---
 hw/arm/xlnx-zynqmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/xlnx-zynqmp.c +1 -1
index 505253e0d2..efeb53c732 100644
@@ -116,7 +116,7 @@ static void xlnx_zynqmp_create_rpu(XlnxZynqMPState *s, const char *boot_cpu,
         char *name;
 
         object_initialize(&s->rpu_cpu[i], sizeof(s->rpu_cpu[i]),
-                          "cortex-r5-" TYPE_ARM_CPU);
+                          "cortex-r5f-" TYPE_ARM_CPU);
         object_property_add_child(OBJECT(s), "rpu-cpu[*]",
                                   OBJECT(&s->rpu_cpu[i]), &error_abort);