Attention is currently required from: Reka Norman. Karthik Ramasubramanian has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/61639 )
Change subject: util/spd_tools/spd_gen/lp5: Update BusWidth Encoding ......................................................................
util/spd_tools/spd_gen/lp5: Update BusWidth Encoding
ADL and Sabrina have different advisory regarding encoding the bus width. Encode the bus width as per the respective advisories.
BUG=b:211510456 TEST=Build spd_gen and ensure that the bus width is encoded as expected.
Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com Change-Id: Ia12a5bd8f70a70ca8a510ecf00f6268c6904ec25 --- M util/spd_tools/src/spd_gen/lp5.go 1 file changed, 28 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/39/61639/1
diff --git a/util/spd_tools/src/spd_gen/lp5.go b/util/spd_tools/src/spd_gen/lp5.go index 22927b2..1db5b8d 100644 --- a/util/spd_tools/src/spd_gen/lp5.go +++ b/util/spd_tools/src/spd_gen/lp5.go @@ -57,6 +57,7 @@
type LP5Set struct { SPDRevision byte + busWidthEncoding byte }
/* ------------------------------------------------------------------------------------------ */ @@ -137,14 +138,6 @@ */ LP5SPDValueOptionalFeatures = 0x08
- /* - * For ADL (as per advisory #616599): - * 7:5 (Number of system channels) = 000 (1 channel always) - * 4:3 (Bus width extension) = 00 (no ECC) - * 2:0 (Bus width) = 001 (x16 always) - * Set to 0x01. - */ - LP5SPDValueBusWidth = 0x01
/* * From JEDEC spec: @@ -191,9 +184,25 @@ var LP5SetInfo = map[int]LP5Set{ 0: { SPDRevision: LP5SPDValueRevision1_0, + /* + * For ADL (as per advisory #616599): + * 7:5 (Number of system channels) = 000 (1 channel always) + * 4:3 (Bus width extension) = 00 (no ECC) + * 2:0 (Bus width) = 001 (x16 always) + * Set to 0x01. + */ + busWidthEncoding: 0x01, }, 1: { SPDRevision: LP5SPDValueRevision1_1, + /* + * For Sabrina (as per advisory b/211510456): + * 7:5 (Number of system channels) = 000 (1 channel always) + * 4:3 (Bus width extension) = 00 (no ECC) + * 2:0 (Bus width) = 010 (x32 always) + * Set to 0x02. + */ + busWidthEncoding: 0x02, }, }
@@ -306,7 +315,7 @@ LP5SPDIndexPackageType: {getVal: LP5EncodePackageType}, LP5SPDIndexOptionalFeatures: {constVal: LP5SPDValueOptionalFeatures}, LP5SPDIndexModuleOrganization: {getVal: LP5EncodeModuleOrganization}, - LP5SPDIndexBusWidth: {constVal: LP5SPDValueBusWidth}, + LP5SPDIndexBusWidth: {getVal: LP5EncodeBusWidth}, LP5SPDIndexTimebases: {constVal: LP5SPDValueTimebases}, LP5SPDIndexTCKMin: {getVal: LP5EncodeTCKMin}, LP5SPDIndexTCKMinFineOffset: {getVal: LP5EncodeTCKMinFineOffset}, @@ -409,6 +418,16 @@ return b }
+func LP5EncodeBusWidth(memAttribs *LP5MemAttributes) byte { + f, ok := LP5SetInfo[LP5CurrSet] + + if ok == false { + return 0 + } + + return f.busWidthEncoding +} + func LP5EncodeTCKMin(memAttribs *LP5MemAttributes) byte { return convPsToMtbByte(memAttribs.TCKMinPs) }