Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/45145 )
Change subject: lib/Kconfig: Drop obsolete help text from GENERIC_SPD_BIN
......................................................................
lib/Kconfig: Drop obsolete help text from GENERIC_SPD_BIN
SMBus code is linked unconditionally since commit 0e3c59e. This change
drops that obsolete part from the help text.
Change-Id: I603ab012760684021be1b5eca5d0ddff69463b79
Signed-off-by: Michael Niewöhner <foss(a)mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45145
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
---
M src/lib/Kconfig
1 file changed, 1 insertion(+), 2 deletions(-)
Approvals:
build bot (Jenkins): Verified
Angel Pons: Looks good to me, approved
diff --git a/src/lib/Kconfig b/src/lib/Kconfig
index a6fb1f1..d91ec58 100644
--- a/src/lib/Kconfig
+++ b/src/lib/Kconfig
@@ -34,8 +34,7 @@
bool
help
If enabled, add support for adding spd.hex files in cbfs as spd.bin
- and locating it runtime to load SPD. Additionally provide provision to
- fetch SPD over SMBus.
+ and locating it runtime to load SPD.
config DIMM_MAX
int
--
To view, visit https://review.coreboot.org/c/coreboot/+/45145
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I603ab012760684021be1b5eca5d0ddff69463b79
Gerrit-Change-Number: 45145
Gerrit-PatchSet: 4
Gerrit-Owner: Michael Niewöhner
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/44878 )
Change subject: util/spd_tools: output binaries instead of hexdumps
......................................................................
util/spd_tools: output binaries instead of hexdumps
Instead of generating hexdumps, output binary SPD files since we plan to
convert all hex SPD files to binary. Also adjust the file extension
where needed.
Test: compared generated binaries with converted binaries from hex files
Change-Id: Ie99d108ca90758d09dbefad20fe6c9f7fc263ef1
Signed-off-by: Michael Niewöhner <foss(a)mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44878
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
---
M util/spd_tools/ddr4/README.md
M util/spd_tools/ddr4/gen_part_id.go
M util/spd_tools/ddr4/gen_spd.go
M util/spd_tools/lp4x/README.md
M util/spd_tools/lp4x/gen_spd.go
5 files changed, 39 insertions(+), 47 deletions(-)
Approvals:
build bot (Jenkins): Verified
Patrick Georgi: Looks good to me, approved
Angel Pons: Looks good to me, but someone else must approve
diff --git a/util/spd_tools/ddr4/README.md b/util/spd_tools/ddr4/README.md
index 7527544..c78b06f 100644
--- a/util/spd_tools/ddr4/README.md
+++ b/util/spd_tools/ddr4/README.md
@@ -171,7 +171,7 @@
This tool generates the following files using the global list of
memory parts in JSON format as described above:
* De-duplicated SPDs required for the different memory parts. These
- SPD files are named (ddr4-spd-1.hex, ddr4-spd-2.hex, and so on)
+ SPD files are named (ddr4-spd-1.bin, ddr4-spd-2.bin, and so on)
and placed in the directory provided as an input to the tool.
* CSV file representing which of the deduplicated SPD files is used
by which memory part. This file is named as
@@ -179,11 +179,11 @@
as an input to the tool along with the generated SPD
files. Example CSV file:
```
- MEMORY_PART_A, ddr4-spd-1.hex
- MEMORY_PART_B, ddr4-spd-2.hex
- MEMORY_PART_C, ddr4-spd-3.hex
- MEMORY_PART_D, ddr4-spd-2.hex
- MEMORY_PART_E, ddr4-spd-2.hex
+ MEMORY_PART_A, ddr4-spd-1.bin
+ MEMORY_PART_B, ddr4-spd-2.bin
+ MEMORY_PART_C, ddr4-spd-3.bin
+ MEMORY_PART_D, ddr4-spd-2.bin
+ MEMORY_PART_E, ddr4-spd-2.bin
```
## Tool 2 - gen_part_id.go
@@ -242,10 +242,10 @@
## This is an auto-generated file. Do not edit!!
SPD_SOURCES =
-SPD_SOURCES += ddr4-spd-1.hex # ID = 0(0b0000) Parts = MEMORY_PART_A
-SPD_SOURCES += ddr4-spd-2.hex # ID = 1(0b0001) Parts = MEMORY_PART_B, MEMORY_PART_D
-SPD_SOURCES += ddr4-spd-empty.hex # ID = 2(0b0010)
-SPD_SOURCES += ddr4-spd-3.hex # ID = 2(0b0010) Parts = MEMORY_PART_C
+SPD_SOURCES += ddr4-spd-1.bin # ID = 0(0b0000) Parts = MEMORY_PART_A
+SPD_SOURCES += ddr4-spd-2.bin # ID = 1(0b0001) Parts = MEMORY_PART_B, MEMORY_PART_D
+SPD_SOURCES += ddr4-spd-empty.bin # ID = 2(0b0010)
+SPD_SOURCES += ddr4-spd-3.bin # ID = 2(0b0010) Parts = MEMORY_PART_C
```
NOTE: Empty entries may be required if there is a gap created by a memory part
with a fixed id.
diff --git a/util/spd_tools/ddr4/gen_part_id.go b/util/spd_tools/ddr4/gen_part_id.go
index c0098ab..29b91fa 100644
--- a/util/spd_tools/ddr4/gen_part_id.go
+++ b/util/spd_tools/ddr4/gen_part_id.go
@@ -265,7 +265,7 @@
for i := 0; i < len(partIdList); i++ {
if partIdList[i].SPDFileName == "" {
- s += fmt.Sprintf("SPD_SOURCES += %s ", "ddr4-spd-empty.hex")
+ s += fmt.Sprintf("SPD_SOURCES += %s ", "ddr4-spd-empty.bin")
s += fmt.Sprintf(" # ID = %d(0b%04b)\n", i, int64(i))
} else {
s += fmt.Sprintf("SPD_SOURCES += %s ", partIdList[i].SPDFileName)
diff --git a/util/spd_tools/ddr4/gen_spd.go b/util/spd_tools/ddr4/gen_spd.go
index 3c8f71a..b60ab03 100644
--- a/util/spd_tools/ddr4/gen_spd.go
+++ b/util/spd_tools/ddr4/gen_spd.go
@@ -3,6 +3,7 @@
package main
import (
+ "bytes"
"encoding/json"
"fmt"
"io/ioutil"
@@ -968,8 +969,8 @@
return e.constVal
}
-func createSPD(memAttribs *memAttributes) string {
- var s string
+func createSPD(memAttribs *memAttributes) bytes.Buffer {
+ var spd bytes.Buffer
for i := 0; i < 512; i++ {
var b byte = 0
@@ -977,14 +978,10 @@
b = getSPDByte(i, memAttribs)
}
- if (i + 1) % 16 == 0 {
- s += fmt.Sprintf("%02X\n", b)
- } else {
- s += fmt.Sprintf("%02X ", b)
- }
+ spd.WriteByte(b)
}
- return s
+ return spd
}
func dedupeMemoryPart(dedupedParts []*memPart, memPart *memPart) bool {
@@ -999,16 +996,16 @@
}
func generateSPD(memPart *memPart, SPDId int, SPDDirName string) {
- s := createSPD(&memPart.Attribs)
- memPart.SPDFileName = fmt.Sprintf("ddr4-spd-%d.hex", SPDId)
- ioutil.WriteFile(filepath.Join(SPDDirName, memPart.SPDFileName), []byte(s), 0644)
+ spd := createSPD(&memPart.Attribs)
+ memPart.SPDFileName = fmt.Sprintf("ddr4-spd-%d.bin", SPDId)
+ ioutil.WriteFile(filepath.Join(SPDDirName, memPart.SPDFileName), spd.Bytes(), 0644)
}
func generateEmptySPD(SPDDirName string) {
- s := createSPD(nil)
- SPDFileName := "ddr4-spd-empty.hex"
- ioutil.WriteFile(filepath.Join(SPDDirName, SPDFileName), []byte(s), 0644)
+ spd := createSPD(nil)
+ SPDFileName := "ddr4-spd-empty.bin"
+ ioutil.WriteFile(filepath.Join(SPDDirName, SPDFileName), spd.Bytes(), 0644)
}
func readMemoryParts(memParts *memParts, memPartsFileName string) error {
diff --git a/util/spd_tools/lp4x/README.md b/util/spd_tools/lp4x/README.md
index e614f25..0c49dad 100644
--- a/util/spd_tools/lp4x/README.md
+++ b/util/spd_tools/lp4x/README.md
@@ -168,7 +168,7 @@
This tool generates the following files using the global list of
memory parts in JSON format as described above:
* De-duplicated SPDs required for the different memory parts. These
- SPD files are named (spd_1.hex, spd_2.hex, spd_3.hex and so on)
+ SPD files are named (spd_1.bin, spd_2.bin, spd_3.bin and so on)
and placed in the directory provided as an input to the tool.
* CSV file representing which of the deduplicated SPD files is used
by which memory part. This file is named as
@@ -176,11 +176,11 @@
as an input to the tool along with the generated SPD
files. Example CSV file:
```
- MEMORY_PART_A, spd_1.hex
- MEMORY_PART_B, spd_2.hex
- MEMORY_PART_C, spd_3.hex
- MEMORY_PART_D, spd_2.hex
- MEMORY_PART_E, spd_2.hex
+ MEMORY_PART_A, spd_1.bin
+ MEMORY_PART_B, spd_2.bin
+ MEMORY_PART_C, spd_3.bin
+ MEMORY_PART_D, spd_2.bin
+ MEMORY_PART_E, spd_2.bin
```
## Tool 2 - gen_part_id.go
@@ -222,9 +222,9 @@
## This is an auto-generated file. Do not edit!!
SPD_SOURCES =
-SPD_SOURCES += spd_1.hex # ID = 0(0b0000) Parts = MEMORY_PART_A
-SPD_SOURCES += spd_2.hex # ID = 1(0b0001) Parts = MEMORY_PART_B, MEMORY_PART_D
-SPD_SOURCES += spd_3.hex # ID = 2(0b0010) Parts = MEMORY_PART_C
+SPD_SOURCES += spd_1.bin # ID = 0(0b0000) Parts = MEMORY_PART_A
+SPD_SOURCES += spd_2.bin # ID = 1(0b0001) Parts = MEMORY_PART_B, MEMORY_PART_D
+SPD_SOURCES += spd_3.bin # ID = 2(0b0010) Parts = MEMORY_PART_C
```
### Note of caution
diff --git a/util/spd_tools/lp4x/gen_spd.go b/util/spd_tools/lp4x/gen_spd.go
index e63ca8d..1738833 100644
--- a/util/spd_tools/lp4x/gen_spd.go
+++ b/util/spd_tools/lp4x/gen_spd.go
@@ -3,6 +3,7 @@
package main
import (
+ "bytes"
"encoding/json"
"fmt"
"io/ioutil"
@@ -637,20 +638,14 @@
return e.constVal
}
-func createSPD(memAttribs *memAttributes) string {
- var s string
+func createSPD(memAttribs *memAttributes) bytes.Buffer {
+ var spd bytes.Buffer
for i := 0; i < 512; i++ {
- b := getSPDByte(i, memAttribs)
-
- if (i + 1) % 16 == 0 {
- s += fmt.Sprintf("%02X\n", b)
- } else {
- s += fmt.Sprintf("%02X ", b)
- }
+ spd.WriteByte(getSPDByte(i, memAttribs))
}
- return s
+ return spd
}
func dedupeMemoryPart(dedupedParts []*memPart, memPart *memPart) bool {
@@ -665,9 +660,9 @@
}
func generateSPD(memPart *memPart, SPDId int, SPDDirName string) {
- s := createSPD(&memPart.Attribs)
- memPart.SPDFileName = fmt.Sprintf("lp4x-spd-%d.hex", SPDId)
- ioutil.WriteFile(filepath.Join(SPDDirName, memPart.SPDFileName), []byte(s), 0644)
+ spd := createSPD(&memPart.Attribs)
+ memPart.SPDFileName = fmt.Sprintf("lp4x-spd-%d.bin", SPDId)
+ ioutil.WriteFile(filepath.Join(SPDDirName, memPart.SPDFileName), spd.Bytes(), 0644)
}
func readMemoryParts(memParts *memParts, memPartsFileName string) error {
--
To view, visit https://review.coreboot.org/c/coreboot/+/44878
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie99d108ca90758d09dbefad20fe6c9f7fc263ef1
Gerrit-Change-Number: 44878
Gerrit-PatchSet: 6
Gerrit-Owner: Michael Niewöhner
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: merged
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44878 )
Change subject: util/spd_tools: output binaries instead of hexdumps
......................................................................
Patch Set 5: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/44878
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie99d108ca90758d09dbefad20fe6c9f7fc263ef1
Gerrit-Change-Number: 44878
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Niewöhner
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Tue, 08 Sep 2020 05:46:32 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/44778 )
Change subject: util/apcb_edit: fix handling of binary SPD files
......................................................................
util/apcb_edit: fix handling of binary SPD files
Passing binary SPD files to apcb_edit can lead to an encoding error,
since the files were read in text mode. To fix this, read SPD files
always in binary mode and only decode them, when `--hex` is set.
Tested by comparing output files from the same SPDs in both, binary and
hex mode.
Change-Id: I6b75a9e1234e71667bdc8cb4eb10daf8c0ac3c17
Signed-off-by: Michael Niewöhner <foss(a)mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44778
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
Reviewed-by: Rob Barnes <robbarnes(a)google.com>
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
---
M util/apcb/apcb_edit.py
1 file changed, 5 insertions(+), 6 deletions(-)
Approvals:
build bot (Jenkins): Verified
Patrick Georgi: Looks good to me, approved
Nico Huber: Looks good to me, but someone else must approve
Angel Pons: Looks good to me, but someone else must approve
Rob Barnes: Looks good to me, but someone else must approve
diff --git a/util/apcb/apcb_edit.py b/util/apcb/apcb_edit.py
index 388b18a..599ef35 100755
--- a/util/apcb/apcb_edit.py
+++ b/util/apcb/apcb_edit.py
@@ -40,19 +40,19 @@
help='APCB output file')
parser.add_argument(
'--spd_0_0',
- type=argparse.FileType('r'),
+ type=argparse.FileType('rb'),
help='SPD input file for channel 0, dimm 0')
parser.add_argument(
'--spd_0_1',
- type=argparse.FileType('r'),
+ type=argparse.FileType('rb'),
help='SPD input file for channel 0, dimm 1')
parser.add_argument(
'--spd_1_0',
- type=argparse.FileType('r'),
+ type=argparse.FileType('rb'),
help='SPD input file for channel 1, dimm 0')
parser.add_argument(
'--spd_1_1',
- type=argparse.FileType('r'),
+ type=argparse.FileType('rb'),
help='SPD input file for channel 1, dimm 1')
parser.add_argument(
'--hex',
@@ -150,11 +150,10 @@
if spd:
if args.hex:
+ spd = spd.decode()
spd = re.sub(r'#.*', '', spd)
spd = re.sub(r'\s+', '', spd)
spd = bytes.fromhex(spd)
- else:
- spd = spd.encode()
assert len(spd) == 512, \
"Expected SPD to be 512 bytes, got %d" % len(spd)
--
To view, visit https://review.coreboot.org/c/coreboot/+/44778
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I6b75a9e1234e71667bdc8cb4eb10daf8c0ac3c17
Gerrit-Change-Number: 44778
Gerrit-PatchSet: 11
Gerrit-Owner: Michael Niewöhner
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Rob Barnes <robbarnes(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: merged
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44778 )
Change subject: util/apcb_edit: fix handling of binary SPD files
......................................................................
Patch Set 10: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/44778
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I6b75a9e1234e71667bdc8cb4eb10daf8c0ac3c17
Gerrit-Change-Number: 44778
Gerrit-PatchSet: 10
Gerrit-Owner: Michael Niewöhner
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Rob Barnes <robbarnes(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Tue, 08 Sep 2020 05:44:24 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Jeremy Soller has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/43631 )
Change subject: mb/system76/lemp9: update HDA pin config
......................................................................
mb/system76/lemp9: update HDA pin config
To minimize the quirks the kernel has to apply, the headset mic is set
to its correct value in coreboot.
Tested on lemp9, audio is functional
Signed-off-by: Jeremy Soller <jeremy(a)system76.com>
Change-Id: I6b59de95f01360a5f7779f87f39edeb75dedc215
---
M src/mainboard/system76/lemp9/hda_verb.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/43631/1
diff --git a/src/mainboard/system76/lemp9/hda_verb.c b/src/mainboard/system76/lemp9/hda_verb.c
index 3f77dc2..7bb0736 100644
--- a/src/mainboard/system76/lemp9/hda_verb.c
+++ b/src/mainboard/system76/lemp9/hda_verb.c
@@ -15,7 +15,7 @@
AZALIA_PIN_CFG(0, 0x16, 0x411111f0),
AZALIA_PIN_CFG(0, 0x18, 0x411111f0),
AZALIA_PIN_CFG(0, 0x19, 0x411111f0),
- AZALIA_PIN_CFG(0, 0x1a, 0x411111f0),
+ AZALIA_PIN_CFG(0, 0x1a, 0x01a1913c),
AZALIA_PIN_CFG(0, 0x1b, 0x411111f0),
AZALIA_PIN_CFG(0, 0x1d, 0x41748245),
AZALIA_PIN_CFG(0, 0x1e, 0x411111f0),
--
To view, visit https://review.coreboot.org/c/coreboot/+/43631
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I6b59de95f01360a5f7779f87f39edeb75dedc215
Gerrit-Change-Number: 43631
Gerrit-PatchSet: 1
Gerrit-Owner: Jeremy Soller <jeremy(a)system76.com>
Gerrit-MessageType: newchange