2 # SPDX-License-Identifier: BSD-3-Clause
3 # Copyright(c) 2017 Cavium, Inc
6 fname = '/sys/devices/system/cpu/cpu0/regs/identification/midr_el1'
10 midr_el1 = (int(content.rstrip('\n'), 16))
12 ident.append(hex((midr_el1 >> 24) & 0xFF)) # Implementer
13 ident.append(hex((midr_el1 >> 20) & 0xF)) # Variant
14 ident.append(hex((midr_el1 >> 16) & 0XF)) # Architecture
15 ident.append(hex((midr_el1 >> 4) & 0xFFF)) # Primary Part number
16 ident.append(hex(midr_el1 & 0xF)) # Revision
18 print(' '.join(ident))