Curtis Dunham | 87b9da2 | 2015-09-02 15:23:30 -0500 | [diff] [blame] | 1 | # Add the ARM CONTEXTIDR_EL2 miscreg. |
2 | def 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 | miscRegs = cpt.get(sec, 'miscRegs').split() | ||||
9 | # CONTEXTIDR_EL2 defaults to 0b11111100000000000001 | ||||
10 | miscRegs[599:599] = [0xFC001] | ||||
11 | cpt.set(sec, 'miscRegs', ' '.join(str(x) for x in miscRegs)) | ||||
12 | |||||
13 | legacy_version = 14 |