Skip to content

Commit

Permalink
Fixed possible errors for Intel ME 15 and 16
Browse files Browse the repository at this point in the history
  • Loading branch information
XutaxKamay committed Aug 5, 2022
1 parent d6b313a commit a354a0d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions me_cleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,15 +665,16 @@ def start_end_to_flreg(start, end):
gen = 3
num_entries = unpack("<I", mef.read(4))[0]

mef.seek(ftpr_offset + 0x10)
data = mef.read(0x18)
mef.seek(ftpr_offset + 0x14)
data = mef.read(0x8)
mef.seek(ftpr_offset + 0x14)

## Intel ME version >= 15 seems to have 4 more bytes ##
intel_me_15 = bytes([0xDA, 0x3D, 0xC8, 0xE5])
intel_me_16 = bytes([0x0D, 0xA2, 0xFA, 0xED])

if intel_me_15 in data or intel_me_16 in data:
mef.seek(ftpr_offset + 0x14)
## I think the 4 bytes have to do something with Intel ME version or date, ##
## but not sure. ##
## Check for 'FTPR.man' ##
if bytes([0x46, 0x54, 0x50, 0x52, 0x2E, 0x6D, 0x61, 0x6E]) != data:
mef.seek(ftpr_offset + 0x10)

ftpr_mn2_offset = -1

Expand Down

0 comments on commit a354a0d

Please sign in to comment.