Attention is currently required from: Maxim.
David Hendricks has posted comments on this change by Maxim. ( https://review.coreboot.org/c/coreboot/+/71167?usp=email )
Change subject: util/intelp2m: Rework platform packages
......................................................................
Patch Set 12:
(1 comment)
Patchset:
PS12:
Hi @max.senia.poliak@gmail.com, would you like to rebase this patch chain? We'll try to get this all merged during our new fortnightly patch review meetings.
--
To view, visit https://review.coreboot.org/c/coreboot/+/71167?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I2e0aa56efa2430ac6524c6977f8b6fd13113edf9
Gerrit-Change-Number: 71167
Gerrit-PatchSet: 12
Gerrit-Owner: Maxim <max.senia.poliak(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Attention: Maxim <max.senia.poliak(a)gmail.com>
Gerrit-Comment-Date: Wed, 04 Dec 2024 18:22:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
David Hendricks has submitted this change. ( https://review.coreboot.org/c/coreboot/+/67321?usp=email )
Change subject: util/intelp2m: Print the current project version
......................................................................
util/intelp2m: Print the current project version
Print the current project version in the console and in the generated
file with the pad configuration. This makes support easier, since we
know which version of the utility was used and whether we need to
re-generate the configuration file if an error was made in the latest
changes in the code. The version string includes several parts:
{major}.{minor}-{last commit in the intelp2m directory}-{?dirty}
The major is incremented if a new platform is added, minor - if changes
in functionality are made. Add dirty if the changes were not taken into
account using git.
Use the following command to print the version:
make version
Change-Id: Id2fd0757c003004af976309a44dbbfff0eb517a7
Signed-off-by: Maxim Polyakov <max.senia.poliak(a)gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67321
Reviewed-by: David Hendricks <david.hendricks(a)gmail.com>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M util/intelp2m/Makefile
M util/intelp2m/main.go
A util/intelp2m/scripts/linux/version.sh
A util/intelp2m/version.txt
4 files changed, 54 insertions(+), 20 deletions(-)
Approvals:
David Hendricks: Looks good to me, approved
build bot (Jenkins): Verified
diff --git a/util/intelp2m/Makefile b/util/intelp2m/Makefile
index ea44db4..5f6bc29 100644
--- a/util/intelp2m/Makefile
+++ b/util/intelp2m/Makefile
@@ -1,15 +1,23 @@
## SPDX-License-Identifier: GPL-2.0-only
-# simple makefile for the project
-OUTPUT_DIR = generate
-PROJECT_NAME = intelp2m
+PROJECT_NAME := intelp2m
+THIS_FILE := $(lastword $(MAKEFILE_LIST))
+THIS_DIR := $(abspath $(dir $(THIS_FILE)))
+SCRIPTS_DIR := $(THIS_DIR)/scripts/linux
-default:
+OUTPUT_DIR := $(THIS_DIR)/generate
+VERSION ?= $(shell $(SCRIPTS_DIR)/version.sh)
+LDFLAGS = "-X main.Version=$(VERSION)"
+
+default: version
go version
- go build -v -o $(PROJECT_NAME)
+ go build -ldflags=$(LDFLAGS) -v
test:
go test ./... -v -count=1
clean:
- rm -Rf $(PROJECT_NAME) $(OUTPUT_DIR)
+ rm -Rf $(THIS_DIR)/$(PROJECT_NAME) $(OUTPUT_DIR)
+
+version:
+ @echo $(VERSION)
diff --git a/util/intelp2m/main.go b/util/intelp2m/main.go
index 38a3b5fc..1f3333b 100644
--- a/util/intelp2m/main.go
+++ b/util/intelp2m/main.go
@@ -9,19 +9,29 @@
"review.coreboot.org/coreboot.git/util/intelp2m/parser"
)
+var (
+ // Version is injected into main during project build
+ Version string = "Unknown"
+)
+
+// printVersion - print the utility version in the console
+func printVersion() {
+ fmt.Printf("[ intelp2m ] Version: %s\n", Version)
+}
+
// generateOutputFile - generates include file
// parser : parser data structure
func generateOutputFile(parser *parser.ParserData) (err error) {
-
- config.OutputGenFile.WriteString(`/* SPDX-License-Identifier: GPL-2.0-only */
+ header := fmt.Sprintf(`/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef CFG_GPIO_H
#define CFG_GPIO_H
#include <gpio.h>
-/* Pad configuration was generated automatically using intelp2m utility */
-static const struct pad_config gpio_table[] = {`)
+/* Pad configuration was generated automatically using intelp2m %s */
+static const struct pad_config gpio_table[] = {`, Version)
+ config.OutputGenFile.WriteString(header + "\n")
// Add the pads map
parser.PadMapFprint()
config.OutputGenFile.WriteString(`};
@@ -48,14 +58,14 @@
nonCheckFlag := flag.Bool("n",
false,
- "Generate macros without checking.\n" +
- "\tIn this case, some fields of the configuration registers\n" +
- "\tDW0 will be ignored.\n")
+ "Generate macros without checking.\n"+
+ "\tIn this case, some fields of the configuration registers\n"+
+ "\tDW0 will be ignored.\n")
- infoLevels := []*bool {
- flag.Bool("i", false, "Show pads function in the comments"),
- flag.Bool("ii", false, "Show DW0/DW1 value in the comments"),
- flag.Bool("iii", false, "Show ignored bit fields in the comments"),
+ infoLevels := []*bool{
+ flag.Bool("i", false, "Show pads function in the comments"),
+ flag.Bool("ii", false, "Show DW0/DW1 value in the comments"),
+ flag.Bool("iii", false, "Show ignored bit fields in the comments"),
flag.Bool("iiii", false, "Show target PAD_CFG() macro in the comments"),
}
@@ -64,7 +74,7 @@
"\t1 - gpio.h\n"+
"\t2 - your template\n\t")
- platform := flag.String("p", "snr", "set platform:\n"+
+ platform := flag.String("p", "snr", "set platform:\n"+
"\tsnr - Sunrise PCH or Skylake/Kaby Lake SoC\n"+
"\tlbg - Lewisburg PCH with Xeon SP\n"+
"\tapl - Apollo Lake SoC\n"+
@@ -75,11 +85,12 @@
"\tmtl - MeteorLake SoC\n"+
"\tebg - Emmitsburg PCH with Xeon SP\n")
- fieldstyle := flag.String("fld", "none", "set fields macros style:\n"+
+ fieldstyle := flag.String("fld", "none", "set fields macros style:\n"+
"\tcb - use coreboot style for bit fields macros\n"+
"\tfsp - use fsp style\n"+
"\traw - do not convert, print as is\n")
+ printVersion()
flag.Parse()
config.IgnoredFieldsFlagSet(*ignFlag)
@@ -88,7 +99,7 @@
for level, flag := range infoLevels {
if *flag {
config.InfoLevelSet(level + 1)
- fmt.Printf("Info level: Use level %d!\n", level + 1)
+ fmt.Printf("Info level: Use level %d!\n", level+1)
break
}
}
diff --git a/util/intelp2m/scripts/linux/version.sh b/util/intelp2m/scripts/linux/version.sh
new file mode 100755
index 0000000..565063a
--- /dev/null
+++ b/util/intelp2m/scripts/linux/version.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env sh
+
+SCRIPTS_DIR=$(cd "$(dirname "$0")" && pwd)
+PROJECT_DIR="${SCRIPTS_DIR}/../.."
+
+VERSION=$(cat ${PROJECT_DIR}/version.txt)
+LAST_COMMIT=$(git log --oneline -n 1 --pretty=format:%h ${PROJECT_DIR})
+DIFF=$(git diff ${PROJECT_DIR})
+
+if [ -z "$DIFF" ]; then
+ echo "${VERSION}-${LAST_COMMIT}"
+else
+ echo "${VERSION}-${LAST_COMMIT}-dirty"
+fi
diff --git a/util/intelp2m/version.txt b/util/intelp2m/version.txt
new file mode 100644
index 0000000..9459d4b
--- /dev/null
+++ b/util/intelp2m/version.txt
@@ -0,0 +1 @@
+1.1
--
To view, visit https://review.coreboot.org/c/coreboot/+/67321?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Id2fd0757c003004af976309a44dbbfff0eb517a7
Gerrit-Change-Number: 67321
Gerrit-PatchSet: 21
Gerrit-Owner: Maxim <max.senia.poliak(a)gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Attention is currently required from: Maxim, Paul Menzel.
David Hendricks has posted comments on this change by Maxim. ( https://review.coreboot.org/c/coreboot/+/67321?usp=email )
Change subject: util/intelp2m: Print the current project version
......................................................................
Patch Set 20: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/67321?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Id2fd0757c003004af976309a44dbbfff0eb517a7
Gerrit-Change-Number: 67321
Gerrit-PatchSet: 20
Gerrit-Owner: Maxim <max.senia.poliak(a)gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Maxim <max.senia.poliak(a)gmail.com>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Comment-Date: Wed, 04 Dec 2024 18:17:19 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: Patrick Rudolph.
Elyes Haouas has posted comments on this change by Patrick Rudolph. ( https://review.coreboot.org/c/coreboot/+/85317?usp=email )
Change subject: drivers/ipmi/ocp: Add missing include
......................................................................
Patch Set 7: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/85317?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Iccd131295263460a4939e51e12ece87ea22c417c
Gerrit-Change-Number: 85317
Gerrit-PatchSet: 7
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Elyes Haouas <ehaouas(a)noos.fr>
Gerrit-Reviewer: Lean Sheng Tan <sheng.tan(a)9elements.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Comment-Date: Wed, 04 Dec 2024 17:44:29 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: Ana Carolina Cabral, Fred Reitberger, Jason Glenesk, Matt DeVillier, Nick Kochlowski, Paul Menzel.
Martin Roth has posted comments on this change by Nick Kochlowski. ( https://review.coreboot.org/c/coreboot/+/84915?usp=email )
Change subject: soc/amd/phoenix/chip.c: Add PHX OpenSIL POC TP2/TP3 calls
......................................................................
Patch Set 7:
(1 comment)
File src/soc/amd/phoenix/Kconfig:
https://review.coreboot.org/c/coreboot/+/84915/comment/4577a1c1_05d4c7d6?us… :
PS7, Line 103: PLATFORM_USES_OPENSIL
> do we want this declared at the SoC level? […]
Yeah, I think that seems reasonable. For the FSP it's in drivers/intel/[FSP1_1/FSP2_0]/Kconfig, but we don't have a driver for opensil at this point.
Maybe we should create drivers/amd/opensil and put it there?
--
To view, visit https://review.coreboot.org/c/coreboot/+/84915?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I8c335211bf36118fe1d6b7dacbf4064c1d7d3a38
Gerrit-Change-Number: 84915
Gerrit-PatchSet: 7
Gerrit-Owner: Nick Kochlowski <nickkochlowski(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Ana Carolina Cabral
Gerrit-CC: Martin Roth <martin.roth(a)amd.corp-partner.google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nick Kochlowski <nickkochlowski(a)gmail.com>
Gerrit-Attention: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Attention: Ana Carolina Cabral
Gerrit-Comment-Date: Wed, 04 Dec 2024 17:38:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Matt DeVillier <matt.devillier(a)gmail.com>