Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/69895 )
Change subject: soc/amd/*/Makefile: fix readelf parameters to get bootblock size
......................................................................
soc/amd/*/Makefile: fix readelf parameters to get bootblock size
This ports forward part of commit df0968062622 ("soc/amd/picasso: Add
support for 64bit builds") to the newer AMD SoCs.
Use -Wl instead of -l to get the output format that the commands in the
Makefile expect to extract the value for PSP_BIOSBIN_SIZE. Without this
change, readelf will split the output into two lines in case of a 64 bit
coreboot build. This results in invalid amdcompress and amdfwtool
command lines which will cause the amdfwtool call to fail with
Error: BIOS binary destination and uncompressed size are required
With the old readelf -l command we get this output in a 64 bit build:
Program Headers:
Type Offset VirtAddr PhysAddr
FileSiz MemSiz Flags Align
LOAD 0x0000000000000080 0x0000000002030000 0x0000000002030000
0x0000000000010000 0x0000000000010000 RWE 0x10
while we get the correct output in a 32 bit build:
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000060 0x02030000 0x02030000 0x10000 0x10000 RWE 0x20
With readelf -Wl we also get the expected output in a 64 bit build:
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000080 0x0000000002030000 0x0000000002030000 0x010000 0x010000 RWE 0x10
TEST=This fixes the 64 bit build on Cezanne with some follow-up patches
applied.
Signed-off-by: Felix Held <felix-coreboot(a)felixheld.de>
Change-Id: I35f9feda4d0da3546592dfac233ca66732bd5464
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69895
Reviewed-by: Arthur Heymans <arthur(a)aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred(a)gmail.com>
---
M src/soc/amd/cezanne/Makefile.inc
M src/soc/amd/glinda/Makefile.inc
M src/soc/amd/mendocino/Makefile.inc
M src/soc/amd/morgana/Makefile.inc
4 files changed, 56 insertions(+), 8 deletions(-)
Approvals:
build bot (Jenkins): Verified
Arthur Heymans: Looks good to me, approved
Fred Reitberger: Looks good to me, approved
diff --git a/src/soc/amd/cezanne/Makefile.inc b/src/soc/amd/cezanne/Makefile.inc
index 1f2bb6d..091e63f 100644
--- a/src/soc/amd/cezanne/Makefile.inc
+++ b/src/soc/amd/cezanne/Makefile.inc
@@ -141,8 +141,8 @@
# type = 0x62
PSP_BIOSBIN_FILE=$(obj)/amd_biospsp.img
PSP_ELF_FILE=$(objcbfs)/bootblock.elf
-PSP_BIOSBIN_SIZE=$(shell $(READELF_bootblock) -l $(PSP_ELF_FILE) | grep LOAD | awk '{print $$5}')
-PSP_BIOSBIN_DEST=$(shell $(READELF_bootblock) -l $(PSP_ELF_FILE) | grep LOAD | awk '{print $$3}')
+PSP_BIOSBIN_SIZE=$(shell $(READELF_bootblock) -Wl $(PSP_ELF_FILE) | grep LOAD | awk '{print $$5}')
+PSP_BIOSBIN_DEST=$(shell $(READELF_bootblock) -Wl $(PSP_ELF_FILE) | grep LOAD | awk '{print $$3}')
# type = 0x63 - construct APOB NV base/size from flash map
# The flashmap section used for this is expected to be named RW_MRC_CACHE
diff --git a/src/soc/amd/glinda/Makefile.inc b/src/soc/amd/glinda/Makefile.inc
index e00421d..4d1ba55 100644
--- a/src/soc/amd/glinda/Makefile.inc
+++ b/src/soc/amd/glinda/Makefile.inc
@@ -141,8 +141,8 @@
# type = 0x62
PSP_BIOSBIN_FILE=$(obj)/amd_biospsp.img
PSP_ELF_FILE=$(objcbfs)/bootblock.elf
-PSP_BIOSBIN_SIZE=$(shell $(READELF_bootblock) -l $(PSP_ELF_FILE) | grep LOAD | awk '{print $$5}')
-PSP_BIOSBIN_DEST=$(shell $(READELF_bootblock) -l $(PSP_ELF_FILE) | grep LOAD | awk '{print $$3}')
+PSP_BIOSBIN_SIZE=$(shell $(READELF_bootblock) -Wl $(PSP_ELF_FILE) | grep LOAD | awk '{print $$5}')
+PSP_BIOSBIN_DEST=$(shell $(READELF_bootblock) -Wl $(PSP_ELF_FILE) | grep LOAD | awk '{print $$3}')
# type = 0x63 - construct APOB NV base/size from flash map
# The flashmap section used for this is expected to be named RW_MRC_CACHE
diff --git a/src/soc/amd/mendocino/Makefile.inc b/src/soc/amd/mendocino/Makefile.inc
index 92c75f8..ab709e6 100644
--- a/src/soc/amd/mendocino/Makefile.inc
+++ b/src/soc/amd/mendocino/Makefile.inc
@@ -142,8 +142,8 @@
# type = 0x62
PSP_BIOSBIN_FILE=$(obj)/amd_biospsp.img
PSP_ELF_FILE=$(objcbfs)/bootblock.elf
-PSP_BIOSBIN_SIZE=$(shell $(READELF_bootblock) -l $(PSP_ELF_FILE) | grep LOAD | awk '{print $$5}')
-PSP_BIOSBIN_DEST=$(shell $(READELF_bootblock) -l $(PSP_ELF_FILE) | grep LOAD | awk '{print $$3}')
+PSP_BIOSBIN_SIZE=$(shell $(READELF_bootblock) -Wl $(PSP_ELF_FILE) | grep LOAD | awk '{print $$5}')
+PSP_BIOSBIN_DEST=$(shell $(READELF_bootblock) -Wl $(PSP_ELF_FILE) | grep LOAD | awk '{print $$3}')
# type = 0x63 - construct APOB NV base/size from flash map
# The flashmap section used for this is expected to be named RW_MRC_CACHE
diff --git a/src/soc/amd/morgana/Makefile.inc b/src/soc/amd/morgana/Makefile.inc
index a88e1a5..44a92eb 100644
--- a/src/soc/amd/morgana/Makefile.inc
+++ b/src/soc/amd/morgana/Makefile.inc
@@ -141,8 +141,8 @@
# type = 0x62
PSP_BIOSBIN_FILE=$(obj)/amd_biospsp.img
PSP_ELF_FILE=$(objcbfs)/bootblock.elf
-PSP_BIOSBIN_SIZE=$(shell $(READELF_bootblock) -l $(PSP_ELF_FILE) | grep LOAD | awk '{print $$5}')
-PSP_BIOSBIN_DEST=$(shell $(READELF_bootblock) -l $(PSP_ELF_FILE) | grep LOAD | awk '{print $$3}')
+PSP_BIOSBIN_SIZE=$(shell $(READELF_bootblock) -Wl $(PSP_ELF_FILE) | grep LOAD | awk '{print $$5}')
+PSP_BIOSBIN_DEST=$(shell $(READELF_bootblock) -Wl $(PSP_ELF_FILE) | grep LOAD | awk '{print $$3}')
# type = 0x63 - construct APOB NV base/size from flash map
# The flashmap section used for this is expected to be named RW_MRC_CACHE
--
To view, visit https://review.coreboot.org/c/coreboot/+/69895
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I35f9feda4d0da3546592dfac233ca66732bd5464
Gerrit-Change-Number: 69895
Gerrit-PatchSet: 2
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
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: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Attention is currently required from: David Wu, Tarun Tuli, Nick Vaccaro, Eric Lai.
Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/69919 )
Change subject: Revert "mb/google/brya/var/kano: select SOC_INTEL_RAPTORLAKE"
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/69919
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ieaa44a33a7c65d384581b5145821b449783ca3fa
Gerrit-Change-Number: 69919
Gerrit-PatchSet: 3
Gerrit-Owner: Nick Vaccaro <nvaccaro(a)google.com>
Gerrit-Reviewer: David Wu <david_wu(a)quanta.corp-partner.google.com>
Gerrit-Reviewer: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Tarun Tuli <taruntuli(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: David Wu <david_wu(a)quanta.corp-partner.google.com>
Gerrit-Attention: Tarun Tuli <taruntuli(a)google.com>
Gerrit-Attention: Nick Vaccaro <nvaccaro(a)google.com>
Gerrit-Attention: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Gerrit-Comment-Date: Wed, 23 Nov 2022 19:33:10 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Tarun Tuli, Subrata Banik.
Hello Tarun Tuli, Subrata Banik,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/69953
to look at the new patch set (#2).
Change subject: soc/intel/alderlake: make SOC_INTEL_CSE_SEND_EOP_EARLY per-board configurable
......................................................................
soc/intel/alderlake: make SOC_INTEL_CSE_SEND_EOP_EARLY per-board configurable
SOC_INTEL_CSE_SEND_EOP_EARLY breaks soft ME disable, which works using
a HECI message that needs to be sent before EOP. Make the option
configurable to allow soft ME disable on alderlake.
Change-Id: I7febf7c029e7eac94052cc3a8142949d6813c1bc
Signed-off-by: Michał Kopeć <michal.kopec(a)3mdeb.com>
---
M src/soc/intel/alderlake/Kconfig
M src/soc/intel/common/block/cse/Kconfig
2 files changed, 18 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/53/69953/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/69953
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I7febf7c029e7eac94052cc3a8142949d6813c1bc
Gerrit-Change-Number: 69953
Gerrit-PatchSet: 2
Gerrit-Owner: Michał Kopeć <michal.kopec(a)3mdeb.com>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Tarun Tuli <taruntuli(a)google.com>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Tarun Tuli <taruntuli(a)google.com>
Gerrit-Attention: Subrata Banik <subratabanik(a)google.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Tarun Tuli, Subrata Banik.
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/69953 )
Change subject: soc/intel/alderlake: make SOC_INTEL_CSE_SEND_EOP_EARLY per-board configurable
......................................................................
Patch Set 1:
(2 comments)
Commit Message:
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-164394):
https://review.coreboot.org/c/coreboot/+/69953/comment/5f7bd16c_9ab100ff
PS1, Line 12:
Possible unwrapped commit description (prefer a maximum 72 chars per line)
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-164394):
https://review.coreboot.org/c/coreboot/+/69953/comment/4e342b68_b78f8a48
PS1, Line 13: Change-Id: I7febf7c029e7eac94052cc3a8142949d6813c1bc
Possible unwrapped commit description (prefer a maximum 72 chars per line)
--
To view, visit https://review.coreboot.org/c/coreboot/+/69953
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I7febf7c029e7eac94052cc3a8142949d6813c1bc
Gerrit-Change-Number: 69953
Gerrit-PatchSet: 1
Gerrit-Owner: Michał Kopeć <michal.kopec(a)3mdeb.com>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Tarun Tuli <taruntuli(a)google.com>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Tarun Tuli <taruntuli(a)google.com>
Gerrit-Attention: Subrata Banik <subratabanik(a)google.com>
Gerrit-Comment-Date: Wed, 23 Nov 2022 18:26:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Michał Kopeć has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/69953 )
Change subject: soc/intel/alderlake: make SOC_INTEL_CSE_SEND_EOP_EARLY per-board configurable
......................................................................
soc/intel/alderlake: make SOC_INTEL_CSE_SEND_EOP_EARLY per-board configurable
SOC_INTEL_CSE_SEND_EOP_EARLY breaks soft ME disable, which works using a HECI
message that needs to be sent before EOP. Make the option configurable to allow
soft ME disable on alderlake.
Change-Id: I7febf7c029e7eac94052cc3a8142949d6813c1bc
Signed-off-by: Michał Kopeć <michal.kopec(a)3mdeb.com>
---
M src/soc/intel/alderlake/Kconfig
M src/soc/intel/common/block/cse/Kconfig
2 files changed, 18 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/53/69953/1
diff --git a/src/soc/intel/alderlake/Kconfig b/src/soc/intel/alderlake/Kconfig
index 08d4132..5b624d8 100644
--- a/src/soc/intel/alderlake/Kconfig
+++ b/src/soc/intel/alderlake/Kconfig
@@ -117,7 +117,6 @@
select SOC_INTEL_COMMON_FSP_RESET
select SOC_INTEL_COMMON_PCH_CLIENT
select SOC_INTEL_COMMON_RESET
- select SOC_INTEL_CSE_SEND_EOP_EARLY
select SOC_INTEL_CSE_SET_EOP
select SOC_INTEL_MEM_MAPPED_PM_CONFIGURATION
select HAVE_INTEL_COMPLIANCE_TEST_MODE
@@ -459,6 +458,9 @@
endchoice
+config SOC_INTEL_CSE_SEND_EOP_EARLY
+ default y
+
if STITCH_ME_BIN
config CSE_BPDT_VERSION
diff --git a/src/soc/intel/common/block/cse/Kconfig b/src/soc/intel/common/block/cse/Kconfig
index 55a2b49..f728c3f 100644
--- a/src/soc/intel/common/block/cse/Kconfig
+++ b/src/soc/intel/common/block/cse/Kconfig
@@ -46,7 +46,7 @@
to make `HECI1` device disable using private configuration register (PCR) write.
config SOC_INTEL_CSE_SEND_EOP_EARLY
- bool
+ bool "CSE send EOP early"
depends on SOC_INTEL_COMMON_BLOCK_CSE
help
Use this config to send End Of Post (EOP) earlier through SoC code in order to
--
To view, visit https://review.coreboot.org/c/coreboot/+/69953
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I7febf7c029e7eac94052cc3a8142949d6813c1bc
Gerrit-Change-Number: 69953
Gerrit-PatchSet: 1
Gerrit-Owner: Michał Kopeć <michal.kopec(a)3mdeb.com>
Gerrit-MessageType: newchange
Attention is currently required from: Martin L Roth, Fred Reitberger.
Nicholas Chin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/69863 )
Change subject: util/kconfig: Fix patch to be compatible with quilt
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> yes, that code comment nicely explains why the code differs from upstream Kconfig
Acknowledged. I created a new patch (CB:69952) to add that comment, as it's logically different change from the this patch.
--
To view, visit https://review.coreboot.org/c/coreboot/+/69863
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I95bfe6571e3a2cc2b38074b4338f1610a4c8a595
Gerrit-Change-Number: 69863
Gerrit-PatchSet: 1
Gerrit-Owner: Nicholas Chin <nic.c3.14(a)gmail.com>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Attention: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Attention: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Comment-Date: Wed, 23 Nov 2022 17:29:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Fred Reitberger <reitbergerfred(a)gmail.com>
Comment-In-Reply-To: Nicholas Chin <nic.c3.14(a)gmail.com>
Gerrit-MessageType: comment
Nicholas Chin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/69952 )
Change subject: util/kconfig: Add comment explaining difference from upstream
......................................................................
util/kconfig: Add comment explaining difference from upstream
coreboot adds a patch on top of upstream Kconfig which allows the
generated Kconfig dependency files to be placed in a separate
directory than the autoconfig files based on the KCONFIG_SPLITCONFIG
variable. Add a comment to explain this difference.
Change-Id: Ief38ab84f852ff24f896ec8bbf094aa737a172d9
Signed-off-by: Nicholas Chin <nic.c3.14(a)gmail.com>
---
M util/kconfig/confdata.c
M util/kconfig/patches/0014-util-kconfig-Move-Kconfig-deps-back-into-build-confi.patch
2 files changed, 26 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/52/69952/1
diff --git a/util/kconfig/confdata.c b/util/kconfig/confdata.c
index 3da9e8b..1300ab6 100644
--- a/util/kconfig/confdata.c
+++ b/util/kconfig/confdata.c
@@ -1035,6 +1035,11 @@
struct symbol *sym;
int res, i;
+ /*
+ * Upstream Kconfig sets depfile_path based on the directory
+ * prefix of the autoconfig path, but coreboot overrides this
+ * using the KCONFIG_SPLITCONFIG environment variable
+ */
strcpy(depfile_path, conf_get_autobase_name());
depfile_prefix_len = strlen(depfile_path);
diff --git a/util/kconfig/patches/0014-util-kconfig-Move-Kconfig-deps-back-into-build-confi.patch b/util/kconfig/patches/0014-util-kconfig-Move-Kconfig-deps-back-into-build-confi.patch
index b4db86e..869adef 100644
--- a/util/kconfig/patches/0014-util-kconfig-Move-Kconfig-deps-back-into-build-confi.patch
+++ b/util/kconfig/patches/0014-util-kconfig-Move-Kconfig-deps-back-into-build-confi.patch
@@ -35,7 +35,7 @@
static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
{
char *p2;
-@@ -1024,19 +1031,14 @@ static int conf_write_autoconf_cmd(const
+@@ -1024,19 +1031,19 @@ static int conf_write_autoconf_cmd(const
static int conf_touch_deps(void)
{
@@ -52,6 +52,11 @@
-
- strncpy(depfile_path, name, depfile_prefix_len);
- depfile_path[depfile_prefix_len] = 0;
++ /*
++ * Upstream Kconfig sets depfile_path based on the directory
++ * prefix of the autoconfig path, but coreboot overrides this
++ * using the KCONFIG_SPLITCONFIG environment variable
++ */
+ strcpy(depfile_path, conf_get_autobase_name());
+ depfile_prefix_len = strlen(depfile_path);
--
To view, visit https://review.coreboot.org/c/coreboot/+/69952
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ief38ab84f852ff24f896ec8bbf094aa737a172d9
Gerrit-Change-Number: 69952
Gerrit-PatchSet: 1
Gerrit-Owner: Nicholas Chin <nic.c3.14(a)gmail.com>
Gerrit-MessageType: newchange