Attention is currently required from: Julius Werner.
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/59497
to look at the new patch set (#3).
Change subject: libpayload: Implement new CBFS access API
......................................................................
libpayload: Implement new CBFS access API
Change-Id: I00da0658dbac0cddf92ad55611def947932d23c7
Signed-off-by: Jakub Czapiga <jacz(a)semihalf.com>
---
M payloads/libpayload/Kconfig
M payloads/libpayload/Makefile
M payloads/libpayload/Makefile.inc
M payloads/libpayload/include/cbfs.h
M payloads/libpayload/include/cbfs_core.h
A payloads/libpayload/include/cbfs_glue.h
A payloads/libpayload/include/cbfs_legacy.h
A payloads/libpayload/libcbfs/Kconfig
M payloads/libpayload/libcbfs/Makefile.inc
M payloads/libpayload/libcbfs/cbfs.c
M payloads/libpayload/libcbfs/cbfs_core.c
A payloads/libpayload/libcbfs/cbfs_mcache.c
M payloads/libpayload/tests/Makefile.inc
A payloads/libpayload/tests/include/mocks/cbfs_util.h
A payloads/libpayload/tests/libcbfs/Makefile.inc
A payloads/libpayload/tests/libcbfs/cbfs-lookup-test.c
A payloads/libpayload/tests/mocks/cbfs_file_mock.c
A payloads/libpayload/tests/mocks/die.c
18 files changed, 1,700 insertions(+), 179 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/97/59497/3
--
To view, visit https://review.coreboot.org/c/coreboot/+/59497
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I00da0658dbac0cddf92ad55611def947932d23c7
Gerrit-Change-Number: 59497
Gerrit-PatchSet: 3
Gerrit-Owner: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Julius Werner <jwerner(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Julius Werner <jwerner(a)chromium.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: Julius Werner.
Jakub Czapiga has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59497 )
Change subject: libpayload: Implement new CBFS access API
......................................................................
Patch Set 2:
(15 comments)
File payloads/libpayload/include/cbfs.h:
https://review.coreboot.org/c/coreboot/+/59497/comment/fffbfcce_01d5fcf2
PS1, Line 56: **********************************************************************************************/
> I think it might be easier (for review and just generally keeping track of things) to just put all o […]
Done. The legacy API is now in the include/cbfs_legacy.h, and it is included at the bootom of include/cbfs.h
https://review.coreboot.org/c/coreboot/+/59497/comment/f85305c5_41677d0d
PS1, Line 77: * cbfs_unmap() after it is done using the mapping to free up the memory, if possible.
> Rather than duplicate all this, maybe just refer to the coreboot header for documentation?
Done
https://review.coreboot.org/c/coreboot/+/59497/comment/2342a0c4_c8239569
PS1, Line 79: * void cbfs_alloc(char *name, cbfs_allocator_t allocator, void *arg, size_t *size_out): Loads
> We don't have that one here.
Done
File payloads/libpayload/include/cbfs_core.h:
https://review.coreboot.org/c/coreboot/+/59497/comment/76a3e712_28f27ec1
PS1, Line 53: /* This function needs to be implemented to use _cbfs_alloc() based API */
> What does this mean? This is all supposed to map back to libpayload_boot_device_read(), of course.
I forgot to remove it. Done :)
File payloads/libpayload/libcbfs/cbfs.c:
https://review.coreboot.org/c/coreboot/+/59497/comment/63a4d8aa_584e6721
PS1, Line 58: if (CONFIG(LP_NO_CBFS_MCACHE))
> I'm not sure it's worth having a Kconfig here, I'd just say if the mcache exists in CBMEM it should […]
Hmm. It seems reasonable. If one does not want the CBFS MCache, then they can disable it in the coreboot config.
https://review.coreboot.org/c/coreboot/+/59497/comment/090a0be6_c3d39b21
PS1, Line 65: (void *)
> Use phys_to_virt() whenever accessing pointers from lib_sysinfo (some payloads relocate themselves a […]
Done
https://review.coreboot.org/c/coreboot/+/59497/comment/8822b0be_77237f2a
PS1, Line 80: cbfs_get_boot_device(true);
> This was only needed for mcache building in coreboot, shouldn't apply here.
Done
https://review.coreboot.org/c/coreboot/+/59497/comment/ea647100_d9d99fa5
PS1, Line 83: cbfs_dev_size
> nit: a bit odd you wouldn't just use rw.dev. […]
Done
https://review.coreboot.org/c/coreboot/+/59497/comment/45d8b0d3_395e4ae0
PS1, Line 84: if (lib_sysinfo.cbfs_offset != 0 && lib_sysinfo.cbfs_size != 0) {
> This should never fail. If vboot is disabled in coreboot, these will just point to the RO CBFS.
Done
https://review.coreboot.org/c/coreboot/+/59497/comment/a2d82992_cb385db7
PS1, Line 92: cbfs_boot_device_find_mcache(&rw, false);
> Shouldn't this be inside the !cbfs_dev_size() check (mcache would also be cached already if the rest […]
Done
https://review.coreboot.org/c/coreboot/+/59497/comment/816884ea_133d8d24
PS1, Line 96: cbfs_boot_device_find_mcache(&ro, false);
> Same here. […]
The MCache will not "re-generate" on every call. This function check if it is set, and if not, then it performs its actions to find the MCache. But you are right, this call should be below the ro.dev.* sets.
https://review.coreboot.org/c/coreboot/+/59497/comment/aa68a26b_787d811d
PS1, Line 102: uint32_t size = 0;
> nit: Don't really need these, can just pass pointers &ro.dev.offset / &ro.dev.size directly.
Done
https://review.coreboot.org/c/coreboot/+/59497/comment/89fc3431_399b2b0f
PS1, Line 105: die("Cannot locate primary CBFS");
> This should probably be an error that's passed back up to the caller for libpayload, rather than die […]
Done
https://review.coreboot.org/c/coreboot/+/59497/comment/fb979c13_afd9e60d
PS1, Line 131: cbfs_err_t cbfs_walk(cbfs_dev_t dev,
> No, sorry, not like this. […]
Ok, so I did it by changing the macro in the main Makefile. I didn't want to create symlink to the commonlib/bsd in the libpayload, because I am nos sure, what policy is there on weak/hard links to directories.
Now commonlib will be compiled under payloads/libpayload/build/<abs-path-to-commonlib/bsd/*.c>. Currently I do not have another idea, how to solve it in a different way.
File payloads/libpayload/tests/libcbfs/Makefile.inc:
PS1:
> license
Done
--
To view, visit https://review.coreboot.org/c/coreboot/+/59497
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I00da0658dbac0cddf92ad55611def947932d23c7
Gerrit-Change-Number: 59497
Gerrit-PatchSet: 2
Gerrit-Owner: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Julius Werner <jwerner(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Julius Werner <jwerner(a)chromium.org>
Gerrit-Comment-Date: Fri, 26 Nov 2021 15:37:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Julius Werner <jwerner(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Julius Werner.
Jakub Czapiga has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59494 )
Change subject: libpayload/libc/fmap: Implement new FlashMap API
......................................................................
Patch Set 2:
(1 comment)
File payloads/libpayload/libc/fmap.c:
https://review.coreboot.org/c/coreboot/+/59494/comment/f8194aff_92c3e78d
PS1, Line 36: int fmap_region_by_name(const uint32_t fmap_offset, const char * const name,
> I don't think we want to keep this API, it's also kinda crufty. […]
Done
--
To view, visit https://review.coreboot.org/c/coreboot/+/59494
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Idbf9016ce73aa58e17f3ee19920ab83dc6c25abb
Gerrit-Change-Number: 59494
Gerrit-PatchSet: 2
Gerrit-Owner: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Julius Werner <jwerner(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Julius Werner <jwerner(a)chromium.org>
Gerrit-Comment-Date: Fri, 26 Nov 2021 15:37:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Julius Werner <jwerner(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Julius Werner.
Jakub Czapiga has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59492 )
Change subject: libpayload: Add libpayload_boot_device_read function
......................................................................
Patch Set 2:
(2 comments)
File payloads/libpayload/include/boot_device.h:
https://review.coreboot.org/c/coreboot/+/59492/comment/5fd9e608_4c6d27e4
PS1, Line 10: It has to be implemented by payloads using
: * FlashMap and libCBFS.
> nit: There's a bit of ambiguity in this sentence, I'd reword to "by payloads that want to use FMAP o […]
Done
File payloads/libpayload/include/libpayload.h:
https://review.coreboot.org/c/coreboot/+/59492/comment/d3d50e43_6fc3cfe5
PS1, Line 67: #include <boot_device.h>
> nit: not sure this needs to be in here (it's not going to be called by payload code itself, usually)
OH, true. Payload can just implement function from this header. Thanks :)
--
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: 2
Gerrit-Owner: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Julius Werner <jwerner(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Julius Werner <jwerner(a)chromium.org>
Gerrit-Comment-Date: Fri, 26 Nov 2021 15:35:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Julius Werner <jwerner(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Julius Werner.
Jakub Czapiga has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59491 )
Change subject: libpayload: Add CBMEM_IMD_ENTRY support to coreboot tables parser
......................................................................
Patch Set 2:
(2 comments)
File payloads/libpayload/include/cbmem_id.h:
PS1:
> Rather than duplicate this, do we just want to move commonlib/cbmem_id. […]
Please look at: CB:59696
File payloads/libpayload/libc/coreboot.c:
https://review.coreboot.org/c/coreboot/+/59491/comment/466116b4_e2784218
PS1, Line 275: switch (cbmem_entry->id) {
> Could you take this opportunity to convert all the others that currently use lb_cbmem_ref (and call […]
Done
--
To view, visit https://review.coreboot.org/c/coreboot/+/59491
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I5bd02a98ba2631f34014bc0f8e7ebd5a5ddd2321
Gerrit-Change-Number: 59491
Gerrit-PatchSet: 2
Gerrit-Owner: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Julius Werner <jwerner(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Julius Werner <jwerner(a)chromium.org>
Gerrit-Comment-Date: Fri, 26 Nov 2021 15:33:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Julius Werner <jwerner(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Jakub Czapiga.
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59497 )
Change subject: libpayload: Implement new CBFS access API
......................................................................
Patch Set 2:
(2 comments)
File payloads/libpayload/cbfs.h.patch:
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-134505):
https://review.coreboot.org/c/coreboot/+/59497/comment/dd37220f_ce6a0d4a
PS2, Line 7:
trailing whitespace
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-134505):
https://review.coreboot.org/c/coreboot/+/59497/comment/10d49ea1_b8cdec9c
PS2, Line 12:
trailing whitespace
--
To view, visit https://review.coreboot.org/c/coreboot/+/59497
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I00da0658dbac0cddf92ad55611def947932d23c7
Gerrit-Change-Number: 59497
Gerrit-PatchSet: 2
Gerrit-Owner: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Julius Werner <jwerner(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-Comment-Date: Fri, 26 Nov 2021 15:31:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Jakub Czapiga.
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/59497
to look at the new patch set (#2).
Change subject: libpayload: Implement new CBFS access API
......................................................................
libpayload: Implement new CBFS access API
Change-Id: I00da0658dbac0cddf92ad55611def947932d23c7
Signed-off-by: Jakub Czapiga <jacz(a)semihalf.com>
---
M payloads/libpayload/Kconfig
M payloads/libpayload/Makefile
M payloads/libpayload/Makefile.inc
A payloads/libpayload/cbfs.h.patch
M payloads/libpayload/include/cbfs.h
M payloads/libpayload/include/cbfs_core.h
A payloads/libpayload/include/cbfs_glue.h
A payloads/libpayload/include/cbfs_legacy.h
A payloads/libpayload/libcbfs/Kconfig
M payloads/libpayload/libcbfs/Makefile.inc
M payloads/libpayload/libcbfs/cbfs.c
M payloads/libpayload/libcbfs/cbfs_core.c
A payloads/libpayload/libcbfs/cbfs_mcache.c
M payloads/libpayload/tests/Makefile.inc
A payloads/libpayload/tests/include/mocks/cbfs_util.h
A payloads/libpayload/tests/libcbfs/Makefile.inc
A payloads/libpayload/tests/libcbfs/cbfs-lookup-test.c
A payloads/libpayload/tests/mocks/cbfs_file_mock.c
A payloads/libpayload/tests/mocks/die.c
19 files changed, 1,818 insertions(+), 179 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/97/59497/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/59497
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I00da0658dbac0cddf92ad55611def947932d23c7
Gerrit-Change-Number: 59497
Gerrit-PatchSet: 2
Gerrit-Owner: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Julius Werner <jwerner(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Jakub Czapiga.
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/59494
to look at the new patch set (#2).
Change subject: libpayload/libc/fmap: Implement new FlashMap API
......................................................................
libpayload/libc/fmap: Implement new FlashMap API
This patch introduces new FlashMap API, the fmap_locate_area().
This function requires implementation of libpayload_boot_device_read(),
and either lib_sysinfo.fmap_cache or lib_sysinfo.fmap_offset to be set.
This function uses its own cache in RAM to limit flash reads to maximum
of two calls to libpayload_boot_device_read().
Change-Id: Idbf9016ce73aa58e17f3ee19920ab83dc6c25abb
Signed-off-by: Jakub Czapiga <jacz(a)semihalf.com>
---
A payloads/libpayload/include/fmap.h
M payloads/libpayload/include/libpayload.h
M payloads/libpayload/libc/fmap.c
A payloads/libpayload/tests/include/mocks/boot_device.h
A payloads/libpayload/tests/libc/Makefile.inc
A payloads/libpayload/tests/libc/fmap_locate_area-test.c
A payloads/libpayload/tests/mocks/boot_device.c
7 files changed, 358 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/59494/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/59494
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Idbf9016ce73aa58e17f3ee19920ab83dc6c25abb
Gerrit-Change-Number: 59494
Gerrit-PatchSet: 2
Gerrit-Owner: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Julius Werner <jwerner(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-MessageType: newpatchset