Robert Zieba has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/62905 )
Change subject: util/spd_tools: Add support for exclusive IDs
......................................................................
util/spd_tools: Add support for exclusive IDs
Currently memory parts that use the same SPD are assigned the same ID by
spd_tools. This commit adds support for exclusive IDs. When given an
exclusive ID a memory part will not share its ID with other parts unless
they have also have the same exclusive ID.
BUG=b:225161910
TEST=Ran part_id_gen and checked that exclusive IDs work correctly and
that the current behavior still works in their abscence.
Signed-off-by: Robert Zieba <robertzieba(a)google.com>
Change-Id: Ife5afe32337f69bc06451ce16238c7a83bc983c8
---
M util/spd_tools/README.md
M util/spd_tools/src/part_id_gen/part_id_gen.go
2 files changed, 56 insertions(+), 15 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/62905/1
diff --git a/util/spd_tools/README.md b/util/spd_tools/README.md
index 3a1342c..01bc417 100644
--- a/util/spd_tools/README.md
+++ b/util/spd_tools/README.md
@@ -459,10 +459,14 @@
* The memory technology used by the board, e.g. lp4x.
* The path to the directory where the generated Makefile.inc should be placed.
* A CSV file containing a list of the memory parts used by the board, with an
- optional fixed ID for each part. NOTE: Only assign a fixed ID if required
- for legacy reasons.
+* optional fixed or exclusive ID for each part. A fixed ID is simply an integer
+* and it ensure that part (and any that share the same SPD) will be assigned
+* that ID. An exclusive ID is prefixed with `*` and ensures that only parts with
+* the same exclusive ID will be assigned that ID, even if they would otherwise
+* share the same ID.
+* NOTE: Only assign a fixed/exclusive ID if required for legacy reasons.
-Example of a CSV file using fixed IDs:
+Example of a CSV file using fixed and exclusive IDs:
```
K4AAG165WA-BCWE,1
@@ -470,13 +474,15 @@
MT40A1G16KD-062E:E
K4A8G165WC-BCWE
H5AN8G6NDJR-XNC,8
-H5ANAG6NCMR-XNC
+H5ANAG6NCMR-XNC,*9
```
Explanation: This will ensure that the SPDs for K4AAG165WA-BCWE and
-H5AN8G6NDJR-XNC are assigned to IDs 1 and 8 respectively. The SPDs for all other
-memory parts will be assigned to the first compatible ID. Assigning fixed IDs
-may result in duplicate SPD entries or gaps in the ID mapping.
+H5AN8G6NDJR-XNC are assigned to IDs 1 and 8 respectively. H5ANAG6NCMR-XNC
+will be assigned ID 9 and no other part will be assigned ID 9 even if it
+shares the same SPD. The SPDs for all other memory parts will be assigned to
+the first compatible ID. Assigning fixed/exclusive IDs may result in duplicate
+SPD entries or gaps in the ID mapping.
### Output
diff --git a/util/spd_tools/src/part_id_gen/part_id_gen.go b/util/spd_tools/src/part_id_gen/part_id_gen.go
index 750b825..73f71ac 100644
--- a/util/spd_tools/src/part_id_gen/part_id_gen.go
+++ b/util/spd_tools/src/part_id_gen/part_id_gen.go
@@ -93,9 +93,17 @@
return nil
}
+type mappingType int
+
+const (
+ Normal mappingType = iota
+ Exclusive
+)
+
type usedPart struct {
partName string
index int
+ mapping mappingType
}
func readPlatformsManifest(memTech string) (map[string]string, error) {
@@ -174,16 +182,27 @@
}
if len(fields) == 1 {
- parts = append(parts, usedPart{fields[0], -1})
+ parts = append(parts, usedPart{fields[0], -1, Normal})
} else if len(fields) == 2 {
- assignedId, err := strconv.Atoi(fields[1])
+ var mapping = Normal
+ var assignedId = -1
+ var err error = nil
+
+ if len(fields[1]) >= 2 && fields[1][0] == '*' {
+ // Exclusive mapping
+ mapping = Exclusive
+ assignedId, err = strconv.Atoi(fields[1][1:])
+ } else {
+ assignedId, err = strconv.Atoi(fields[1])
+ }
+
if err != nil {
return nil, err
}
if assignedId > MaxMemoryId || assignedId < 0 {
return nil, fmt.Errorf("Out of bounds assigned id %d for part %s", assignedId, fields[0])
}
- parts = append(parts, usedPart{fields[0], assignedId})
+ parts = append(parts, usedPart{fields[0], assignedId, mapping})
} else {
return nil, fmt.Errorf("mem_parts_used_file file is incorrectly formatted")
}
@@ -245,7 +264,7 @@
}
func getFileHeader() string {
- return `# SPDX-License-Identifier: GPL-2.0-or-later
+ return `# SPDX-License-Identifier: GPL-2.0-or-later
# This is an auto-generated file. Do not edit!!
# Generated by:
` + fmt.Sprintf("# %s\n\n", strings.Join(os.Args[0:], " "))
@@ -262,6 +281,7 @@
*/
func genPartIdInfo(parts []usedPart, partToSPDMap map[string]string, SPDToIndexMap map[string]int, makefileDirName string) ([]partIds, error) {
partIdList := []partIds{}
+ assignedMapping := map[int]mappingType{}
var s string
// Assign parts with fixed ids first
@@ -285,11 +305,26 @@
partIdList = append(partIdList, partIds{})
}
- if partIdList[p.index].SPDFileName != "" {
- return nil, fmt.Errorf("Part ", p.partName, " is assigned to an already assigned ID ", p.index)
+ // Only allow parts with the same index if they share the same SPD
+ assignedSPD := partIdList[p.index].SPDFileName
+ if assignedSPD != "" && assignedSPD != partToSPDMap[p.partName] {
+ return nil, fmt.Errorf("ID %d is already assigned to %s, conflicting with %s(%s)", p.index, assignedSPD, p.partName, SPDFileName)
}
- partIdList[p.index] = partIds{SPDFileName: SPDFileName, memParts: p.partName}
+ if mapping, present := assignedMapping[p.index]; present {
+ // Don't allow explicit and non-explict parts to use the same index
+ if mapping != p.mapping && (mapping == Exclusive || p.mapping == Exclusive) {
+ return nil, fmt.Errorf("Exclusive/non-exclusive conflict in assigning %s to ID %d", p.partName, p.index)
+ }
+ } else {
+ assignedMapping[p.index] = p.mapping
+ }
+
+ if partIdList[p.index].memParts == "" {
+ partIdList[p.index] = partIds{SPDFileName: SPDFileName, memParts: p.partName}
+ } else {
+ partIdList[p.index].memParts += ", " + p.partName
+ }
// SPDToIndexMap should point to first assigned index in the used part list
if SPDToIndexMap[SPDFileName] < 0 {
@@ -317,7 +352,7 @@
}
index := SPDToIndexMap[SPDFileName]
- if index != -1 {
+ if index != -1 && assignedMapping[index] != Exclusive {
partIdList[index].memParts += ", " + p.partName
appendPartIdInfo(&s, p.partName, index)
continue
--
To view, visit https://review.coreboot.org/c/coreboot/+/62905
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ife5afe32337f69bc06451ce16238c7a83bc983c8
Gerrit-Change-Number: 62905
Gerrit-PatchSet: 1
Gerrit-Owner: Robert Zieba <robertzieba(a)google.com>
Gerrit-MessageType: newchange
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/62206
to look at the new patch set (#6).
Change subject: Documentation/contributing/projects: Add easy project section
......................................................................
Documentation/contributing/projects: Add easy project section
Change-Id: Ibf91a879478e03b584756dc24fe33fb013803f9d
Signed-off-by: Felix Singer <felixsinger(a)posteo.net>
---
M Documentation/contributing/project_ideas.md
1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/62206/6
--
To view, visit https://review.coreboot.org/c/coreboot/+/62206
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ibf91a879478e03b584756dc24fe33fb013803f9d
Gerrit-Change-Number: 62206
Gerrit-PatchSet: 6
Gerrit-Owner: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: newpatchset
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/62206 )
Change subject: Documentation/contributing/projects: Add easy project section
......................................................................
Set Ready For Review
--
To view, visit https://review.coreboot.org/c/coreboot/+/62206
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ibf91a879478e03b584756dc24fe33fb013803f9d
Gerrit-Change-Number: 62206
Gerrit-PatchSet: 5
Gerrit-Owner: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Comment-Date: Thu, 17 Mar 2022 19:14:46 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Subrata Banik, Ravishankar Sarawadi, John Zhao, Tim Wawrzynczak, Angel Pons, Patrick Rudolph, EricR Lai.
Wonkyu Kim has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/62721 )
Change subject: soc/intel/common: Add IOE P2SB for TCSS
......................................................................
Patch Set 8: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/62721
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I01f551b6e1f50ebdc1cef2ceee815a492030db19
Gerrit-Change-Number: 62721
Gerrit-PatchSet: 8
Gerrit-Owner: John Zhao <john.zhao(a)intel.com>
Gerrit-Reviewer: Angel Pons <angel.pons(a)9elements.com>
Gerrit-Reviewer: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Gerrit-Reviewer: EricR Lai <ericr_lai(a)compal.corp-partner.google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Ravishankar Sarawadi <ravishankar.sarawadi(a)intel.com>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Wonkyu Kim <wonkyu.kim(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Subrata Banik <subratabanik(a)google.com>
Gerrit-Attention: Ravishankar Sarawadi <ravishankar.sarawadi(a)intel.com>
Gerrit-Attention: John Zhao <john.zhao(a)intel.com>
Gerrit-Attention: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Angel Pons <angel.pons(a)9elements.com>
Gerrit-Attention: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Attention: EricR Lai <ericr_lai(a)compal.corp-partner.google.com>
Gerrit-Comment-Date: Thu, 17 Mar 2022 18:54:19 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Wonkyu Kim, Subrata Banik, John Zhao, Angel Pons, Nick Vaccaro, Eric Lai, Patrick Rudolph.
Wonkyu Kim has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/62778 )
Change subject: soc/intel/common/block/p2sb: Add helper function to enable BAR
......................................................................
Patch Set 4: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/62778
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ica41e8e8bdfcfe855e730b3878b874070062ef93
Gerrit-Change-Number: 62778
Gerrit-PatchSet: 4
Gerrit-Owner: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: John Zhao <john.zhao(a)intel.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Wonkyu Kim
Gerrit-Reviewer: Wonkyu Kim <wonkyu.kim(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Wonkyu Kim
Gerrit-Attention: Subrata Banik <subratabanik(a)google.com>
Gerrit-Attention: John Zhao <john.zhao(a)intel.com>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Nick Vaccaro <nvaccaro(a)google.com>
Gerrit-Attention: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Gerrit-Attention: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Comment-Date: Thu, 17 Mar 2022 18:53:36 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Felix Singer has submitted this change. ( https://review.coreboot.org/c/coreboot/+/62194 )
Change subject: util/liveiso: Remove coreboot toolchain from todo
......................................................................
util/liveiso: Remove coreboot toolchain from todo
The coreboot toolchain is a huge blob and increases the size of the
build a lot. If needed, the specific toolchain can be added before
building the ISO or with `nix-shell` later in the live system, as shown
below.
$ nix-shell -p coreboot-toolchain.i386
Thus, remove this from the todo list.
Change-Id: Ia24ceb84f202828f1c97d3ba5bafbf6af0361bdb
Signed-off-by: Felix Singer <felixsinger(a)posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62194
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier(a)gmail.com>
Reviewed-by: Michael Niewöhner <foss(a)mniewoehner.de>
---
M util/liveiso/description.md
1 file changed, 0 insertions(+), 1 deletion(-)
Approvals:
build bot (Jenkins): Verified
Matt DeVillier: Looks good to me, approved
Michael Niewöhner: Looks good to me, but someone else must approve
diff --git a/util/liveiso/description.md b/util/liveiso/description.md
index b056a9f..48420e6f 100644
--- a/util/liveiso/description.md
+++ b/util/liveiso/description.md
@@ -6,5 +6,4 @@
## TODO
- Generate customized bootloader configs; FILO is WIP
-- Add coreboot toolchain
- Switch to `programs.neovim` when the module is fixed.
6 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit https://review.coreboot.org/c/coreboot/+/62194
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia24ceb84f202828f1c97d3ba5bafbf6af0361bdb
Gerrit-Change-Number: 62194
Gerrit-PatchSet: 8
Gerrit-Owner: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: merged
Attention is currently required from: Michael Niewöhner.
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/62194 )
Change subject: util/liveiso: Remove coreboot toolchain from todo
......................................................................
Patch Set 7:
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/62194/comment/007f6318_0936d48e
PS2, Line 10: If needed, the specific toolchain can be added before
: building the ISO or with `nix-shell` later in the live system.
:
> My answer and question stays the same. […]
Added it to get this patch in.
--
To view, visit https://review.coreboot.org/c/coreboot/+/62194
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia24ceb84f202828f1c97d3ba5bafbf6af0361bdb
Gerrit-Change-Number: 62194
Gerrit-PatchSet: 7
Gerrit-Owner: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-Comment-Date: Thu, 17 Mar 2022 18:39:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Felix Singer <felixsinger(a)posteo.net>
Comment-In-Reply-To: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer, Michael Niewöhner.
Hello build bot (Jenkins), Matt DeVillier, Michael Niewöhner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/62194
to look at the new patch set (#7).
Change subject: util/liveiso: Remove coreboot toolchain from todo
......................................................................
util/liveiso: Remove coreboot toolchain from todo
The coreboot toolchain is a huge blob and increases the size of the
build a lot. If needed, the specific toolchain can be added before
building the ISO or with `nix-shell` later in the live system, as shown
below.
$ nix-shell -p coreboot-toolchain.i386
Thus, remove this from the todo list.
Change-Id: Ia24ceb84f202828f1c97d3ba5bafbf6af0361bdb
Signed-off-by: Felix Singer <felixsinger(a)posteo.net>
---
M util/liveiso/description.md
1 file changed, 0 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/62194/7
--
To view, visit https://review.coreboot.org/c/coreboot/+/62194
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia24ceb84f202828f1c97d3ba5bafbf6af0361bdb
Gerrit-Change-Number: 62194
Gerrit-PatchSet: 7
Gerrit-Owner: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-MessageType: newpatchset