Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/59876 )
Change subject: lib/cbfs: Disable cbfs_preload in romstage when VBOOT_STARTS_IN_ROMSTAGE
......................................................................
lib/cbfs: Disable cbfs_preload in romstage when VBOOT_STARTS_IN_ROMSTAGE
Preloading files before vboot runs and using them after vboot has
finished will result in the wrong files getting used. Disable
cbfs_preload to avoid this behavior.
BUG=b:179699789
TEST=none
Signed-off-by: Raul E Rangel <rrangel(a)chromium.org>
Change-Id: I7698b481a73fb24eecf4c810ff8be8b6826528ca
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59876
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Julius Werner <jwerner(a)chromium.org>
---
M src/lib/cbfs.c
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Julius Werner: Looks good to me, approved
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c
index d2a4b84..5bbbe6a 100644
--- a/src/lib/cbfs.c
+++ b/src/lib/cbfs.c
@@ -307,6 +307,10 @@
if (!CONFIG(CBFS_PRELOAD))
dead_code();
+ /* We don't want to cross the vboot boundary */
+ if (ENV_ROMSTAGE && CONFIG(VBOOT_STARTS_IN_ROMSTAGE))
+ return;
+
DEBUG("%s(name='%s')\n", __func__, name);
if (_cbfs_boot_lookup(name, force_ro, &mdata, &rdev))
--
To view, visit https://review.coreboot.org/c/coreboot/+/59876
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I7698b481a73fb24eecf4c810ff8be8b6826528ca
Gerrit-Change-Number: 59876
Gerrit-PatchSet: 2
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: merged
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/59550 )
Change subject: rules.h, thread.h, lib/cbfs: Add ENV_STAGE_SUPPORTS_COOP
......................................................................
rules.h, thread.h, lib/cbfs: Add ENV_STAGE_SUPPORTS_COOP
This change consolidates the COOP rules. Co-op in theory works in all
x86 stages now, but it hasn't been enabled yet.
BUG=b:179699789
TEST=Boot guybrush to OS and verify preloads still work
Signed-off-by: Raul E Rangel <rrangel(a)chromium.org>
Change-Id: I1197406d1d36391998b08e3076146bb2fff59d00
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59550
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Julius Werner <jwerner(a)chromium.org>
---
M src/include/rules.h
M src/include/thread.h
M src/lib/cbfs.c
3 files changed, 9 insertions(+), 2 deletions(-)
Approvals:
build bot (Jenkins): Verified
Julius Werner: Looks good to me, approved
diff --git a/src/include/rules.h b/src/include/rules.h
index d08929c..02b55c5 100644
--- a/src/include/rules.h
+++ b/src/include/rules.h
@@ -303,6 +303,13 @@
/* When set <arch/smp/spinlock.h> is included for the spinlock implementation. */
#define ENV_STAGE_SUPPORTS_SMP (CONFIG(SMP) && STAGE_HAS_SPINLOCKS)
+#if ENV_X86 && CONFIG(COOP_MULTITASKING) && (ENV_RAMSTAGE || ENV_ROMSTAGE)
+/* TODO: Enable in all x86 stages */
+#define ENV_STAGE_SUPPORTS_COOP 1
+#else
+#define ENV_STAGE_SUPPORTS_COOP 0
+#endif
+
/**
* For pre-DRAM stages and post-CAR always build with simple device model, ie.
* PCI, PNP and CPU functions operate without use of devicetree. The reason
diff --git a/src/include/thread.h b/src/include/thread.h
index 19b69fa..4f10782 100644
--- a/src/include/thread.h
+++ b/src/include/thread.h
@@ -38,7 +38,7 @@
/* Waits until the thread has terminated and returns the error code */
enum cb_err thread_join(struct thread_handle *handle);
-#if (ENV_RAMSTAGE || ENV_ROMSTAGE) && CONFIG(COOP_MULTITASKING)
+#if ENV_STAGE_SUPPORTS_COOP
struct thread {
int id;
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c
index 3a044f7..d2a4b84 100644
--- a/src/lib/cbfs.c
+++ b/src/lib/cbfs.c
@@ -359,7 +359,7 @@
enum cb_err err;
struct cbfs_preload_context *context;
- if (!CONFIG(CBFS_PRELOAD) || (!ENV_RAMSTAGE && !ENV_ROMSTAGE))
+ if (!CONFIG(CBFS_PRELOAD) || !ENV_STAGE_SUPPORTS_COOP)
return CB_ERR_ARG;
context = find_cbfs_preload_context(name);
--
To view, visit https://review.coreboot.org/c/coreboot/+/59550
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I1197406d1d36391998b08e3076146bb2fff59d00
Gerrit-Change-Number: 59550
Gerrit-PatchSet: 2
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: merged
Attention is currently required from: Felix Singer, Nick Vaccaro, Karthik Ramasubramanian.
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/60060 )
Change subject: mb/google/glados: Move selects from Kconfig.name to Kconfig
......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS3:
> I don't really have a preference either way.
i like having all selects in one kconfig file and not having those split between two files
--
To view, visit https://review.coreboot.org/c/coreboot/+/60060
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ifccf2b3521d84f6a678872bbccf9bf390c25ce37
Gerrit-Change-Number: 60060
Gerrit-PatchSet: 3
Gerrit-Owner: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)google.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Nick Vaccaro <nvaccaro(a)google.com>
Gerrit-Attention: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Comment-Date: Wed, 15 Dec 2021 23:22:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Felix Singer <felixsinger(a)posteo.net>
Comment-In-Reply-To: Raul Rangel <rrangel(a)chromium.org>
Comment-In-Reply-To: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Jakub Czapiga.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/60138 )
Change subject: MAINTAINERS: Add libpayload unit-tests to TESTS section
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/60138
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I09aca01d9bb2624983e0d62628aef617c10eba9c
Gerrit-Change-Number: 60138
Gerrit-PatchSet: 1
Gerrit-Owner: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-Comment-Date: Wed, 15 Dec 2021 23:22:06 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Jakub Czapiga, Jan Dabros, Yu-Ping Wu.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/60080 )
Change subject: libpayload: Enable vboot integration
......................................................................
Patch Set 3:
(7 comments)
File payloads/libpayload/Kconfig:
https://review.coreboot.org/c/coreboot/+/60080/comment/0100d66c_7c584f26
PS3, Line 230: endmenu
Should we put vboot in this menu with the other libraries, maybe?
File payloads/libpayload/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/60080/comment/8923e6eb_b927937b
PS2, Line 82: $(addsuffix .a,$(addprefix $(obj)/,$(libraries)))
> > Doesn't this also ask for an $(obj)/vboot. […]
No, I'm saying there shouldn't be a vboot.a. There should only be vboot_fw.a and tlcl.a. Maybe rather than making `vboot` an extra class, just add the two libraries to libc-objs?
File payloads/libpayload/vboot/Kconfig:
https://review.coreboot.org/c/coreboot/+/60080/comment/c4fc6271_d63ede93
PS3, Line 13: config VBOOT_DEBUG
Forgot to take this out?
https://review.coreboot.org/c/coreboot/+/60080/comment/c9c80a4c_bb558887
PS3, Line 30: This option enables SHA256 implementation using x86 SHA processor extension.
Maybe list the instructions (sha256msg1, sha256msg2, sha256rnds2) like in the coreboot Kconfig, for clarity.
File payloads/libpayload/vboot/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/60080/comment/eb6cb443_6f83a1d9
PS3, Line 12: kconfig-to-binary=$(if $(1),1,0)
(FWIW, this is fine, but the vboot Makefile is also specifically written such that OPTION= and OPTION=y also work as expected... so not really necessary.)
https://review.coreboot.org/c/coreboot/+/60080/comment/9024cb6a_8a706aea
PS3, Line 18: VBOOT_CFLAGS += -I$(abspath $(obj)) -Wno-missing-prototypes
Are these two actually needed? I'm not sure what they're there for in coreboot, but it might be vestigal. We shouldn't add it if things seem to work without.
https://review.coreboot.org/c/coreboot/+/60080/comment/839af0cc_c9332f21
PS3, Line 23: VBOOT_FIRMWARE_ARCH-$(CONFIG_LP_ARCH_ARM64) := arm64
Would be good to add an
ifeq ($(VBOOT_FIRMWARE_ARCH-y,))
$(error ...)
assertion here, in case we ever add more architectures.
--
To view, visit https://review.coreboot.org/c/coreboot/+/60080
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2d9d766a461edaa0081041c020ecf580fd2ca64e
Gerrit-Change-Number: 60080
Gerrit-PatchSet: 3
Gerrit-Owner: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-Reviewer: Jan Dabros <jsd(a)semihalf.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-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-Attention: Jan Dabros <jsd(a)semihalf.com>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Comment-Date: Wed, 15 Dec 2021 23:21:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Jakub Czapiga <jacz(a)semihalf.com>
Comment-In-Reply-To: Julius Werner <jwerner(a)chromium.org>
Gerrit-MessageType: comment