Attention is currently required from: Paul Menzel, Arthur Heymans.
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/58934 )
Change subject: Documentation/coding_style.md: Avoid weakly linked symbols
......................................................................
Patch Set 2:
(1 comment)
File Documentation/contributing/coding_style.md:
https://review.coreboot.org/c/coreboot/+/58934/comment/7c1728a8_f396dc82
PS2, Line 971: conditional
Can you add some link to patches as references for "good implementation"?
I'm concerned people may start adding lots of #if , which may be even worse.
--
To view, visit https://review.coreboot.org/c/coreboot/+/58934
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If70d38c5c646c1e8365bb16d3292cebb2787eba2
Gerrit-Change-Number: 58934
Gerrit-PatchSet: 2
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-CC: Julius Werner <jwerner(a)chromium.org>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Comment-Date: Mon, 08 Nov 2021 02:46:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Tim Wawrzynczak, Nick Vaccaro, Karthik Ramasubramanian.
Hello Tim Wawrzynczak, Nick Vaccaro, Karthik Ramasubramanian,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/59005
to look at the new patch set (#3).
Change subject: util/spd_tools: Document adding support for a new memory technology
......................................................................
util/spd_tools: Document adding support for a new memory technology
Add documentation describing how to add support for a new memory
technology to spd_tools:
- Add a section to the README.
- Document the memTech interface in spd_gen.go.
BUG=b:191776301
TEST=None
Signed-off-by: Reka Norman <rekanorman(a)google.com>
Change-Id: Ie710c1c686ddf5288db35cf43e5f1ac9b1974305
---
M util/spd_tools/README.md
M util/spd_tools/src/spd_gen/spd_gen.go
2 files changed, 72 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/59005/3
--
To view, visit https://review.coreboot.org/c/coreboot/+/59005
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie710c1c686ddf5288db35cf43e5f1ac9b1974305
Gerrit-Change-Number: 59005
Gerrit-PatchSet: 3
Gerrit-Owner: Reka Norman <rekanorman(a)chromium.org>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)chromium.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Nick Vaccaro <nvaccaro(a)chromium.org>
Gerrit-Attention: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Tim Wawrzynczak, Nick Vaccaro, Karthik Ramasubramanian.
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59005 )
Change subject: util/spd_tools: Document adding support for a new memory technology
......................................................................
Patch Set 2:
(1 comment)
File util/spd_tools/src/spd_gen/spd_gen.go:
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-132545):
https://review.coreboot.org/c/coreboot/+/59005/comment/1896a62b_faefbf33
PS2, Line 48: * defualt values.
'defualt' may be misspelled - perhaps 'default'?
--
To view, visit https://review.coreboot.org/c/coreboot/+/59005
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie710c1c686ddf5288db35cf43e5f1ac9b1974305
Gerrit-Change-Number: 59005
Gerrit-PatchSet: 2
Gerrit-Owner: Reka Norman <rekanorman(a)chromium.org>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)chromium.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Nick Vaccaro <nvaccaro(a)chromium.org>
Gerrit-Attention: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Comment-Date: Mon, 08 Nov 2021 01:39:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Tim Wawrzynczak, Nick Vaccaro, Karthik Ramasubramanian.
Hello Tim Wawrzynczak, Nick Vaccaro, Karthik Ramasubramanian,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/59005
to look at the new patch set (#2).
Change subject: util/spd_tools: Document adding support for a new memory technology
......................................................................
util/spd_tools: Document adding support for a new memory technology
Add documentation describing how to add support for a new memory
technology to spd_tools:
- Add a section to the README.
- Document the memTech interface in spd_gen.go.
BUG=b:191776301
TEST=None
Signed-off-by: Reka Norman <rekanorman(a)google.com>
Change-Id: Ie710c1c686ddf5288db35cf43e5f1ac9b1974305
---
M util/spd_tools/README.md
M util/spd_tools/src/spd_gen/spd_gen.go
2 files changed, 72 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/59005/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/59005
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie710c1c686ddf5288db35cf43e5f1ac9b1974305
Gerrit-Change-Number: 59005
Gerrit-PatchSet: 2
Gerrit-Owner: Reka Norman <rekanorman(a)chromium.org>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)chromium.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Nick Vaccaro <nvaccaro(a)chromium.org>
Gerrit-Attention: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-MessageType: newpatchset
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59005 )
Change subject: util/spd_tools: Document adding support for a new memory technology
......................................................................
Patch Set 1:
(4 comments)
File util/spd_tools/README.md:
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-132544):
https://review.coreboot.org/c/coreboot/+/59005/comment/377e19ed_ef706101
PS1, Line 596: ### 1. Gather the SPD requirments
'requirments' may be misspelled - perhaps 'requirements'?
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-132544):
https://review.coreboot.org/c/coreboot/+/59005/comment/4ca155b0_231ee048
PS1, Line 605: * Platform-specifc requirments. SoC vendors often don't follow the JEDEC specs
'specifc' may be misspelled - perhaps 'specific'?
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-132544):
https://review.coreboot.org/c/coreboot/+/59005/comment/0b61f67d_48dfcfe4
PS1, Line 605: * Platform-specifc requirments. SoC vendors often don't follow the JEDEC specs
'requirments' may be misspelled - perhaps 'requirements'?
File util/spd_tools/src/spd_gen/spd_gen.go:
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-132544):
https://review.coreboot.org/c/coreboot/+/59005/comment/72e43fd1_8f69eab9
PS1, Line 48: * defualt values.
'defualt' may be misspelled - perhaps 'default'?
--
To view, visit https://review.coreboot.org/c/coreboot/+/59005
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie710c1c686ddf5288db35cf43e5f1ac9b1974305
Gerrit-Change-Number: 59005
Gerrit-PatchSet: 1
Gerrit-Owner: Reka Norman <rekanorman(a)chromium.org>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 08 Nov 2021 01:33:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Reka Norman has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59005 )
Change subject: util/spd_tools: Document adding support for a new memory technology
......................................................................
util/spd_tools: Document adding support for a new memory technology
Add documentation describing how to add support for a new memory
technology to spd_tools:
- Add a section to the README.
- Document the memTech interface in spd_gen.go.
BUG=b:191776301
TEST=None
Signed-off-by: Reka Norman <rekanorman(a)google.com>
Change-Id: Ie710c1c686ddf5288db35cf43e5f1ac9b1974305
---
M util/spd_tools/README.md
M util/spd_tools/src/spd_gen/spd_gen.go
2 files changed, 72 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/59005/1
diff --git a/util/spd_tools/README.md b/util/spd_tools/README.md
index a422017..ed108e1 100644
--- a/util/spd_tools/README.md
+++ b/util/spd_tools/README.md
@@ -590,3 +590,48 @@
`dram_id.generated.txt` with the new part.
* Upload the changes to `Makefile.inc` and `dram_id.generated.txt` for
review.
+
+## How to add support for a new memory technology
+
+### 1. Gather the SPD requirments
+
+To generate SPDs for the new memory technology, information is need about the
+list of bytes in the SPD and how the value of each byte should be determined.
+This information usually comes from a combination of:
+
+* The JEDEC spec for the memory technology, e.g. JESD209-5B for LPDDR5.
+* The JEDEC SPD spec for the memory technology, e.g. SPD4.1.2.M-2 for LPDDR3/4
+ (also used for LP4x and LP5).
+* Platform-specifc requirments. SoC vendors often don't follow the JEDEC specs
+ exactly. E.g. the memory training code may expect certain SPD bytes to
+ encode a different value to what is stated in the spec. So for each SoC
+ platform using the new memory technology, any platform-specific requirements
+ need to be gathered.
+
+### 2. Implement support in spd_tools
+
+Support for the new memory technology needs to be added to both the `spd_gen`
+and `part_id_gen` tools.
+
+#### `spd_gen`
+
+Adding support to `spd_gen` requires implementing the logic to generate SPDs for
+the new memory technology. The changes required are:
+
+* Add the new memory technology to the `memTechMap` in `spd_gen/spd_gen.go`.
+* Add a new file `spd_gen/<mem_tech>.go`. This file will contain all the logic
+ for generating SPDs for the new memory technology. It needs to implement the
+ `memTech` interface defined in `spd_gen/spd_gen.go`. The interface functions
+ are documented inline. Examples of how the interface is implemented for
+ existing memory technologies can be found in the `spd_gen/` directory, e.g.
+ `lp4x.go`, `ddr4.go`, `lp5.go`. While not strictly necessary, it is
+ recommended to follow the overall structure of these existing files when
+ adding a new memory technology.
+
+#### `part_id_gen`
+
+The `part_id_gen` tool is memory technology-agnostic, so the only change
+required is:
+
+* Add the new memory technology to the `supportedMemTechs` list in
+ `part_id_gen/part_id_gen.go`.
diff --git a/util/spd_tools/src/spd_gen/spd_gen.go b/util/spd_tools/src/spd_gen/spd_gen.go
index fa65492..c13fdf2 100644
--- a/util/spd_tools/src/spd_gen/spd_gen.go
+++ b/util/spd_tools/src/spd_gen/spd_gen.go
@@ -28,10 +28,37 @@
}
type memTech interface {
+ /*
+ * Returns the set -> platform mapping for the memory technology. Platforms with the
+ * same SPD requirements should be grouped together into a single set.
+ */
getSetMap() map[int][]int
+
+ /*
+ * Takes the name and attributes of a part, as read from the memory_parts JSON file.
+ * Validates the attributes, returning an error if any attribute has an invalid value.
+ * Stores the name and attributes internally to be used later.
+ */
addNewPart(string, interface{}) error
+
+ /*
+ * Takes the name of a part and a set number.
+ * Retrieves the part's attributes which were stored by addNewPart(). Updates them by
+ * setting any optional attributes which weren't specified in the JSON file to their
+ * defualt values.
+ * Returns these updated attributes.
+ */
getSPDAttribs(string, int) (interface{}, error)
+
+ /*
+ * Returns the number of SPD bytes for this memory technology.
+ */
getSPDLen() int
+
+ /*
+ * Takes an SPD byte index and the attributes of a part.
+ * Returns the value which that SPD byte should be set to based on the attributes.
+ */
getSPDByte(int, interface{}) byte
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/59005
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie710c1c686ddf5288db35cf43e5f1ac9b1974305
Gerrit-Change-Number: 59005
Gerrit-PatchSet: 1
Gerrit-Owner: Reka Norman <rekanorman(a)chromium.org>
Gerrit-MessageType: newchange
Attention is currently required from: Marx Wang, Tim Wawrzynczak.
Chen Wisley has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/58880 )
Change subject: mb/google/brya/var/redrix: Set RFI Spread Spectrum to 6%
......................................................................
Patch Set 4:
This change is ready for review.
--
To view, visit https://review.coreboot.org/c/coreboot/+/58880
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id0b42446e9e46ef629b5ca8d5d29faf2d771348d
Gerrit-Change-Number: 58880
Gerrit-PatchSet: 4
Gerrit-Owner: Chen Wisley <wisley.chen(a)quantatw.com>
Gerrit-Reviewer: Marx Wang <marx.wang(a)intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Wisley Chen <wisley.chen(a)quanta.corp-partner.google.com>
Gerrit-Attention: Marx Wang <marx.wang(a)intel.com>
Gerrit-Attention: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Comment-Date: Mon, 08 Nov 2021 01:28:02 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment