Rob Barnes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/43832 )
Change subject: util/apcb: Strip SPD manufacturer information ......................................................................
util/apcb: Strip SPD manufacturer information
Manufacturer information from SPDs before injecting into APCB. This allows more flexibilty around changing DRAM modules in the future.
BUG=b:162098961 TEST=Boot, dump memory info
Signed-off-by: Rob Barnes robbarnes@google.com Change-Id: I1bbc81a858f381f62dbd38bb57b3df0e6707d647 --- M src/soc/amd/picasso/Makefile.inc M util/apcb/apcb_edit.py 2 files changed, 13 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/32/43832/1
diff --git a/src/soc/amd/picasso/Makefile.inc b/src/soc/amd/picasso/Makefile.inc index b3af1fd..6db130e 100644 --- a/src/soc/amd/picasso/Makefile.inc +++ b/src/soc/amd/picasso/Makefile.inc @@ -395,6 +395,7 @@ $(APCB_MAGIC_BLOB) \ $@ \ --hex \ + --strip_manufacturer_information \ --spd_0_0 $< \ --board_id_gpio0 $(APCB_BOARD_ID_GPIO0) \ --board_id_gpio1 $(APCB_BOARD_ID_GPIO1) \ @@ -408,6 +409,7 @@ $(APCB_MAGIC_BLOB) \ $@ \ --hex \ + --strip_manufacturer_information \ --spd_0_0 $< \ --spd_1_0 $< \ --board_id_gpio0 $(APCB_BOARD_ID_GPIO0) \ diff --git a/util/apcb/apcb_edit.py b/util/apcb/apcb_edit.py index e5dd0cd..9d97cd8 100755 --- a/util/apcb/apcb_edit.py +++ b/util/apcb/apcb_edit.py @@ -59,6 +59,10 @@ 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 @@ assert len(spd) == 512, \ "Expected SPD to be 512 bytes, got %d" % len(spd)
+ if args.strip_manufacturer_information: + print("Stripping manufacturer infromation from SPD") + spd = spd[0:320] + b'\x00'*64 + spd[320+64:] + + assert len(spd) == 512, \ + "Error while stripping SPD manufacurer infromation" + print("Enabling channel %d, dimm %d and injecting SPD\n" % (spd_ssp.ChannelNumber, spd_ssp.DimmNumber)) spd_ssp = spd_ssp._replace(SpdValid=True, DimmPresent=True)
Hello Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43832
to look at the new patch set (#2).
Change subject: util/apcb: Strip SPD manufacturer information ......................................................................
util/apcb: Strip SPD manufacturer information
Strip manufacturer information from SPDs before injecting into APCB. This allows more flexibility around changing DRAM modules in the future.
BUG=b:162098961 TEST=Boot, dump memory info
Signed-off-by: Rob Barnes robbarnes@google.com Change-Id: I1bbc81a858f381f62dbd38bb57b3df0e6707d647 --- M src/soc/amd/picasso/Makefile.inc M util/apcb/apcb_edit.py 2 files changed, 13 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/32/43832/2
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43832 )
Change subject: util/apcb: Strip SPD manufacturer information ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/c/coreboot/+/43832/1/util/apcb/apcb_edit.py File util/apcb/apcb_edit.py:
https://review.coreboot.org/c/coreboot/+/43832/1/util/apcb/apcb_edit.py@163 PS1, Line 163: print("Stripping manufacturer infromation from SPD") 'infromation' may be misspelled - perhaps 'information'?
https://review.coreboot.org/c/coreboot/+/43832/1/util/apcb/apcb_edit.py@167 PS1, Line 167: "Error while stripping SPD manufacurer infromation" 'infromation' may be misspelled - perhaps 'information'?
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43832 )
Change subject: util/apcb: Strip SPD manufacturer information ......................................................................
Patch Set 2: Code-Review+2
Hello build bot (Jenkins), Furquan Shaikh, Patrick Georgi, Martin Roth, Angel Pons, Aaron Durbin,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43832
to look at the new patch set (#3).
Change subject: util/apcb: Strip SPD manufacturer information ......................................................................
util/apcb: Strip SPD manufacturer information
Strip manufacturer information from SPDs before injecting into APCB. This allows more flexibility around changing DRAM modules in the future.
BUG=b:162098961 TEST=Boot, dump memory info
Signed-off-by: Rob Barnes robbarnes@google.com Change-Id: I1bbc81a858f381f62dbd38bb57b3df0e6707d647 --- M src/soc/amd/picasso/Makefile.inc M util/apcb/apcb_edit.py 2 files changed, 13 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/32/43832/3
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43832 )
Change subject: util/apcb: Strip SPD manufacturer information ......................................................................
Patch Set 3: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/43832/3/src/soc/amd/picasso/Makefil... File src/soc/amd/picasso/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/43832/3/src/soc/amd/picasso/Makefil... PS3, Line 398: --strip_manufacturer_information This is okay for now, but probably we would want this to be a mainboard controlled option eventually?
Rob Barnes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43832 )
Change subject: util/apcb: Strip SPD manufacturer information ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43832/3/src/soc/amd/picasso/Makefil... File src/soc/amd/picasso/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/43832/3/src/soc/amd/picasso/Makefil... PS3, Line 398: --strip_manufacturer_information
This is okay for now, but probably we would want this to be a mainboard controlled option eventually […]
I have a short shell script that I can substitute for this and call from the mainboard makefile. But that's more temporary code to maintain. I assume this won't be needed after integration with the gen_spd tool? https://source.chromium.org/chromiumos/chromiumos/codesearch/+/master:src/th...
Hello build bot (Jenkins), Furquan Shaikh, Patrick Georgi, Martin Roth, Angel Pons, Aaron Durbin,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43832
to look at the new patch set (#4).
Change subject: util/apcb: Strip SPD manufacturer information ......................................................................
util/apcb: Strip SPD manufacturer information
Strip manufacturer information from SPDs before injecting into APCB. This allows more flexibility around changing DRAM modules in the future.
BUG=b:162098961 TEST=Boot, dump memory info
Signed-off-by: Rob Barnes robbarnes@google.com Change-Id: I1bbc81a858f381f62dbd38bb57b3df0e6707d647 --- M src/soc/amd/picasso/Makefile.inc M util/apcb/apcb_edit.py 2 files changed, 13 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/32/43832/4
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43832 )
Change subject: util/apcb: Strip SPD manufacturer information ......................................................................
Patch Set 4: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/43832/3/src/soc/amd/picasso/Makefil... File src/soc/amd/picasso/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/43832/3/src/soc/amd/picasso/Makefil... PS3, Line 398: --strip_manufacturer_information
I have a short shell script that I can substitute for this and call from the mainboard makefile. […]
Makes sense. Let's go ahead with this until we move to the gen_spd tool.
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/43832 )
Change subject: util/apcb: Strip SPD manufacturer information ......................................................................
util/apcb: Strip SPD manufacturer information
Strip manufacturer information from SPDs before injecting into APCB. This allows more flexibility around changing DRAM modules in the future.
BUG=b:162098961 TEST=Boot, dump memory info
Signed-off-by: Rob Barnes robbarnes@google.com Change-Id: I1bbc81a858f381f62dbd38bb57b3df0e6707d647 Reviewed-on: https://review.coreboot.org/c/coreboot/+/43832 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Furquan Shaikh furquan@google.com --- M src/soc/amd/picasso/Makefile.inc M util/apcb/apcb_edit.py 2 files changed, 13 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved
diff --git a/src/soc/amd/picasso/Makefile.inc b/src/soc/amd/picasso/Makefile.inc index aa9d8c9..4c1d726 100644 --- a/src/soc/amd/picasso/Makefile.inc +++ b/src/soc/amd/picasso/Makefile.inc @@ -395,6 +395,7 @@ $(APCB_MAGIC_BLOB) \ $@ \ --hex \ + --strip_manufacturer_information \ --spd_0_0 $< \ --board_id_gpio0 $(APCB_BOARD_ID_GPIO0) \ --board_id_gpio1 $(APCB_BOARD_ID_GPIO1) \ @@ -408,6 +409,7 @@ $(APCB_MAGIC_BLOB) \ $@ \ --hex \ + --strip_manufacturer_information \ --spd_0_0 $< \ --spd_1_0 $< \ --board_id_gpio0 $(APCB_BOARD_ID_GPIO0) \ diff --git a/util/apcb/apcb_edit.py b/util/apcb/apcb_edit.py index 54d59d6..388b18a 100755 --- a/util/apcb/apcb_edit.py +++ b/util/apcb/apcb_edit.py @@ -59,6 +59,10 @@ 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 @@ 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)