Attention is currently required from: Jason Glenesk, Raul Rangel, Matt DeVillier, Fred Reitberger, Felix Held.
Karthik Ramasubramanian has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/68184 )
Change subject: soc/amd/common/psp_verstage: Pass SRAM buffer to Crypto Engine
......................................................................
Patch Set 10:
(1 comment)
File src/soc/amd/common/psp_verstage/vboot_crypto.c:
https://review.coreboot.org/c/coreboot/+/68184/comment/ca739dff_cadc1757
PS10, Line 98: CONFIG_VBOOT_HASH_BLOCK_SIZE
> Hrmm, how large is this? Will this overflow the stack?
My testing indicated it should not. Earlier when we verify the entire FW body, vboot used the same amount of memory from the stack - https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/refs/he…
It is currently at 36 KB - configured on a per-SoC basis.
--
To view, visit https://review.coreboot.org/c/coreboot/+/68184
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie9bc9e786f302e7938969c8093d5405b5a85b711
Gerrit-Change-Number: 68184
Gerrit-PatchSet: 10
Gerrit-Owner: Karthik Ramasubramanian <kramasub(a)google.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: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Attention: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Attention: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Wed, 26 Oct 2022 15:57:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Raul Rangel <rrangel(a)chromium.org>
Gerrit-MessageType: comment
Raul Rangel has submitted this change. ( https://review.coreboot.org/c/coreboot/+/66573 )
(
13 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: util/amdfwtool/amdfwread: Fix AMDFW_OPT* bit mask
......................................................................
util/amdfwtool/amdfwread: Fix AMDFW_OPT* bit mask
Optional arguments that involve printing information from the firmware
image is mapped to bit fields with bit 31 set. But instead of just
setting bit 31, bits 27 - 31 are set. Fix AMDFW_OPT* bit mask.
BUG=None
TEST=Build and use amdfwread to read the Soft-fuse bits from Guybrush
BIOS image. Observed no changes before and after the changes.
Signed-off-by: Karthikeyan Ramasubramanian <kramasub(a)google.com>
Change-Id: I0d88669bace45f3332c5e56527516b2f38295a48
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66573
Reviewed-by: Robert Zieba <robertzieba(a)google.com>
Reviewed-by: Raul Rangel <rrangel(a)chromium.org>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M util/amdfwtool/amdfwread.c
1 file changed, 32 insertions(+), 7 deletions(-)
Approvals:
build bot (Jenkins): Verified
Raul Rangel: Looks good to me, approved
Robert Zieba: Looks good to me, but someone else must approve
diff --git a/util/amdfwtool/amdfwread.c b/util/amdfwtool/amdfwread.c
index ccb81b3..1701e20 100644
--- a/util/amdfwtool/amdfwread.c
+++ b/util/amdfwtool/amdfwread.c
@@ -162,10 +162,7 @@
enum {
AMDFW_OPT_HELP = 'h',
-
- /* When bit 31 is set, options are a bitfield of info to print from the
- firmware image. */
- AMDFW_OPT_SOFT_FUSE = 0xF0000001,
+ AMDFW_OPT_SOFT_FUSE = 1UL << 0, /* Print Softfuse */
};
static char const optstring[] = {AMDFW_OPT_HELP};
@@ -202,12 +199,18 @@
break;
}
- if (opt == AMDFW_OPT_HELP) {
+ switch (opt) {
+ case AMDFW_OPT_HELP:
print_usage();
return 0;
- }
- selected_functions |= opt;
+ case AMDFW_OPT_SOFT_FUSE:
+ selected_functions |= opt;
+ break;
+
+ default:
+ break;
+ }
}
FILE *fw = fopen(fw_file, "rb");
--
To view, visit https://review.coreboot.org/c/coreboot/+/66573
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0d88669bace45f3332c5e56527516b2f38295a48
Gerrit-Change-Number: 66573
Gerrit-PatchSet: 16
Gerrit-Owner: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Jon Murphy <jpmurphy(a)google.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: Rob Barnes <robbarnes(a)google.com>
Gerrit-Reviewer: Robert Zieba <robertzieba(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Raul Rangel has submitted this change. ( https://review.coreboot.org/c/coreboot/+/66572 )
Change subject: util/amdfwtool/amdfwread: Update relative_offset function
......................................................................
util/amdfwtool/amdfwread: Update relative_offset function
* AMD_ADDR_PHYSICAL refers to physical address in the memory map
* AMD_ADDR_REL_BIOS is relative to the start of the BIOS image
* AMD_ADDR_REL_TAB is relative to the start of concerned PSP or BIOS
tables
Update the relative_offset implementation accordingly. Though
AMD_ADDR_REL_SLOT is defined it is not used. Removing that to simplify
the relative_offset implementation so that it can be used for both PSP
and BIOS firmware tables. Hence update the relative_offset function
signature as well.
BUG=None
TEST=Build and use amdfwread to read the Soft-fuse bits from Guybrush
BIOS image. Observed no changes before and after the changes.
Change-Id: I74603dd08eda87393c14b746c4435eaf2bb34126
Signed-off-by: Karthikeyan Ramasubramanian <kramasub(a)google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66572
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Raul Rangel <rrangel(a)chromium.org>
---
M util/amdfwtool/amdfwread.c
1 file changed, 56 insertions(+), 20 deletions(-)
Approvals:
build bot (Jenkins): Verified
Raul Rangel: Looks good to me, approved
diff --git a/util/amdfwtool/amdfwread.c b/util/amdfwtool/amdfwread.c
index d6dc1e2..ccb81b3 100644
--- a/util/amdfwtool/amdfwread.c
+++ b/util/amdfwtool/amdfwread.c
@@ -10,6 +10,7 @@
/* An address can be relative to the image/file start but it can also be the address when
* the image is mapped at 0xff000000. Used to ensure that we only attempt to read within
* the limits of the file. */
+#define SPI_ROM_BASE 0xff000000
#define FILE_REL_MASK 0xffffff
#define ERR(...) fprintf(stderr, __VA_ARGS__)
@@ -24,28 +25,35 @@
};
/* Converts addresses to be relative to the start of the file */
-static uint64_t relative_offset(const psp_directory_header *header, uint32_t header_offset,
- const psp_directory_entry *entry, size_t entry_index)
+static uint64_t relative_offset(uint32_t header_offset, uint64_t addr, uint64_t mode)
{
- amd_addr_mode mode = header->additional_info_fields.address_mode;
- if (mode == AMD_ADDR_REL_BIOS) {
- /* Entry address mode override directory mode with this value */
- mode = entry->address_mode;
- }
-
switch (mode) {
- case AMD_ADDR_REL_BIOS:
- return entry->addr + header_offset;
+ /* Since this utility operates on the BIOS file, physical address is converted
+ relative to the start of the BIOS file. */
+ case AMD_ADDR_PHYSICAL:
+ if (addr < SPI_ROM_BASE || addr > (SPI_ROM_BASE + FILE_REL_MASK)) {
+ ERR("Invalid address(%lx) or mode(%lx)\n", addr, mode);
+ /* TODO: fix amdfwtool to program the right address/mode. In guybrush,
+ * lots of addresses are marked as physical, but they are relative to
+ * BIOS. Until that is fixed, just leave an error message. */
+ // exit(1);
+ }
+ return addr & FILE_REL_MASK;
- case AMD_ADDR_REL_SLOT:
- return entry->addr + header_offset + sizeof(psp_directory_header) +
- entry_index * sizeof(psp_directory_entry);
+ case AMD_ADDR_REL_BIOS:
+ if (addr > FILE_REL_MASK) {
+ ERR("Invalid address(%lx) or mode(%lx)\n", addr, mode);
+ exit(1);
+ }
+ return addr & FILE_REL_MASK;
+
+ case AMD_ADDR_REL_TAB:
+ return addr + header_offset;
default:
- break;
+ ERR("Unsupported mode %lu\n", mode);
+ exit(1);
}
-
- return entry->addr & FILE_REL_MASK;
}
static int read_fw_header(FILE *fw, uint32_t offset, embedded_firmware *fw_header)
@@ -120,9 +128,10 @@
for (size_t i = 0; i < num_current_entries; i++) {
uint32_t type = current_entries[i].type;
+ uint64_t mode = current_entries[i].address_mode;
+ uint64_t addr = current_entries[i].addr;
+
if (type == AMD_PSP_FUSE_CHAIN) {
- uint64_t mode = current_entries[i].address_mode;
- uint64_t addr = current_entries[i].addr;
uint64_t fuse = mode << 62 | addr;
printf("Soft-fuse:0x%lx\n", fuse);
@@ -132,8 +141,7 @@
if (l2_dir_offset != 0)
return 1;
- l2_dir_offset = relative_offset(&header, psp_offset,
- ¤t_entries[i], i);
+ l2_dir_offset = relative_offset(psp_offset, addr, mode);
}
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/66572
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I74603dd08eda87393c14b746c4435eaf2bb34126
Gerrit-Change-Number: 66572
Gerrit-PatchSet: 16
Gerrit-Owner: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Jon Murphy <jpmurphy(a)google.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: Rob Barnes <robbarnes(a)google.com>
Gerrit-Reviewer: Robert Zieba <robertzieba(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Attention is currently required from: Shelley Chen, Taniya Das, Venkat Thogaru, Julius Werner, Sudheer Amrabadi.
Taniya Das has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/68384 )
Change subject: soc/qualcomm/sc7280: Add socinfo_pro_part() function in coreboot
......................................................................
Patch Set 6:
(2 comments)
File src/soc/qualcomm/sc7280/socinfo.c:
https://review.coreboot.org/c/coreboot/+/68384/comment/247bf8c3_5b82adc7
PS4, Line 12: static struct chipinfo chipinfolut[] = {
> Not related directly to this patch, but just some general observations about this code: each entry h […]
Changed structure members range uint32_t to uint16_t, in structure initialization instead of macros used designated initializers, here we are keeping chip_id, because we need it for future purpose use.
https://review.coreboot.org/c/coreboot/+/68384/comment/0d4ac63b_5e4c4968
PS4, Line 57: return false;
> Done. […]
Done
--
To view, visit https://review.coreboot.org/c/coreboot/+/68384
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id9f23696384a6c1a89000292eafebd8a16c273ca
Gerrit-Change-Number: 68384
Gerrit-PatchSet: 6
Gerrit-Owner: Sudheer Amrabadi <samrabad(a)codeaurora.org>
Gerrit-Reviewer: Shelley Chen <shchen(a)google.com>
Gerrit-Reviewer: Taniya Das <quic_tdas(a)quicinc.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Julius Werner <jwerner(a)chromium.org>
Gerrit-CC: Taniya Das <tdas(a)qualcomm.corp-partner.google.com>
Gerrit-CC: Venkat Thogaru <thogaru(a)qualcomm.corp-partner.google.com>
Gerrit-Attention: Shelley Chen <shchen(a)google.com>
Gerrit-Attention: Taniya Das <quic_tdas(a)quicinc.com>
Gerrit-Attention: Venkat Thogaru <thogaru(a)qualcomm.corp-partner.google.com>
Gerrit-Attention: Julius Werner <jwerner(a)chromium.org>
Gerrit-Attention: Sudheer Amrabadi <samrabad(a)codeaurora.org>
Gerrit-Comment-Date: Wed, 26 Oct 2022 15:53:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Venkat Thogaru <thogaru(a)qualcomm.corp-partner.google.com>
Comment-In-Reply-To: Julius Werner <jwerner(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Jason Glenesk, Jason Nien, Marshall Dawson, Matt DeVillier, Martin Roth, Fred Reitberger, Karthik Ramasubramanian, Felix Held.
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/66948 )
Change subject: mb/google/skyrim: Enable CBFS Verification
......................................................................
Patch Set 14: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/66948
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Idd22a521a913705af0d2aca17acd1aa069a77f29
Gerrit-Change-Number: 66948
Gerrit-PatchSet: 14
Gerrit-Owner: Karthik Ramasubramanian <kramasub(a)google.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: Jason Nien <jason.nien(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martin.roth(a)amd.corp-partner.google.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-Attention: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Attention: Jason Nien <jason.nien(a)amd.corp-partner.google.com>
Gerrit-Attention: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Attention: Martin Roth <martin.roth(a)amd.corp-partner.google.com>
Gerrit-Attention: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Attention: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Wed, 26 Oct 2022 15:52:03 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Tarun Tuli, Subrata Banik, Kapil Porwal, Tim Wawrzynczak, Nick Vaccaro, Ivy Jian, Eric Lai.
Nick Vaccaro has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/68901 )
Change subject: soc/intel/alderlake: Select X86_INIT_NEED_1_SIPI Kconfig for RPL
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/68901
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I1886bc5e60c2f6bc1e2f9d3c8d9c11799d2b53c5
Gerrit-Change-Number: 68901
Gerrit-PatchSet: 2
Gerrit-Owner: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Gerrit-Reviewer: Ivy Jian <ivy.jian(a)quanta.corp-partner.google.com>
Gerrit-Reviewer: Kapil Porwal <kapilporwal(a)google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)chromium.org>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)google.com>
Gerrit-Reviewer: Tarun Tuli <taruntuli(a)google.com>
Gerrit-Reviewer: Tim Wawrzynczak <inforichland(a)gmail.com>
Gerrit-Reviewer: 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-Attention: Kapil Porwal <kapilporwal(a)google.com>
Gerrit-Attention: Tim Wawrzynczak <inforichland(a)gmail.com>
Gerrit-Attention: Nick Vaccaro <nvaccaro(a)chromium.org>
Gerrit-Attention: Ivy Jian <ivy.jian(a)quanta.corp-partner.google.com>
Gerrit-Attention: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Gerrit-Comment-Date: Wed, 26 Oct 2022 15:51:48 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment