The e500mc, e5500 and e6500 core manuals define MAS5 as SPR 339
(0x153), but the existing definition assigns it number 629 (0x275).
Correct the number and place the definition in its numeric group.

While we are here, adjust the order of SPR_HEIR so that it is
inserted in ascending order.

Reference: EREF_RM (Rev.1), section 4.2.2 and 4.12.10.6
https://www.nxp.com/webapp/Download?colCode=EREF_RM

Fixes: 80d11f4467c4 ("Add definitions for Freescale PowerPC implementations")
Cc: [email protected]
Signed-off-by: Bin Meng <[email protected]>
---

 target/ppc/cpu.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index 3fb51bbeb8..abcbcf3c18 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -1926,8 +1926,9 @@ void ppc_compat_add_property(Object *obj, const char 
*name,
 #define SPR_HMER              (0x150)
 #define SPR_HMEER             (0x151)
 #define SPR_PCR               (0x152)
-#define SPR_HEIR              (0x153)
 #define SPR_BOOKE_LPIDR       (0x152)
+#define SPR_HEIR              (0x153)
+#define SPR_BOOKE_MAS5        (0x153)
 #define SPR_BOOKE_TCR         (0x154)
 #define SPR_PPE42_TCR         (0x154)
 #define SPR_BOOKE_TLB0PS      (0x158)
@@ -2042,7 +2043,6 @@ void ppc_compat_add_property(Object *obj, const char 
*name,
 #define SPR_BOOKE_MAS2        (0x272)
 #define SPR_BOOKE_MAS3        (0x273)
 #define SPR_BOOKE_MAS4        (0x274)
-#define SPR_BOOKE_MAS5        (0x275)
 #define SPR_BOOKE_MAS6        (0x276)
 #define SPR_BOOKE_PID1        (0x279)
 #define SPR_BOOKE_PID2        (0x27A)
-- 
2.53.0


Reply via email to