whoops returning cr2 for cr3 regspec map
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 5 Jun 2020 12:40:19 +0000 (13:40 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 5 Jun 2020 12:40:19 +0000 (13:40 +0100)
src/soc/decoder/power_regspec_map.py

index 63435ae220d21ef7b3ccd89420908311cc535306..4b01a1ca504381bd0772b62a4a833900d898252b 100644 (file)
@@ -64,7 +64,7 @@ def regspec_decode(e, regfile, name):
         if name == 'cr_b': # CR B
             return e.read_cr2.ok, 1<<(7-e.read_cr2.data), None
         if name == 'cr_c': # CR C
-            return e.read_cr3.ok, 1<<(7-e.read_cr2.data), None
+            return e.read_cr3.ok, 1<<(7-e.read_cr3.data), None
 
     if regfile == 'XER':
         # XERRegs register numbering is *unary* encoded