Attention is currently required from: Jakub Czapiga.
Julius Werner 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:
(4 comments)
File payloads/libpayload/include/fmap.h:
https://review.coreboot.org/c/coreboot/+/59494/comment/acf2d7c0_10ac1cc1
PS2, Line 9: lib_sysinfo.fmap_offset and boot device read function
I don't think we need to support the second case? lib_sysinfo.fmap_cache should always exist. (Note that CONFIG_NO_FMAP_CACHE in coreboot only refers to the pre-RAM cache... fmap_setup_cbmem_cache() still runs to create the cache in CBMEM after RAM is up even if that option is disabled. The only way this cache could not exist is if there was some error reading the FMAP in coreboot, and in that case there's probably little point trying to read it from libpayload either.)
https://review.coreboot.org/c/coreboot/+/59494/comment/e6064d5e_0ecbc705
PS2, Line 10: *
nit: missing space. also maybe clarify what is returned on error.
https://review.coreboot.org/c/coreboot/+/59494/comment/b7a2845c_86bfd0d1
PS2, Line 11: int
Should we use cb_err_t here?
File payloads/libpayload/libc/fmap.c:
https://review.coreboot.org/c/coreboot/+/59494/comment/becc5c44_219fb8cf
PS2, Line 113:
Maybe add a comment to make the line between new code and old, deprecated code here clearer.
--
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-Comment-Date: Wed, 01 Dec 2021 00:38:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Patrick Georgi, Jakub Czapiga.
Julius Werner 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/85f1facc_1672803d
PS2, Line 20: libpayload_boot_device_read
> I'm not that happy with the name, especially since it has to be implemented by payloads. […]
I'm okay just calling it boot_device_read() if you prefer that (generally namespacing is nice, but it's not like we're doing that anywhere else in libpayload so I guess there's no point trying to do it here... we also have usb_generic_create() and usb_generic_destroy() as names for functions that need to be implemented by the payload, FWIW).
File payloads/libpayload/libc/boot_device.c:
https://review.coreboot.org/c/coreboot/+/59492/comment/00069e9b_ab3774a0
PS1, Line 8: __attribute__((weak)) ssize_t libpayload_boot_device_read(void *buf, size_t offset, size_t size)
> Ok, I removed this implementation. […]
I'm saying this should be implemented similarly to arch/x86/rom_media.c but not quite with the same code. You can put it in the same file if you want (and then we'll just remove the other stuff when we remove the media API). Basically, I think all this would need to be is:
__attribute__((weak)) ssize_t libpayload_boot_device_read(void *buf, size_t offset, size_t size) {
/* Memory-mapping usually only works for the top 16MB. */
if (!lib_sysinfo.boot_media_size || lib_sysinfo.boot_media_size - offset > 16*MiB)
return -CB_ERR_ARG;
void *ptr = (void *)(uintptr_t)(uint32_t)(0 - lib_sysinfo.boot_media_size + offset);
memcpy(buf, ptr, size);
return size;
}
--
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: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Attention: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-Comment-Date: Wed, 01 Dec 2021 00:31:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Patrick Georgi <patrick(a)coreboot.org>
Comment-In-Reply-To: Jakub Czapiga <jacz(a)semihalf.com>
Comment-In-Reply-To: Julius Werner <jwerner(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Shelley Chen, Ravi kumar.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/55378 )
Change subject: herobrine: Assert gpio for USB_HUB_LDO_EN
......................................................................
Patch Set 55: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/55378
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia94e046f9eb0d3ce593f3445e0203a7391c14de2
Gerrit-Change-Number: 55378
Gerrit-PatchSet: 55
Gerrit-Owner: Ravi kumar <rbokka(a)codeaurora.org>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Shelley Chen <shchen(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Ravi Kumar Bokka <c_rbokka(a)qualcomm.corp-partner.google.com>
Gerrit-CC: Sandeep Maheswaram <sanm(a)codeaurora.org>
Gerrit-Attention: Shelley Chen <shchen(a)google.com>
Gerrit-Attention: Ravi kumar <rbokka(a)codeaurora.org>
Gerrit-Comment-Date: Wed, 01 Dec 2021 00:12:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Jakub Czapiga.
Julius Werner 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: Code-Review+2
(1 comment)
Patchset:
PS2:
Thanks! We can also start removing these from src/lib/coreboot_table.c:add_cbmem_pointers() now, so they actually stop getting generated (probably best to do that in a separate CL so it's easier to revert if needed). I believe ACPI_GNVS, ACPI_CNVS, WIFI_CALIBRATION, FMAP and TYPE_C_INFO were only ever put there for libpayload, so those should be fine to remove. The others are also used by the Linux kernel (CONSOLE, VPD) or util/cbmem (TIMESTAMP, CONSOLE, TCPA_LOG), so we'll probably need to keep those for backwards-compatibility for a while (although we should also update the cbmem utility to use lb_cbmem_entry instead, so that we can deprecate those eventually).
--
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: 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, 01 Dec 2021 00:00:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment