summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rwxr-xr-xutil/apcb/apcb_edit.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/util/apcb/apcb_edit.py b/util/apcb/apcb_edit.py
index 54d59d6fcc..388b18ad73 100755
--- a/util/apcb/apcb_edit.py
+++ b/util/apcb/apcb_edit.py
@@ -59,6 +59,10 @@ def parseargs():
action='store_true',
help='SPD input file is hex encoded, binary otherwise')
parser.add_argument(
+ '--strip_manufacturer_information',
+ action='store_true',
+ help='Strip all manufacturer information from SPD')
+ parser.add_argument(
'--board_id_gpio0',
type=int,
required=True,
@@ -155,6 +159,13 @@ def main():
assert len(spd) == 512, \
"Expected SPD to be 512 bytes, got %d" % len(spd)
+ if args.strip_manufacturer_information:
+ print("Stripping manufacturer information from SPD")
+ spd = spd[0:320] + b'\x00'*64 + spd[320+64:]
+
+ assert len(spd) == 512, \
+ "Error while stripping SPD manufacurer information"
+
print("Enabling channel %d, dimm %d and injecting SPD" %
(spd_ssp.ChannelNumber, spd_ssp.DimmNumber))
spd_ssp = spd_ssp._replace(SpdValid=True, DimmPresent=True)