Attention is currently required from: Martin L Roth.
Elyes Haouas has posted comments on this change by Elyes Haouas. ( https://review.coreboot.org/c/coreboot/+/82712?usp=email )
Change subject: util/lint: Add lint rule to warn if <stdint.h> is included but not used
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
Additionally, I have created a combined script that checks <string.h>, <stdint.h>, and <stddef.h> in a single file for your review: https://review.coreboot.org/c/coreboot/+/82713
Please review the scripts and provide your feedback. We need to decide whether to opt for the individual scripts for each header or to use the combined script that handles all three headers together.
--
To view, visit https://review.coreboot.org/c/coreboot/+/82712?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: I318189f88c4ee8803075efc4fe2cb9b58547c126
Gerrit-Change-Number: 82712
Gerrit-PatchSet: 1
Gerrit-Owner: Elyes Haouas <ehaouas(a)noos.fr>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Comment-Date: Thu, 30 May 2024 15:15:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Elyes Haouas has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/82713?usp=email )
Change subject: util/lint: Warn if {stddef,stdint,string}.h included but not used
......................................................................
util/lint: Warn if {stddef,stdint,string}.h included but not used
Change-Id: I94104df7a2e25c0197b4027eb7fddd52cbc4c6ad
Signed-off-by: Elyes Haouas <ehaouas(a)noos.fr>
---
A util/lint/lint-stable-032-includes
1 file changed, 55 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/13/82713/1
diff --git a/util/lint/lint-stable-032-includes b/util/lint/lint-stable-032-includes
new file mode 100755
index 0000000..7bc2f26
--- /dev/null
+++ b/util/lint/lint-stable-032-includes
@@ -0,0 +1,55 @@
+#!/usr/bin/env sh
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# DESCR: Verify if header files are needed in modified files
+#
+
+# Get the list of modified files
+MODIFIED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.c$|\.h$')
+if [ -z "$MODIFIED_FILES" ]; then
+ exit 0
+fi
+
+# Create temporary files to hold the lists
+TMP_INCLUDE=$(mktemp)
+TMP_FUNCTIONS=$(mktemp)
+
+# Define the headers and their associated functions/types to check
+declare -A HEADERS
+HEADERS["<stddef.h>"]="size_t\b\|ptrdiff_t\b\|NULL\b\|offsetof\b\|wchar_t\b"
+HEADERS["<stdint.h>"]="int8_t\b\|int16_t\b\|int32_t\b\|int64_t\b\|uint8_t\b\|uint16_t\b\|uint32_t\b\|uint64_t\b\|intptr_t\b\|uintptr_t\b"
+HEADERS["<string.h>"]="memcpy\|memmove\|memset\|memcmp\|memchr\|strdup\|strconcat\|strnlen\|strlen\|strchr\|strncpy\|strcpy\|strcmp\|strncmp\|strspn\|strcspn\|strstr\|strtok_r\|strtok\|atol\|strrchr\|skip_atoi"
+
+for header in "${!HEADERS[@]}"; do
+ INCLUDE_LIST=$(mktemp)
+ FUNCTION_LIST=$(mktemp)
+
+ # Find files including the header
+ for file in $MODIFIED_FILES; do
+ if grep -q "#include $header" "$file"; then
+ echo "$file" >> "$INCLUDE_LIST"
+ fi
+ done
+
+ # Find files using the functions/types associated with the header
+ for file in $MODIFIED_FILES; do
+ if grep -q "${HEADERS[$header]}" "$file"; then
+ echo "$file" >> "$FUNCTION_LIST"
+ fi
+ done
+
+ # Compare the two lists to find unnecessary includes
+ UNNEEDED_INCLUDE=$(comm -23 <(sort "$INCLUDE_LIST") <(sort "$FUNCTION_LIST"))
+
+ # Output warnings for unneeded includes
+ if [ -n "$UNNEEDED_INCLUDE" ]; then
+ echo "Warning: The following files include $header but do not use its functions/types:"
+ echo "$UNNEEDED_INCLUDE"
+ fi
+
+ # Clean up temporary files
+ rm -f "$INCLUDE_LIST" "$FUNCTION_LIST"
+done
+
+# Clean up temporary files
+rm -f "$TMP_INCLUDE" "$TMP_FUNCTIONS"
--
To view, visit https://review.coreboot.org/c/coreboot/+/82713?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I94104df7a2e25c0197b4027eb7fddd52cbc4c6ad
Gerrit-Change-Number: 82713
Gerrit-PatchSet: 1
Gerrit-Owner: Elyes Haouas <ehaouas(a)noos.fr>
Elyes Haouas has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/82712?usp=email )
Change subject: util/lint: Add lint rule to warn if <stdint.h> is included but not used
......................................................................
util/lint: Add lint rule to warn if <stdint.h> is included but not used
Change-Id: I318189f88c4ee8803075efc4fe2cb9b58547c126
Signed-off-by: Elyes Haouas <ehaouas(a)noos.fr>
---
A util/lint/lint-stable-034-stdint-h
1 file changed, 41 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/82712/1
diff --git a/util/lint/lint-stable-034-stdint-h b/util/lint/lint-stable-034-stdint-h
new file mode 100755
index 0000000..61ca04d
--- /dev/null
+++ b/util/lint/lint-stable-034-stdint-h
@@ -0,0 +1,41 @@
+#!/usr/bin/env sh
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# DESCR: Verify if <stdint.h> is needed in modified files
+#
+
+# Get the list of modified files
+MODIFIED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.c$|\.h$')
+if [ -z "$MODIFIED_FILES" ]; then
+ exit 0
+fi
+
+# Create temporary files to hold the lists
+TMP_INCLUDE=$(mktemp)
+TMP_TYPES=$(mktemp)
+
+# Find files including <stdint.h>
+for file in $MODIFIED_FILES; do
+ if grep -q '#include <stdint.h>' "$file"; then
+ echo "$file" >> "$TMP_INCLUDE"
+ fi
+done
+
+# Find files using stdint.h types
+for file in $MODIFIED_FILES; do
+ if grep -q '\bint8_t\b\|int16_t\b\|int32_t\b\|int64_t\b\|uint8_t\b\|uint16_t\b\|uint32_t\b\|uint64_t\b\|intptr_t\b\|uintptr_t\b' "$file"; then
+ echo "$file" >> "$TMP_TYPES"
+ fi
+done
+
+# Compare the two lists to find unnecessary includes
+UNNEEDED_INCLUDE=$(comm -23 <(sort "$TMP_INCLUDE") <(sort "$TMP_TYPES"))
+
+# Output warnings for unneeded includes
+if [ -n "$UNNEEDED_INCLUDE" ]; then
+ echo "Warning: The following files include <stdint.h> but do not use its types:"
+ echo "$UNNEEDED_INCLUDE"
+fi
+
+# Clean up temporary files
+rm -f "$TMP_INCLUDE" "$TMP_TYPES"
--
To view, visit https://review.coreboot.org/c/coreboot/+/82712?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I318189f88c4ee8803075efc4fe2cb9b58547c126
Gerrit-Change-Number: 82712
Gerrit-PatchSet: 1
Gerrit-Owner: Elyes Haouas <ehaouas(a)noos.fr>
Subrata Banik has submitted this change. ( https://review.coreboot.org/c/coreboot/+/82424?usp=email )
Change subject: vc/intel/fsp/mtl: Organize FSP headers into x86_32 directory
......................................................................
vc/intel/fsp/mtl: Organize FSP headers into x86_32 directory
This commit moves FSP V3471.91 header files for Meteor Lake
into a new x86_32 directory to better organize the files based
on the architecture. The Kconfig file has been modified accordingly
to reflect the new paths of the relocated headers.
BUG=b:329034258
TEST=Verified x86_32 and x86_64 builds on Meteor Lake board (Rex)
Change-Id: Id30186a8b1b5a9082f498e18a3378f5e9907b668
Signed-off-by: Appukuttan V K <appukuttan.vk(a)intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82424
Reviewed-by: Subrata Banik <subratabanik(a)google.com>
Reviewed-by: Dinesh Gehlot <digehlot(a)google.com>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
Reviewed-by: Kapil Porwal <kapilporwal(a)google.com>
---
M src/soc/intel/meteorlake/Kconfig
R src/vendorcode/intel/fsp/fsp2_0/meteorlake/x86_32/FirmwareVersionInfo.h
R src/vendorcode/intel/fsp/fsp2_0/meteorlake/x86_32/FspProducerDataHeader.h
R src/vendorcode/intel/fsp/fsp2_0/meteorlake/x86_32/FspUpd.h
R src/vendorcode/intel/fsp/fsp2_0/meteorlake/x86_32/FspmUpd.h
R src/vendorcode/intel/fsp/fsp2_0/meteorlake/x86_32/FspsUpd.h
R src/vendorcode/intel/fsp/fsp2_0/meteorlake/x86_32/MemInfoHob.h
7 files changed, 1 insertion(+), 1 deletion(-)
Approvals:
Kapil Porwal: Looks good to me, approved
build bot (Jenkins): Verified
Dinesh Gehlot: Looks good to me, approved
Angel Pons: Looks good to me, but someone else must approve
Subrata Banik: Looks good to me, approved
diff --git a/src/soc/intel/meteorlake/Kconfig b/src/soc/intel/meteorlake/Kconfig
index a4ebad4..43f6545 100644
--- a/src/soc/intel/meteorlake/Kconfig
+++ b/src/soc/intel/meteorlake/Kconfig
@@ -347,7 +347,7 @@
config FSP_HEADER_PATH
string "Location of FSP headers"
- default "src/vendorcode/intel/fsp/fsp2_0/meteorlake/"
+ default "src/vendorcode/intel/fsp/fsp2_0/meteorlake/x86_32/"
config FSP_FD_PATH
string
diff --git a/src/vendorcode/intel/fsp/fsp2_0/meteorlake/FirmwareVersionInfo.h b/src/vendorcode/intel/fsp/fsp2_0/meteorlake/x86_32/FirmwareVersionInfo.h
similarity index 100%
rename from src/vendorcode/intel/fsp/fsp2_0/meteorlake/FirmwareVersionInfo.h
rename to src/vendorcode/intel/fsp/fsp2_0/meteorlake/x86_32/FirmwareVersionInfo.h
diff --git a/src/vendorcode/intel/fsp/fsp2_0/meteorlake/FspProducerDataHeader.h b/src/vendorcode/intel/fsp/fsp2_0/meteorlake/x86_32/FspProducerDataHeader.h
similarity index 100%
rename from src/vendorcode/intel/fsp/fsp2_0/meteorlake/FspProducerDataHeader.h
rename to src/vendorcode/intel/fsp/fsp2_0/meteorlake/x86_32/FspProducerDataHeader.h
diff --git a/src/vendorcode/intel/fsp/fsp2_0/meteorlake/FspUpd.h b/src/vendorcode/intel/fsp/fsp2_0/meteorlake/x86_32/FspUpd.h
similarity index 100%
rename from src/vendorcode/intel/fsp/fsp2_0/meteorlake/FspUpd.h
rename to src/vendorcode/intel/fsp/fsp2_0/meteorlake/x86_32/FspUpd.h
diff --git a/src/vendorcode/intel/fsp/fsp2_0/meteorlake/FspmUpd.h b/src/vendorcode/intel/fsp/fsp2_0/meteorlake/x86_32/FspmUpd.h
similarity index 100%
rename from src/vendorcode/intel/fsp/fsp2_0/meteorlake/FspmUpd.h
rename to src/vendorcode/intel/fsp/fsp2_0/meteorlake/x86_32/FspmUpd.h
diff --git a/src/vendorcode/intel/fsp/fsp2_0/meteorlake/FspsUpd.h b/src/vendorcode/intel/fsp/fsp2_0/meteorlake/x86_32/FspsUpd.h
similarity index 100%
rename from src/vendorcode/intel/fsp/fsp2_0/meteorlake/FspsUpd.h
rename to src/vendorcode/intel/fsp/fsp2_0/meteorlake/x86_32/FspsUpd.h
diff --git a/src/vendorcode/intel/fsp/fsp2_0/meteorlake/MemInfoHob.h b/src/vendorcode/intel/fsp/fsp2_0/meteorlake/x86_32/MemInfoHob.h
similarity index 100%
rename from src/vendorcode/intel/fsp/fsp2_0/meteorlake/MemInfoHob.h
rename to src/vendorcode/intel/fsp/fsp2_0/meteorlake/x86_32/MemInfoHob.h
--
To view, visit https://review.coreboot.org/c/coreboot/+/82424?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: Id30186a8b1b5a9082f498e18a3378f5e9907b668
Gerrit-Change-Number: 82424
Gerrit-PatchSet: 15
Gerrit-Owner: Appukuttan V K <appukuttan.vk(a)intel.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Dinesh Gehlot <digehlot(a)google.com>
Gerrit-Reviewer: Eran Mitrani <mitrani(a)google.com>
Gerrit-Reviewer: Jakub Czapiga <czapiga(a)google.com>
Gerrit-Reviewer: Kapil Porwal <kapilporwal(a)google.com>
Gerrit-Reviewer: Ronak Kanabar <ronak.kanabar(a)intel.com>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Tarun <tstuli(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Attention is currently required from: Appukuttan V K, Ronak Kanabar.
Subrata Banik has posted comments on this change by Appukuttan V K. ( https://review.coreboot.org/c/coreboot/+/82425?usp=email )
Change subject: vc/edk2-stable202302: Add config guards to support FSP 2.4
......................................................................
Patch Set 23:
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/82425/comment/4d6f2815_d4ed69e7?us… :
PS23, Line 21: b:343428206
please specify the child bugs if you have created any to fix the EDK2 cherrypicks as well here.
--
To view, visit https://review.coreboot.org/c/coreboot/+/82425?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: Idc849de73723036323f81dfd055730f6669cd52e
Gerrit-Change-Number: 82425
Gerrit-PatchSet: 23
Gerrit-Owner: Appukuttan V K <appukuttan.vk(a)intel.com>
Gerrit-Reviewer: Ronak Kanabar <ronak.kanabar(a)intel.com>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Appukuttan V K <appukuttan.vk(a)intel.com>
Gerrit-Attention: Ronak Kanabar <ronak.kanabar(a)intel.com>
Gerrit-Comment-Date: Thu, 30 May 2024 13:21:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No