Attention is currently required from: Andrey Pronin, Yu-Ping Wu.
Miriam Polzer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59097 )
Change subject: security/vboot: Add NVRAM counter for TPM 2.0
......................................................................
Patch Set 6:
(1 comment)
Patchset:
PS6:
Here's what I managed to do for testing:
- None of the devices we have seems to work on ToT firmware, so I merged the change back to dedede branch.
- I can't flash cr50, so I can't remove the fw space. Instead I changed the code slightly to always create the new space, that looked good.
All in all I'm not very happy but that probably suffices...
--
To view, visit https://review.coreboot.org/c/coreboot/+/59097
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I511dba3b3461713ce20fb2bda9fced0fee6517e1
Gerrit-Change-Number: 59097
Gerrit-PatchSet: 6
Gerrit-Owner: Miriam Polzer <mpolzer(a)google.com>
Gerrit-Reviewer: Andrey Pronin <apronin(a)chromium.org>
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: Andrey Pronin <apronin(a)chromium.org>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Comment-Date: Fri, 19 Nov 2021 14:05:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Jakub Czapiga has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59496 )
Change subject: libpayload/tests: Fix mocks __real_<func> symbol creation
......................................................................
libpayload/tests: Fix mocks __real_<func> symbol creation
There were escape backslashes around regular expression passed to grep.
Because of that, grep was returning empty results as a consequence of
pattern mismatch, and thus symbols pointing to original functions were
not created correctly.
Change-Id: I751109735b6c56824df9a560ae989bf062a0e9a6
Signed-off-by: Jakub Czapiga <jacz(a)semihalf.com>
---
M payloads/libpayload/tests/Makefile.inc
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/96/59496/1
diff --git a/payloads/libpayload/tests/Makefile.inc b/payloads/libpayload/tests/Makefile.inc
index e4babb1..ba465b0 100644
--- a/payloads/libpayload/tests/Makefile.inc
+++ b/payloads/libpayload/tests/Makefile.inc
@@ -140,7 +140,7 @@
objcopy_wrap_flags=''; \
for sym in $$($(1)-mocks); do \
sym_line="$$$$($(HOSTOBJDUMP) -t $$@.orig \
- | grep -E \"[0-9a-fA-F]+\\s+w\\s+F\\s+.*\\s$$$$sym$$$$\")"; \
+ | grep -E "[0-9a-fA-F]+\\s+w\\s+F\\s+.*\\s+$$$$sym$$$$")"; \
if [ ! -z "$$$$sym_line" ] ; then \
addr="$$$$(echo \"$$$$sym_line\" | awk '{ print $$$$1 }')"; \
section="$$$$(echo \"$$$$sym_line\" | awk '{ print $$$$(NF - 2) }')"; \
--
To view, visit https://review.coreboot.org/c/coreboot/+/59496
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I751109735b6c56824df9a560ae989bf062a0e9a6
Gerrit-Change-Number: 59496
Gerrit-PatchSet: 1
Gerrit-Owner: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-MessageType: newchange
Jakub Czapiga has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59493 )
Change subject: libpayload/tests: remove tests/include/mocks include path
......................................................................
libpayload/tests: remove tests/include/mocks include path
Some files in tests/include/mocks might have the same name as main
libpayload include files. Remove this path from default includes to
force addition of mocks/ prefix in include paths. This will help
avoiding name clashes and will also make mock headers visible.
Change-Id: I4baa07472f0379d56423cf7152b1ecc9a4824539
Signed-off-by: Jakub Czapiga <jacz(a)semihalf.com>
---
M payloads/libpayload/tests/Makefile.inc
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/59493/1
diff --git a/payloads/libpayload/tests/Makefile.inc b/payloads/libpayload/tests/Makefile.inc
index 9ae8442..e4babb1 100644
--- a/payloads/libpayload/tests/Makefile.inc
+++ b/payloads/libpayload/tests/Makefile.inc
@@ -37,7 +37,7 @@
TEST_CFLAGS += -I$(dir $(TEST_KCONFIG_AUTOHEADER))
# Test specific includes
-TEST_CFLAGS += -I$(testsrc)/include -I$(testsrc)/include/mocks
+TEST_CFLAGS += -I$(testsrc)/include
TEST_CFLAGS += -I$(cmockasrc)/include
# Minimal subset of warnings and errors. Tests can be less strict than actual build.
--
To view, visit https://review.coreboot.org/c/coreboot/+/59493
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I4baa07472f0379d56423cf7152b1ecc9a4824539
Gerrit-Change-Number: 59493
Gerrit-PatchSet: 1
Gerrit-Owner: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-MessageType: newchange
Jakub Czapiga has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59492 )
Change subject: libpayload: Add libpayload_boot_device_read function
......................................................................
libpayload: Add libpayload_boot_device_read function
This patch adds a new way of implementing flash access for libpayload.
Until now all reads had to be performed using cbfs_media, which is
obsolete. From now on all reads should be performed using
libpayload_boot_device_read(). This patch also provides a fallback
implementation of this function using cbfs_media, but it will be removed
in the future together with cbfs_media API.
Change-Id: I1babd2a8414ed9de3ca49903fcb4f036997b5ff3
Signed-off-by: Jakub Czapiga <jacz(a)semihalf.com>
---
A payloads/libpayload/include/boot_device.h
M payloads/libpayload/include/libpayload.h
M payloads/libpayload/libc/Makefile.inc
A payloads/libpayload/libc/boot_device.c
4 files changed, 46 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/92/59492/1
diff --git a/payloads/libpayload/include/boot_device.h b/payloads/libpayload/include/boot_device.h
new file mode 100644
index 0000000..c2cf105
--- /dev/null
+++ b/payloads/libpayload/include/boot_device.h
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: BSD-3-Clause OR GPS-2.0-or-later */
+
+#ifndef _BOOT_DEVICE_H
+#define _BOOT_DEVICE_H
+
+#include <stddef.h>
+
+/**
+ * This is a boot device access function, which is used by libpayload to read data from
+ * the flash memory (or other boot device). It has to be implemented by payloads using
+ * FlashMap and libCBFS.
+ *
+ * @param buf The output buffer to which the data should be written to.
+ * @param offset Absolute offset in bytes of the requested boot device memory area. Not aligned.
+ * @param size Size in bytes of the requested boot device memory area. Not aligned.
+ *
+ * @returns Number of bytes returned to the buffer, or negative value on error. Typically should
+ * be equal to the `size`, and not aligned forcefully.
+ */
+ssize_t libpayload_boot_device_read(void *buf, size_t offset, size_t size);
+
+#endif /* _BOOT_DEVICE_H */
diff --git a/payloads/libpayload/include/libpayload.h b/payloads/libpayload/include/libpayload.h
index e08d211..42748e3 100644
--- a/payloads/libpayload/include/libpayload.h
+++ b/payloads/libpayload/include/libpayload.h
@@ -64,6 +64,7 @@
#include <sysinfo.h>
#include <pci.h>
#include <archive.h>
+#include <boot_device.h>
/* Double-evaluation unsafe min/max, for bitfields and outside of functions */
#define __CMP_UNSAFE(a, b, op) ((a) op (b) ? (a) : (b))
diff --git a/payloads/libpayload/libc/Makefile.inc b/payloads/libpayload/libc/Makefile.inc
index f9006ae..74b710e 100644
--- a/payloads/libpayload/libc/Makefile.inc
+++ b/payloads/libpayload/libc/Makefile.inc
@@ -39,3 +39,4 @@
libc-$(CONFIG_LP_LIBC) += coreboot.c
libc-$(CONFIG_LP_LIBC) += fmap.c
libc-$(CONFIG_LP_LIBC) += fpmath.c
+libc-$(CONFIG_LP_LIBC) += boot_device.c
diff --git a/payloads/libpayload/libc/boot_device.c b/payloads/libpayload/libc/boot_device.c
new file mode 100644
index 0000000..17bad0d
--- /dev/null
+++ b/payloads/libpayload/libc/boot_device.c
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: BSD-3-clause OR GPL-2.0-or-later */
+
+#include <boot_device.h>
+#include <cbfs.h>
+#include <stddef.h>
+
+/* Default fallback implementation using cbfs_media */
+__attribute__((weak)) ssize_t libpayload_boot_device_read(void *buf, size_t offset, size_t size)
+{
+ struct cbfs_media default_media;
+ struct cbfs_media *media = &default_media;
+ ssize_t ret = 0;
+
+ if (init_default_cbfs_media(media) != 0)
+ return 0;
+
+ media->open(media);
+ ret = media->read(media, buf, offset, size);
+ media->close(media);
+
+ return ret;
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/59492
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I1babd2a8414ed9de3ca49903fcb4f036997b5ff3
Gerrit-Change-Number: 59492
Gerrit-PatchSet: 1
Gerrit-Owner: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-MessageType: newchange
Attention is currently required from: Nico Huber, Stefan Reinauer, Angel Pons, Arthur Heymans, Michael Niewöhner, Patrick Rudolph.
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59289 )
Change subject: util/inteltool/gpio.c: Correct register name
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/59289/comment/ec6c685a_de18a460
PS1, Line 9: ICH10 and 6-series PCH datasheets
Please add the document numbers below.
--
To view, visit https://review.coreboot.org/c/coreboot/+/59289
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I44cc41843c9f7cd0796bd198fb89447d787f155a
Gerrit-Change-Number: 59289
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Christian Walter <christian.walter(a)9elements.com>
Gerrit-Reviewer: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-Attention: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Comment-Date: Fri, 19 Nov 2021 13:56:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment