Skip to contentSkip to conversation

target-arm: use c13_context field for CONTEXTIDR

PATCH In review Sergey Fedorov 3 participants 3 messages Dec 20, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-arm: use c13_context field for CONTEXTIDR

Use c13_context field instead of c13_fcse for CONTEXTIDR register definition.

---
 target-arm/helper.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-arm/helper.c +1 -1
index 6ebd7dc..d52da0a 100644
@@ -397,7 +397,7 @@ static const ARMCPRegInfo cp_reginfo[] = {
       .access = PL1_RW, .fieldoffset = offsetof(CPUARMState, cp15.c13_fcse),
       .resetvalue = 0, .writefn = fcse_write, .raw_writefn = raw_write, },
     { .name = "CONTEXTIDR", .cp = 15, .crn = 13, .crm = 0, .opc1 = 0, .opc2 = 1,
-      .access = PL1_RW, .fieldoffset = offsetof(CPUARMState, cp15.c13_fcse),
+      .access = PL1_RW, .fieldoffset = offsetof(CPUARMState, cp15.c13_context),
       .resetvalue = 0, .writefn = contextidr_write, .raw_writefn = raw_write, },
     /* ??? This covers not just the impdef TLB lockdown registers but also
      * some v7VMSA registers relating to TEX remap, so it is overly broad.
Signature · 1 line
1.7.9.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Sergey Fedorov

Use c13_context field instead of c13_fcse for CONTEXTIDR register definition.

---
 target-arm/helper.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-arm/helper.c +0 -0
index 6ebd7dc..d52da0a 100644

target-arm/helper.c static const ARMCPRegInfo cp_reginfo[] = { · line 403

Quoted 8 lines
target-arm/helper.c +1 -1
@@ -397,7 +397,7 @@ static const ARMCPRegInfo cp_reginfo[] = {
       .access = PL1_RW, .fieldoffset = offsetof(CPUARMState, cp15.c13_fcse),
       .resetvalue = 0, .writefn = fcse_write, .raw_writefn = raw_write, },
     { .name = "CONTEXTIDR", .cp = 15, .crn = 13, .crm = 0, .opc1 = 0, .opc2 = 1,
-      .access = PL1_RW, .fieldoffset = offsetof(CPUARMState, cp15.c13_fcse),
+      .access = PL1_RW, .fieldoffset = offsetof(CPUARMState, cp15.c13_context),
       .resetvalue = 0, .writefn = contextidr_write, .raw_writefn = raw_write, },
     /* ??? This covers not just the impdef TLB lockdown registers but also
      * some v7VMSA registers relating to TEX remap, so it is overly broad.

Wow, I wonder how things worked with that broken. Obvious cut-n-paste damage from back when we converted the cp regs.

thanks
-- PMM

#2 lore raw
Quoted 10 lines · Peter Maydell
Quoted 9 lines · Sergey Fedorov

Use c13_context field instead of c13_fcse for CONTEXTIDR register definition.

---
 target-arm/helper.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 17 lines

target-arm/helper.c static const ARMCPRegInfo cp_reginfo[] = { · line 403

Quoted 13 lines
target-arm/helper.c +1 -1
index 6ebd7dc..d52da0a 100644
@@ -397,7 +397,7 @@ static const ARMCPRegInfo cp_reginfo[] = {
       .access = PL1_RW, .fieldoffset = offsetof(CPUARMState, cp15.c13_fcse),
       .resetvalue = 0, .writefn = fcse_write, .raw_writefn = raw_write, },
     { .name = "CONTEXTIDR", .cp = 15, .crn = 13, .crm = 0, .opc1 = 0, .opc2 = 1,
-      .access = PL1_RW, .fieldoffset = offsetof(CPUARMState, cp15.c13_fcse),
+      .access = PL1_RW, .fieldoffset = offsetof(CPUARMState, cp15.c13_context),
       .resetvalue = 0, .writefn = contextidr_write, .raw_writefn = raw_write, },
     /* ??? This covers not just the impdef TLB lockdown registers but also
      * some v7VMSA registers relating to TEX remap, so it is overly broad.

Wow, I wonder how things worked with that broken. Obvious cut-n-paste damage from back when we converted the cp regs.

Has a custom write handler which is correct AFAIK, so a write only guest will work :)

Regards,
Peter

Quoted 5 lines

thanks
-- PMM