target/arm: Fix ID_MMFR4 value on AArch64 'max' CPU
PATCH 1/1 target/arm: Fix ID_MMFR4 value on AArch64 'max' CPU
In commit 41a4bf1feab098da4cd the added code to set the CNP field in ID_MMFR4 for the AArch64 'max' CPU had a typo where it used the wrong variable name, resulting in ID_MMFR4 fields AC2, XNX and LSM being wrong. Fix the typo.
---
maybe 5.0 just because it's so trivial. I dunno...
There's also an error where we use the uint32_t u variable to update the 64-bit ID_AA64DFR0 register, but that's harmless because as it happens the top 32 bits of that register are all zeroes anyway, so we can just fix that in 5.1.
target/arm/cpu64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target/arm/cpu64.c +1 -1
@@ -705,7 +705,7 @@ static void aarch64_max_initfn(Object *obj) u = cpu->isar.id_mmfr4; u =FIELD_DP32 (u,ID_MMFR4 ,HPDS ,1 );/* AA32HPD */ u =FIELD_DP32 (u,ID_MMFR4 ,AC2 ,1 );/* ACTLR2, HACTLR2 */ - u =FIELD_DP32 (t,ID_MMFR4 ,CNP ,1 );/* TTCNP */ + u =FIELD_DP32 (u,ID_MMFR4 ,CNP ,1 );/* TTCNP */ cpu->isar.id_mmfr4 = u; u = cpu->isar.id_aa64dfr0;
Signature · 1 line
2.20.1
Quoted 7 lines · Peter Maydell
In commit
41a4bf1feab098da4cdthe added code to set the CNP field inID_MMFR4for the AArch64 'max' CPU had a typo where it used the wrong variable name, resulting inID_MMFR4fields AC2, XNX and LSM being wrong. Fix the typo.Fixes 41a4bf1feab098da4cdReported-by Laurent Desnogues <[email protected]>
Quoted 29 lines
Signed-off-by Peter Maydell <[email protected]>---
maybe 5.0 just because it's so trivial. I dunno...There's also an error where we use the
uint32_tu variable to update the 64-bitID_AA64DFR0register, but that's harmless because as it happens the top 32 bits of that register are all zeroes anyway, so we can just fix that in 5.1.target/arm/cpu64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target/arm/cpu64.c +1
-1@@ -705,7 +705,7 @@ static void aarch64_max_initfn(Object *obj) u = cpu->isar.id_mmfr4; u =FIELD_DP32 (u,ID_MMFR4 ,HPDS ,1 );/* AA32HPD */ u =FIELD_DP32 (u,ID_MMFR4 ,AC2 ,1 );/* ACTLR2, HACTLR2 */ - u =FIELD_DP32 (t,ID_MMFR4 ,CNP ,1 );/* TTCNP */ + u =FIELD_DP32 (u,ID_MMFR4 ,CNP ,1 );/* TTCNP */ cpu->isar.id_mmfr4 = u; u = cpu->isar.id_aa64dfr0;Signature · 1 line
2.20.1
Quoted 9 lines · Peter Maydell
In commit
41a4bf1feab098da4cdthe added code to set the CNP field inID_MMFR4for the AArch64 'max' CPU had a typo where it used the wrong variable name, resulting inID_MMFR4fields AC2, XNX and LSM being wrong. Fix the typo.Fixes 41a4bf1feab098da4cdReported-by Laurent Desnogues <[email protected]>Signed-off-by Peter Maydell <[email protected]>
Thanks,
Laurent
Quoted 27 lines
---
maybe 5.0 just because it's so trivial. I dunno...There's also an error where we use the
uint32_tu variable to update the 64-bitID_AA64DFR0register, but that's harmless because as it happens the top 32 bits of that register are all zeroes anyway, so we can just fix that in 5.1.target/arm/cpu64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target/arm/cpu64.c +1
-2@@ -705,7 +705,7 @@ static void aarch64_max_initfn(Object *obj) u = cpu->isar.id_mmfr4; u =FIELD_DP32 (u,ID_MMFR4 ,HPDS ,1 );/* AA32HPD */ u =FIELD_DP32 (u,ID_MMFR4 ,AC2 ,1 );/* ACTLR2, HACTLR2 */ - u =FIELD_DP32 (t,ID_MMFR4 ,CNP ,1 );/* TTCNP */ + u =FIELD_DP32 (u,ID_MMFR4 ,CNP ,1 );/* TTCNP */ cpu->isar.id_mmfr4 = u; u = cpu->isar.id_aa64dfr0; --2.20.1
Quoted 7 lines · Peter Maydell
In commit
41a4bf1feab098da4cdthe added code to set the CNP field inID_MMFR4for the AArch64 'max' CPU had a typo where it used the wrong variable name, resulting inID_MMFR4fields AC2, XNX and LSM being wrong. Fix the typo.Fixes 41a4bf1feab098da4cdReported-by Laurent Desnogues <[email protected]>
Nice testing/catch Laurent!
Quoted 26 lines
Signed-off-by Peter Maydell <[email protected]>---
maybe 5.0 just because it's so trivial. I dunno...There's also an error where we use the
uint32_tu variable to update the 64-bitID_AA64DFR0register, but that's harmless because as it happens the top 32 bits of that register are all zeroes anyway, so we can just fix that in 5.1.target/arm/cpu64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target/arm/cpu64.c +1
-1@@ -705,7 +705,7 @@ static void aarch64_max_initfn(Object *obj) u = cpu->isar.id_mmfr4; u =FIELD_DP32 (u,ID_MMFR4 ,HPDS ,1 );/* AA32HPD */ u =FIELD_DP32 (u,ID_MMFR4 ,AC2 ,1 );/* ACTLR2, HACTLR2 */ - u =FIELD_DP32 (t,ID_MMFR4 ,CNP ,1 );/* TTCNP */ + u =FIELD_DP32 (u,ID_MMFR4 ,CNP ,1 );/* TTCNP */ cpu->isar.id_mmfr4 = u; u = cpu->isar.id_aa64dfr0;
Quoted 7 lines · Philippe Mathieu-Daudé
Quoted 5 lines · Peter Maydell
In commit
41a4bf1feab098da4cdthe added code to set the CNP field inID_MMFR4for the AArch64 'max' CPU had a typo where it used the wrong variable name, resulting inID_MMFR4fields AC2, XNX and LSM being wrong. Fix the typo.
Quoted 10 lines
Quoted 2 lines
Fixes 41a4bf1feab098da4cdReported-by Laurent Desnogues <[email protected]>Nice testing/catch Laurent!
Reviewed-by Philippe Mathieu-Daudé <[email protected]>Quoted 3 lines
Signed-off-by Peter Maydell <[email protected]>---
maybe 5.0 just because it's so trivial. I dunno...
BTW FWIW LGTM...
Quoted 23 lines
Quoted 23 lines
There's also an error where we use the
uint32_tu variable to update the 64-bitID_AA64DFR0register, but that's harmless because as it happens the top 32 bits of that register are all zeroes anyway, so we can just fix that in 5.1.target/arm/cpu64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target/arm/cpu64.c +1
-1@@ -705,7 +705,7 @@ static void aarch64_max_initfn(Object *obj) u = cpu->isar.id_mmfr4; u =FIELD_DP32 (u,ID_MMFR4 ,HPDS ,1 );/* AA32HPD */ u =FIELD_DP32 (u,ID_MMFR4 ,AC2 ,1 );/* ACTLR2, HACTLR2 */ - u =FIELD_DP32 (t,ID_MMFR4 ,CNP ,1 );/* TTCNP */ + u =FIELD_DP32 (u,ID_MMFR4 ,CNP ,1 );/* TTCNP */ cpu->isar.id_mmfr4 = u; u = cpu->isar.id_aa64dfr0;