Attention is currently required from: Arthur Heymans, Yidi Lin.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/78799?usp=email )
Change subject: Use common GCD function
......................................................................
Patch Set 6: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/78799?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I30e4b02a9ca6a15c9bc4edcf4143ffa13a21a732
Gerrit-Change-Number: 78799
Gerrit-PatchSet: 6
Gerrit-Owner: Yidi Lin <yidilin(a)google.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Eric Lai <ericllai(a)google.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Yidi Lin <yidilin(a)google.com>
Gerrit-Comment-Date: Fri, 03 Nov 2023 00:55:26 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Arthur Heymans, Paul Menzel, Yidi Lin.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/78798?usp=email )
Change subject: commonlib: Add GCD function
......................................................................
Patch Set 5: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/78798?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I21819cda4299b3809b8ca7a95cbdc6a87e4b3481
Gerrit-Change-Number: 78798
Gerrit-PatchSet: 5
Gerrit-Owner: Yidi Lin <yidilin(a)google.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Yidi Lin <yidilin(a)google.com>
Gerrit-Comment-Date: Fri, 03 Nov 2023 00:54:29 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Hung-Te Lin, Kiwi Liu, Yu-Ping Wu.
Hello Hung-Te Lin, Yidi Lin, Yu-Ping Wu,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/78801?usp=email
to look at the new patch set (#13).
Change subject: soc/mediatek/mt8188: Support loading BL32 image from rootfs
......................................................................
soc/mediatek/mt8188: Support loading BL32 image from rootfs
This patch adds compilation flags to BL31 to support loading
BL32 image from rootfs. This patch also reserves 80MB memory
space for running BL32 image.
BUG=b:246837563
TEST=make # select geralt
Change-Id: Ic38c8beb59c090ae56c5be6821dd8625435609e9
Signed-off-by: Kiwi Liu <kiwi.liu(a)mediatek.com>
---
M src/soc/mediatek/mt8188/Kconfig
M src/soc/mediatek/mt8188/Makefile.inc
M src/soc/mediatek/mt8188/soc.c
3 files changed, 7 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/78801/13
--
To view, visit https://review.coreboot.org/c/coreboot/+/78801?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ic38c8beb59c090ae56c5be6821dd8625435609e9
Gerrit-Change-Number: 78801
Gerrit-PatchSet: 13
Gerrit-Owner: Kiwi Liu <kiwi.liu(a)mediatek.corp-partner.google.com>
Gerrit-Reviewer: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Reviewer: Yidi Lin <yidilin(a)google.com>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Attention: Kiwi Liu <kiwi.liu(a)mediatek.corp-partner.google.com>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Anjaneya "Reddy" Chagam, Jonathan Zhang, Shuo Liu.
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/78787?usp=email )
Change subject: doc/soc/intel/xeon_sp: Add Xeon Scalable processor coreboot community preview guide
......................................................................
Patch Set 5:
(2 comments)
Patchset:
PS5:
Thanks for making your efforts visible to the community!
File Documentation/soc/intel/xeon_sp/community_preview_guide.md:
https://review.coreboot.org/c/coreboot/+/78787/comment/bf46f372_88b69df6 :
PS5, Line 43: CONFIG_FSP_I_FILE='<path of FSP-I binary>'
Most of the documentation is describing the general build process for coreboot. I noticed this line and I'm not aware of any FSP-I binary for existing platforms.
Please give an overview about this binary, e.g. what is it, why is it needed, is it optional etc etc.
Thanks!
--
To view, visit https://review.coreboot.org/c/coreboot/+/78787?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ie2ffc1722a4a26d6039b6642efa95bf072d896ad
Gerrit-Change-Number: 78787
Gerrit-PatchSet: 5
Gerrit-Owner: Shuo Liu <shuo.liu(a)intel.com>
Gerrit-Reviewer: Anjaneya "Reddy" Chagam <anjaneya.chagam(a)intel.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Reviewer: Jonathan Zhang <jon.zhixiong.zhang(a)gmail.com>
Gerrit-Reviewer: Shuo Liu <shuo.liu(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Chen, Gang C <gang.c.chen(a)intel.com>
Gerrit-CC: Jincheng Li <jincheng.li(a)intel.com>
Gerrit-Attention: Anjaneya "Reddy" Chagam <anjaneya.chagam(a)intel.com>
Gerrit-Attention: Jonathan Zhang <jon.zhixiong.zhang(a)gmail.com>
Gerrit-Attention: Shuo Liu <shuo.liu(a)intel.com>
Gerrit-Comment-Date: Fri, 03 Nov 2023 00:13:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Hung-Te Lin, Kiwi Liu, Yu-Ping Wu.
Hello Hung-Te Lin, Yidi Lin, Yu-Ping Wu,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/78801?usp=email
to look at the new patch set (#11).
Change subject: soc/mediatek/mt8188: Support loading BL32 image from rootfs
......................................................................
soc/mediatek/mt8188: Support loading BL32 image from rootfs
This patch adds compilation flags to BL31 to support loading BL32 image from rootfs. This patch also reserves 80MB memory space for running BL32 image.
BUG=b:246837563
TEST=make # select geralt
Change-Id: Ic38c8beb59c090ae56c5be6821dd8625435609e9
Signed-off-by: Kiwi Liu <kiwi.liu(a)mediatek.com>
---
M src/soc/mediatek/mt8188/Kconfig
M src/soc/mediatek/mt8188/Makefile.inc
M src/soc/mediatek/mt8188/soc.c
3 files changed, 6 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/78801/11
--
To view, visit https://review.coreboot.org/c/coreboot/+/78801?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ic38c8beb59c090ae56c5be6821dd8625435609e9
Gerrit-Change-Number: 78801
Gerrit-PatchSet: 11
Gerrit-Owner: Kiwi Liu <kiwi.liu(a)mediatek.corp-partner.google.com>
Gerrit-Reviewer: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Reviewer: Yidi Lin <yidilin(a)google.com>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Attention: Kiwi Liu <kiwi.liu(a)mediatek.corp-partner.google.com>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Hung-Te Lin, Kiwi Liu, Yu-Ping Wu.
Hello Hung-Te Lin, Yidi Lin, Yu-Ping Wu,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/78801?usp=email
to look at the new patch set (#10).
Change subject: soc/mediatek/mt8188: Support loading BL32 image from rootfs
......................................................................
soc/mediatek/mt8188: Support loading BL32 image from rootfs
For HW DRM on ARM we want to load the BL32 image from the rootfs rather than including it in the firmware.
This commit is for loading of BL32 image from rootfs.
BUG=b:246837563
TEST=make # select geralt
Change-Id: Ic38c8beb59c090ae56c5be6821dd8625435609e9
Signed-off-by: Kiwi Liu <kiwi.liu(a)mediatek.com>
---
M src/soc/mediatek/mt8188/Kconfig
M src/soc/mediatek/mt8188/Makefile.inc
M src/soc/mediatek/mt8188/soc.c
3 files changed, 6 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/78801/10
--
To view, visit https://review.coreboot.org/c/coreboot/+/78801?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ic38c8beb59c090ae56c5be6821dd8625435609e9
Gerrit-Change-Number: 78801
Gerrit-PatchSet: 10
Gerrit-Owner: Kiwi Liu <kiwi.liu(a)mediatek.corp-partner.google.com>
Gerrit-Reviewer: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Reviewer: Yidi Lin <yidilin(a)google.com>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Attention: Kiwi Liu <kiwi.liu(a)mediatek.corp-partner.google.com>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Benjamin Doron, Lean Sheng Tan, Martin L Roth, Sean Rhodes, Stefan Reinauer.
Matt DeVillier has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/78636?usp=email )
Change subject: payloads/edk2: Remove the warning about edk2/master not working
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
> Is this just the commit that happened to be tested? This is just printed for debugging, I can't real […]
there were a series of commits reworking the MTRR code, and this was the last one in the series, which I suspect why it was chosen. Ref:
https://github.com/tianocore/edk2/commits/c4fdec0a83d69bd0399b1b4351fa9c3af…
--
To view, visit https://review.coreboot.org/c/coreboot/+/78636?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I8350f5114445d2608861ef6e807f958e598dfe07
Gerrit-Change-Number: 78636
Gerrit-PatchSet: 2
Gerrit-Owner: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Reviewer: Benjamin Doron <benjamin.doron00(a)gmail.com>
Gerrit-Reviewer: Lean Sheng Tan <sheng.tan(a)9elements.com>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Attention: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Attention: Benjamin Doron <benjamin.doron00(a)gmail.com>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Lean Sheng Tan <sheng.tan(a)9elements.com>
Gerrit-Comment-Date: Thu, 02 Nov 2023 23:58:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Benjamin Doron <benjamin.doron00(a)gmail.com>
Gerrit-MessageType: comment
Attention is currently required from: Jakub Czapiga, Yu-Ping Wu.
Hello Jakub Czapiga, Yu-Ping Wu,
I'd like you to do a code review.
Please visit
https://review.coreboot.org/c/coreboot/+/78904?usp=email
to review the following change.
Change subject: fmap: Eliminate some impossible code paths
......................................................................
fmap: Eliminate some impossible code paths
When the FMAP cache is enabled, it cannot fail in pre-RAM stages unless
flash I/O in general doesn't work. Therefore, it is unnecessary and a
waste of binary size to also link a fallback path for this case.
Similarly, once the cache is written to CAR/SRAM/CBMEM there should be
no way for it to become magically corrupted between boot stages. Many
other parts of coreboot blindly assume that persistent memory stays
valid between stages so there is no reason why this code should link in
extra fallback paths in case it doesn't.
This saves a little over 200 bytes per affected (uncompressed) stage on
aarch64.
Change-Id: I7b8251dd6b34fe4f63865ebc44b9a8a103f32a57
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
---
M src/lib/fmap.c
1 file changed, 11 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/78904/1
diff --git a/src/lib/fmap.c b/src/lib/fmap.c
index 62453ed..b63d5a5 100644
--- a/src/lib/fmap.c
+++ b/src/lib/fmap.c
@@ -31,8 +31,12 @@
static int verify_fmap(const struct fmap *fmap)
{
- if (memcmp(fmap->signature, FMAP_SIGNATURE, sizeof(fmap->signature)))
+ if (memcmp(fmap->signature, FMAP_SIGNATURE, sizeof(fmap->signature))) {
+ if (ENV_INITIAL_STAGE)
+ printk(BIOS_ERR, "FMAP missing or corrupted at offset 0x%x!\n",
+ FMAP_OFFSET);
return -1;
+ }
static bool done = false;
if (!CONFIG(CBFS_VERIFICATION) || !ENV_INITIAL_STAGE || done)
@@ -82,9 +86,8 @@
if (!verify_fmap(fmap))
goto register_cache;
- printk(BIOS_ERR, "FMAP cache corrupted?!\n");
- if (CONFIG(TOCTOU_SAFETY))
- die("TOCTOU safety relies on FMAP cache");
+ /* This shouldn't happen, so no point providing a fallback path here. */
+ die("FMAP cache corrupted?!\n");
}
/* In case we fail below, make sure the cache is invalid. */
@@ -118,6 +121,10 @@
if (region_device_sz(&fmap_cache))
return rdev_chain_full(fmrd, &fmap_cache);
+ /* Cache setup in pre-RAM stages can't fail, unless flash I/O in general failed. */
+ if (!CONFIG(NO_FMAP_CACHE) && ENV_ROMSTAGE_OR_BEFORE)
+ return -1;
+
boot_device_init();
boot = boot_device_ro();
@@ -130,8 +137,6 @@
return -1;
if (verify_fmap(fmap)) {
- printk(BIOS_ERR, "FMAP missing or corrupted at offset 0x%zx!\n",
- offset);
rdev_munmap(boot, fmap);
return -1;
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/78904?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I7b8251dd6b34fe4f63865ebc44b9a8a103f32a57
Gerrit-Change-Number: 78904
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Jakub Czapiga <czapiga(a)google.com>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Attention: Jakub Czapiga <czapiga(a)google.com>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-MessageType: newchange
Attention is currently required from: Jakub Czapiga, Yu-Ping Wu.
Hello Jakub Czapiga, Yu-Ping Wu,
I'd like you to do a code review.
Please visit
https://review.coreboot.org/c/coreboot/+/78903?usp=email
to review the following change.
Change subject: fmap: Die immediately on verification failure
......................................................................
fmap: Die immediately on verification failure
A recent security audit has exposed a TOCTOU risk in the FMAP
verification code: if the flash returns a tampered FMAP during the first
setup_preram_cache(), we will abort generating the cache but only after
already filling the persistent CAR/SRAM region with the tampered
version. Then we will fall back into the direct access path, which could
succeed if the flash now returns the original valid FMAP. In later
stages, we will just use the data from the persistent CAR/SRAM region as
long as it looks like an FMAP without verifying the hash again (because
the hash is only linked into the initial stage).
This patch fixes the issue by just calling die() immediately if FMAP
hash verification fails. When the verification fails, there's no
recourse anyway -- if we're not dying here we would be dying in
cbfs_get_boot_device() instead. There is no legitimate scenario where
it would still be possible to continue booting after this hash
verification fails.
Change-Id: I59ec91c3e5a59fdd960b0ba54ae5f15ddb850480
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
---
M src/lib/fmap.c
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/78903/1
diff --git a/src/lib/fmap.c b/src/lib/fmap.c
index 3889dd5..62453ed 100644
--- a/src/lib/fmap.c
+++ b/src/lib/fmap.c
@@ -38,8 +38,10 @@
if (!CONFIG(CBFS_VERIFICATION) || !ENV_INITIAL_STAGE || done)
return 0; /* Only need to check hash in first stage. */
+ /* On error we need to die right here, lest we risk a TOCTOU attack where the cache is
+ filled with a tampered FMAP but the later fallback path is fed a valid one. */
if (metadata_hash_verify_fmap(fmap, FMAP_SIZE) != VB2_SUCCESS)
- return -1;
+ die("FMAP verification failure");
done = true;
return 0;
--
To view, visit https://review.coreboot.org/c/coreboot/+/78903?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I59ec91c3e5a59fdd960b0ba54ae5f15ddb850480
Gerrit-Change-Number: 78903
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Jakub Czapiga <czapiga(a)google.com>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Attention: Jakub Czapiga <czapiga(a)google.com>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-MessageType: newchange