diff options
Diffstat (limited to 'test-cli/test')
-rw-r--r-- | test-cli/test/helpers/get_dieid.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test-cli/test/helpers/get_dieid.py b/test-cli/test/helpers/get_dieid.py index 029ddb5..48e724e 100644 --- a/test-cli/test/helpers/get_dieid.py +++ b/test-cli/test/helpers/get_dieid.py @@ -1,8 +1,11 @@ import mmap import os import struct + MAP_MASK = mmap.PAGESIZE - 1 WORD = 4 + + def read(addr): """ Read from any location in memory Returns the readed value in hexadecimal format @@ -30,8 +33,8 @@ def getRegisters(model): return registers def genDieid(modelid): - registers=getRegisters(modelid) - id="" + registers = getRegisters(modelid) + id = "" for i in range(len(registers)): id=id+(read(registers[i])) return id |