arm-miscreg-teehbr.py revision 11077:fae097742b7e
1# Add the ARM MISCREG TEEHBR 2def upgrader(cpt): 3 if cpt.get('root','isa') == 'arm': 4 for sec in cpt.sections(): 5 import re 6 # Search for all ISA sections 7 if re.search('.*sys.*\.cpu.*\.isa$', sec): 8 mr = cpt.get(sec, 'miscRegs').split() 9 if len(mr) == 161: 10 print "MISCREG_TEEHBR already seems to be inserted." 11 else: 12 mr.insert(51,0); # Add dummy value for MISCREG_TEEHBR 13 cpt.set(sec, 'miscRegs', ' '.join(str(x) for x in mr)) 14 15legacy_version = 8 16