summaryrefslogtreecommitdiff
path: root/payloads
AgeCommit message (Collapse)Author
2023-10-04{commonlib, libpayload}: Add "has_external_display" in coreboot tableSubrata Banik
This patch introduces a new coreboot table entry named "has_external_display" to understand if external display is attached. This information is useful to prevent graceful shutdown by payload when the LID is closed but an external display is present. This piece of the information will be gathered by coreboot and passed into the payload using this new entry aka external_display because payload (i.e., deptcharge) doesn't have any other way to determine if external display is available. BUG=b:299137940 TEST=Able to build and boot google/rex. w/o this patch: LID closed and external display attached (HDMI) in developer mode (GBB 0x39): > System is powered off by depthcharge w/ this patch: LID closed and external display attached (HDMI) in developer mode (GBB 0x39): > Booted to OS and device is alive/usable Change-Id: I0fa7eee4c5a50371a7a66c6ca1ac2c7d046d010b Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77796 Reviewed-by: Eric Lai <ericllai@google.com> Reviewed-by: Nick Vaccaro <nvaccaro@google.com> Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-09-29payloads/edk2: Update default branch for MrChromebox repo to 2023-09Matt DeVillier
Update the default branch used for MrChromebox's edk2 fork from 2023-06 to 2023-09. This updated branch has been rebased on the latest upstream stable tag (edk2-stable202308), and fixes some USB detection issues, as well the coreboot Kconfig for prefering internal or external boot devices. TEST=build/boot google boards link, panther, lulu,reef, ampton, akemi, banshee, zork, frostflow with edk2 payload selected. Change-Id: I7c5f9ae1ca4edd8211f55f4ecf2b3b495f473a43 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78136 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2023-09-29payloads/edk2: Move TPM disable to separate KconfigMatt DeVillier
Disabling TPM support in edk2 can actually cause problems booting from USB on some Intel-based boards with a CR50 TPM when using the edk2 GOP driver option, so rather than disable the TPM for all CR50 boards, restrict the default to only AMD boards, where the boot hang with TPM enabled was originally observed. TEST=build/boot Win11, Linux from usb on google/fizz when built with edk2 payload and edk2 GOP driver option selected. Change-Id: I01509fea2dd42b741c00abcf9fb8b936e895b932 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78031 Reviewed-by: Sean Rhodes <sean@starlabs.systems> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-09-26payloads/edk2/Makefile: Improve dirty repo check, sync submodulesMatt DeVillier
Don't skip checking out the specified edk2 branch if the repo contains untracked files, which may be the case if the EDK2_GOP_DRIVER option is selected. Also ensure the submodule pointers are correct when checking out. TEST=build google/panther with GOP driver option and edk2 payload 2x, switching branches between builds and ensure the correct branch is used each time and submodules are synced with branch. Change-Id: If7040bd5c49209b37a4b308485bf59352197d3b6 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78030 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com> Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2023-09-26payloads/edk2: Guard MrChromebox's build optionsSean Rhodes
Several of the build commands passed by the Makefile only exist in MrChromebox's fork of edk2. Guard these, and the corresponding Kconfig options, against the selection of the MrChromebox repository. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I41d8d54e5b91990dd9fb88967fcd549a86cf6fe9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/78036 Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-09-18libpayload/libcbfs: Add VBOOT_CBFS_INTEGRATION supportJakub Czapiga
If LP_VBOOT_CBFS_INTEGRATION is enabled, then libcbfs will reboot with vboot failure in non-recovery mode on CBFS file hash mismatch. BUg=b:197114807 TEST=Build with VBOOT_CBFS_INTEGRATION enabled and boot on google/ovis4es device Change-Id: Ic0f62212b7217b384e8c4cbd9535fe4243301f8c Signed-off-by: Jakub Czapiga <jacz@semihalf.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77726 Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-09-18libpayload: Add vboot and reboot utility functionsJakub Czapiga
Patch adds: - vboot_fail_and_reboot() for vboot failures handling. - reboot() weak implementation for payloads to implement, used by vboot_fail_and_reboot(). - vboot_recovery_mode_enabled() to check if recovery mode flag is set in vboot context. Implemented for future libcbfs implementation of VBOOT_CBFS_INTEGRATION in libpayload. BUG=b:197114807 TEST=none Change-Id: I53d1955573d54bc56d05f7780c18dcc8ac1fd399 Signed-off-by: Jakub Czapiga <jacz@semihalf.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77725 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-09-18libpayload/vboot: Add vboot context initialization and management codeJakub Czapiga
To fully and easily implement fallback/recovery in libcbfs with vboot support the codebase requires access to vboot context. Moving context management to libpayload allows to avoid unnecessary overhead and code complication and still allows payloads to access it in a way it was designed. Access to this codebase will also allow implementation of e.g. vboot_fail_and_reboot() and other helpful utilities used by coreboot and depthcharge. BUG=b:197114807 TEST=make unit-tests TEST=Build and boot on google/ovis4es with CL:4839296 and VBOOT_CBFS_INTEGRATION enabled Change-Id: Id719be7c4f07251201424b7dc6c1125c6b5756d8 Signed-off-by: Jakub Czapiga <jacz@semihalf.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77635 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2023-09-18libpayload/drivers/video: Add cursor movement support in consoleEran Mitrani
Add support for moving the console cursor horizontally and vertically. BUG=b:300405745 TEST=Tested using firmware shell on Rex. Signed-off-by: Eran Mitrani <mitrani@google.com> Change-Id: I585add120b559396bc0e28aa972b0ae2a33f1fa8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77900 Reviewed-by: Kapil Porwal <kapilporwal@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-09-07LinuxBoot/Makefile: Add check if initramfs needs to be builtFrans Hendriks
initramfs is built always, ignoring CONFIG_LINUXBOOT_BUILD_INITRAMFS Built initramfs only is CONFIG_LINUXBOOT_BUILD_INITRAMFS is set BUG = N/A TEST = Built and boot facebook monolith Change-Id: I0d575ff7528fceb06b5394642527713bb071c8b3 Signed-off-by: Frans Hendriks <fhendriks@eltan.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77607 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-09-07libpayload: Add after an if conditional on the next lineArthur Heymans
Clang warns about this. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: I8bdd45a7ef47274b0253397fa8fd9409a70d2192 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77434 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-08-28payloads/libpayload: Don't use old style function definitionElyes Haouas
Use "int foo(void)" instead of old-style "int foo()". Change-Id: Ic698dbbba74d579a21ff57005a7aa9bb8ce80253 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77485 Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-28libpayload: Fix clang fallthrough warningArthur Heymans
Clang does not recognize comments to indicate falltrough is intended behavior. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: Idcf7a24fc763b80863902702172b4ea950e132b8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77431 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2023-08-26libpayload: Skip unknown arguments to clangArthur Heymans
This compiler argument only exists on gcc. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: I10902517c86daedc9853e6f6cac8fcf513211bb2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77436 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-26libpayload: Remove unnecessary bracketsArthur Heymans
This fixes compilation with clang. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: I675056c8a15fe446bba81a144bfea64d106df293 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77435 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-26libpayload: Fix untyped function argumentsArthur Heymans
This is necessary with clang. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: Icc197fbd48b49bfa8770caf01727669b0ac59090 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77433 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2023-08-26payloads/U-Boot: Use github mirror and latest versionSimon Glass
Update the U-Boot version to the latest release. Also switch to github since it is typically much faster to download than the existing URL. Drop the 'experimental' tag since this payload is pretty stable. It is also tested regularly in U-Boot's CI. Change-Id: I082130539c3474593a82e4b21cb995380f4db168 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77149 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77463 Reviewed-by: Patrick Georgi <patrick@coreboot.org> Tested-by: Patrick Georgi <patrick@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2023-08-25payloads/external/LinuxBoot: Fix bootPatrick Rudolph
Fix regression introduced in I25e757108e0dd473969fe5a192ad0733f1fe6286 "payloads/external/LinuxBoot: Clean up". Include the initrd into the payload. Allows to actually use LinuxBoot. Change-Id: I5ab6b1a43a4100e83f4c188b9ea3451ab7b4ffe5 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77412 Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-24libpayload: Outsource delay function into own headerThomas Heijligen
For libflashrom we need the delay functions but when including the whole libpayload.h it has conflicting symbols. Change-Id: I6e4a669b8ba25836fb870d74c200985c1bfdb387 Signed-off-by: Thomas Heijligen <src@posteo.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70139 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Julius Werner <jwerner@chromium.org>
2023-08-21payloads/external: Add memtest86+ v6 as secondary payloadMartin Roth
This adds a Kconfig option to select memtest86+ version 6 as a secondary payload and sets that as the default. The coreboot version 5 code may still be selected and used if desired. Compiling for 32 bit requires glibc from multilib installed, if the host system is running on 64 bit, as header files, e.g. gnu/stubs-32.h, are required from there. So introduce a new choice menu which allows to choose between 32 and 64 bit. By default, the stable 6.20 version is selected instead of the top of the main branch. TEST=Build both V5 and V6, boot them in QEMU Signed-off-by: Martin Roth <gaumless@gmail.com> Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: Ie0eedc25fcf37b925b072ca809c019a599a20392 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69277 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-08-20payloads/libpayload: Remove ARCH_SPECIFIC_OPTIONSElyes Haouas
Remove dummy ARCH_SPECIFIC_OPTIONS. Change-Id: Ia71021b8597b1d6a227292b6568351e994ad62b0 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76940 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-08-18payloads/edk2: disable TPM support for CR50 TPMMatt DeVillier
Disable TPM support for CR50 TPM when using MrChromebox repo, since it's not currently supported in edk2, and causes some boards (eg AMD Zen-based) to failed to boot. TEST=build/boot on google/frostflow Change-Id: I64b5eb09d64eafd2bed400b7a7c97750cc368aed Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77270 Reviewed-by: Martin L Roth <gaumless@gmail.com> Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-18payloads/edk2: Add support for passing VBT/GOP driver to edk2Matt DeVillier
Add Kconfig for passing a VBT file and GOP driver to edk2, and pass a build param to use them along with the platform GOP driver. This allows edk2 to initialize the display and change display modes, instead of being limited to the single mode set by whatever display init method coreboot might use (libgfxinit, FSP/GOP, VBIOS, etc). TEST=build/boot multiple google boards spanning several platforms using the edk2 GOP driver for display init. Change-Id: I63a49df2411fe44b06eaee6d0fb9aab42ac8aedb Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77269 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2023-08-18libpayload/cbfs: Fill size_out even if cbfs_map() failsYu-Ping Wu
When cbfs_map()/cbfs_ro_map() fails, the caller may still want to know the decompressed size of the CBFS file, for example, to print an error message. Move the assignment earlier in the flow. Note that coreboot's cbfs_map() is already doing the same. BUG=none TEST=emerge-geralt libpayload BRANCH=none Change-Id: I82c6b7e69c95bf597fa3c7d37dd11252893c01af Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77193 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-17libpayload/include/stdarg.h: Add va_copy builtinMaximilian Brune
Add the builtin to copy variadic lists/arguments. Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: I4507b901bdce052c5d1701fdf825eb8a96a5b55a Reviewed-on: https://review.coreboot.org/c/coreboot/+/77097 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-17libpayload: Add parsing of SMBIOS addressMaximilian Brune
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: Ie4032048f5f53b25c46f00b3b48eb5f986a5d0b3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77045 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-08-17payloads/external/LinuxBoot: Fix buildPatrick Rudolph
Fix regression introduced in I25e757108e0dd473969fe5a192ad0733f1fe6286 "payloads/external/LinuxBoot: Clean up". Add creation of the build folder as necessary dependency. Change-Id: Ie76c914f6a705de0c275a05b5af82ac21243d522 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77202 Reviewed-by: Marvin Drees <marvin.drees@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2023-08-13payloads/external/Makefile.inc: Fix empty comparisonMaximilian Brune
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: I5174e0457489c29be6a2b2b882de2db4255bbca0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77145 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-08-13payloads/external/Linuxboot/Makefile: Add build prerequisiteMaximilian Brune
This adds a missing prerequisite, because otherwise it can happen that curl tries to put the downloaded kernel in a non existing build directory Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: I459172f794ab9c1010cebcff5e28f1454e136fba Reviewed-on: https://review.coreboot.org/c/coreboot/+/76914 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Frans Hendriks <fhendriks@eltan.com> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-08-08tint: upgrade the tint payload to 0.07 versionMike Banon
This upgrades the tint payload to 0.07 version. The sources are similar enough so that ..._libpayload.patch could be simply git-moved. Change-Id: I0f6de3d0410e6d838fe49330d98620c877a0d2c7 Signed-off-by: Mike Banon <mikebdp2@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76820 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-08tint: update the tint build system to fix the download/patch errorsMike Banon
Restore the tint build system compatibility with the current version of buildgcc script while preserving the backwards compatibility. Change-Id: I45d3454b4527ee81c3927a5b3da2e9067c530fb0 Signed-off-by: Mike Banon <mikebdp2@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76819 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-05payloads/U-Boot: Upgrade from U-Boot "v2021.07" to "v2023.07"Elyes Haouas
U-Boot v2023.07 was released on Mon 10 July 2023. https://source.denx.de/u-boot/u-boot/-/blob/master/doc/develop/release_cycle.rst#id5 Change-Id: Ie1c6f83bd12e959c29fad1b121c85eb0cf898e24 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/71065 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-01payloads/coreinfo: Use C99 flexible arraysElyes Haouas
Use C99 flexible arrays instead of older style of one-element or zero-length arrays. It allows the compiler to generate errors when the flexible array does not occur at the end in the structure. Change-Id: I17811256b04a17539d3ed77f406892ae77e97515 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76848 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-01libpayload/drivers/cbmem_console: Use C99 flexible arraysElyes Haouas
Use C99 flexible arrays instead of older style of one-element or zero-length arrays. It allows the compiler to generate errors when the flexible array does not occur at the end in the structure. Change-Id: I3fd3f068ff731e1d9fed7c38ba6815e1eed86450 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76849 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-08-01payloads/libpayload/include/coreboot_tables: Use C99 flexible arraysElyes Haouas
Use C99 flexible arrays instead of older style of one-element or zero-length arrays. It allows the compiler to generate errors when the flexible array does not occur at the end in the structure. Change-Id: Icf3da1b0a0666769ae7b5d5f641b85436b324b4c Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76851 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-31payloads/edk2: Update default branch for MrChromebox repo to 2023-06Matt DeVillier
Update the default branch used for MrChromebox's edk2 fork from 2023-04 to 2023-06. This updated branch has been rebased on the latest upstream stable tag (edk2-stable202305), and fixes issues booting on AMD Zen platforms (Picasso and newer). TEST=build/boot google boards link, panther, lulu,reef, ampton, akemi, banshee, zork, frostflow with edk2 payload selected. Change-Id: I4867d453514f2b00f66ffdad50e091e5b80afdcb Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76806 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2023-07-25payloads/external/Linuxboot/Makefile: Guard linux MakefileMaximilian Brune
The linux.mk makefile needs to be guarded, because it introduces a dependency on the perl tooling. Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: Ieb7aac672072858e0d6811628887f6a9eb9a8cb1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76715 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2023-07-24payloads/external/Linuxboot/Makefile: Guard u-root MakefileMaximilian Brune
The u-root.mk makefile needs to be guarded, because it introduces a dependency on the go tooling. Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: Ia89e4e7b9a1f73a7b622eeaa8d6148d99f9b327a Reviewed-on: https://review.coreboot.org/c/coreboot/+/76714 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marvin Drees <marvin.drees@9elements.com> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2023-07-23payloads/external/LinuxBoot: Clean upMaximilian Brune
There were some issues with the current Linuxboot Makefiles. - multithreaded compilation didn't work, because some prerequisites were missing - initramfs wasn't added for x86 qemu boot. - riscv support was incomplete It began with separate patches, but resulted in a clean up patch, that is hard to separate. The most important changes are the following: - Instead of phony targets, actual files are now used as prerequisites - riscv can now be used as target - initramfs works now also for x86 - instead of querying the most recent version from the internet, I set a known working version (because I tested it) that can be customized and/or upgraded in the future. The reasons: - querying the version from the internet requires a constant connection to the internet even after linux kernel is already build (aka subsequent builds). - one usually wants to use a known working version, but optionally still have the posibillity to choose a custom one. This patch introduces this possibility in its most simple form. - I removed as much ifeq statements as possible and moved that responsibility to Kconfig, because they tend to make the Makefile less readable. Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: I25e757108e0dd473969fe5a192ad0733f1fe6286 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76150 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-06payloads/edk2: Fix typo in Make commandSean Rhodes
The Makefile was passing `CONFIG_SMMSTORE_v2` which doesn't exist. Correct this to `CONFIG_SMMSTORE_V2`. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I984d2155143c14cb4a347ed24688b9ea492f7f8b Reviewed-on: https://review.coreboot.org/c/coreboot/+/76317 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2023-06-28payloads/Memtest86Plus: Update branch name from master to mainNicholas Chin
It seems like the default branch for coreboot's Memtest86+ fork was renamed from 'master' to 'main'. TEST: Memtest builds correctly when selecting 'Main' for the Memtest86+ version option. Change-Id: I269249518019f5d0d12c57f1c14012abca86b48b Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76100 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-28payloads/filo: Update branch name from master to mainNicholas Chin
It seems like the default branch for FILO was renamed from 'master' to 'main'. TEST: FILO builds correctly when selecting 'HEAD' for the FILO version option. Change-Id: I6c355d757987551e850f9d24f6bfb14167cb8046 Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76101 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2023-06-12libpayload/uhci: Re-write UHCI RH driver w/ generic_hub APINico Huber
This is a complete rewrite of the UHCI root-hub driver, based on the xHCI one. We are doing things by the book as far as possible. One special case is uhci_rh_reset_port() which does the reset se- quencing that usually the hardware would do. This abandons some quirks of the old driver: * Ports are not disabled/re-enabled for every attachment anymore. * We solely rely on the Connect Status Change bit to track changes. * Further status changes are now deferred to the next polling round. The latter fixes endless loops in combination with commit 7faff543da (libpayload: usb: Detach unused USB devices). Change-Id: I5211728775eb94dfc23fa82ebf00fe5c99039709 Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75504 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2023-06-10payloads/edk2: Add an option to use EDK2 Universal PayloadSean Rhodes
This add's an option to use EDK2's Universal Payload instead of the standard UefiPayloadPkg. Universal Payload requires a ShimLayer, to build the required HOBs and pass them to Universal Payload. The ShimLayer is built to encompass UniveralPayload, so only one ELF binary is added to coreboot. Universal Payload is based on Intel's USF specification: https://universalscalablefirmware.github.io/documentation/ This has been added with the repository pointing to https://github.com/starlabsltd. The required ShimLayer patches will be merged into edk2 master once corresponding coreboot patches are merged. This is because the EDK2 engineers believe it is an impossible task to patch coreboot to build and use Universal Payload. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I17cc86d5eac0d5d91551ba5bea73fbc07ebdf0d3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65934 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-09payloads/edk2: Hook up PCIe Resizable BARs flagLean Sheng Tan
Hook up edk2 build flag PcdPcieResizableBarSupport to coreboot Kconfig CONFIG_PCIEXP_SUPPORT_RESIZABLE_BARS. Signed-off-by: Lean Sheng Tan <sheng.tan@9elements.com> Change-Id: I5cc12d32c5e132b9f99ec650377d7683377c2a9c Reviewed-on: https://review.coreboot.org/c/coreboot/+/74926 Reviewed-by: Sean Rhodes <sean@starlabs.systems> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Benjamin Doron <benjamin.doron00@gmail.com> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2023-06-09payloads/external/depthcharge: Update stable versionMartin Roth
The stable version was over 5 years old. Update it to the current main branch. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Ic9cbe5e3dad9f2ff06e1fa8f0582d4c8b3e81a22 Reviewed-on: https://review.coreboot.org/c/coreboot/+/75134 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2023-06-06libpayload/drivers/usb/xhci.c: Check for NULL in xhci_initFred Reitberger
Ensure the physical_bar parameter passed to xhci_init is not NULL, else return NULL. This may occur when an XHCI controller is disabled and no resources are allocated for it. BUG=b:284213001 Change-Id: I05c32612606793adcba3f4a5724092387a215d41 Signed-off-by: Fred Reitberger <reitbergerfred@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75645 Reviewed-by: Jon Murphy <jpmurphy@google.com> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-04libpayload/uhci: Return expected length for control/bulk transfersNico Huber
Libpayload's USB API was changed in commit e9738dbe2b (libpayload: Make USB transfer functions return amount of bytes). However, the UHCI driver was never adapted. Instead of returning 0 for success, we can return the expected data length as a best effort. We won't be able to catch short transfers this way, but previously working cases will work again. Change-Id: I31d7de495a46af401e2cbe5a3b8f6349facad8ff Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75349 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
2023-06-02payloads/edk2: Set max variable size to 0x8000 for SMMSTORESean Rhodes
SMMSTORE requires 0x8000, compared to the default value of 0x10000. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I10d2a5a0c1d729d83e0b62bb9430863317b883cc Reviewed-on: https://review.coreboot.org/c/coreboot/+/74176 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2023-05-31payloads/edk2: Only pass IA32 argumentSean Rhodes
With the coreboot build process, `UniversalPayloadBuild.sh` calls `UniversalPayloadBuild.py`. That Python script will unconditionally build DXE as 64-bit, but accepts an argument for the entry point: parser.add_argument('-a', '--Arch', choices=['IA32', 'X64'], help='Specify the ARCH for payload entry module. Default build X64 image.', default ='X64') Currently, ` -a IA32 -a X64` is passed, and the Python script will use the `X64` argument, resulting in a payload that won't work with coreboot. Remove the `-a X64`, so the resulting build is a 32-bit entry point, and 64-bit DXE, which works with coreboot. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I8a557d6e155a2938b44036d98f9274cc8b38f156 Reviewed-on: https://review.coreboot.org/c/coreboot/+/73668 Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Benjamin Doron <benjamin.doron00@gmail.com> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2023-05-27libpayload;arch,cpu/x86: drop USE_MARCH_586 Kconfig optionFelix Held
Only the Intel Quark SoC selected this option and that SoC was dropped in commit 531023285ea4 ("soc/intel/quark: Drop support"), so drop this Kconfig option too. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Ic4f1c7530cd8ac7a1945b1493a2d53a7904daa06 Reviewed-on: https://review.coreboot.org/c/coreboot/+/75473 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-05-27payloads/libpayload/configs: drop config.galileoFelix Held
The Galileo board was dropped in commit 037c25d4dd8d ("mb/intel/ galileo: Drop support"), so also drop this config file. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I8c85dc03c3a4a016d6e13f1bee170d1bc6439470 Reviewed-on: https://review.coreboot.org/c/coreboot/+/75472 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2023-05-24libpayload/arch/x86: Update API handling of CBTABLE handoffMaximilian Brune
The payload API of coreboot described in https://www.coreboot.org/Payload_API does not reflect the current handoff mechanism to hand the coreboot tables off. Therefore the arguments supplied by coreboot (cbtable) will currently never be parsed correctly and libpayload has to search for the coreboot tables by iterating through memory. This patch removes the old payload API implementation and just takes the coreboot table pointer from the first argument on the stack. Tested: started prodrive/atlas with coreinfo payload Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: I51fb0cfc81043cbfe3fc9c8ea0776add2d6a42b2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/74965 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-05-20payloads/seabios: Update stable from 1.16.1 to 1.16.2Elyes Haouas
Changes: https://review.coreboot.org/plugins/gitiles/seabios/+/refs/tags/rel-1.16.2 Change-Id: I19b31f89c8fc504284f327c975c159616eb1b241 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/74318 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-05-13payloads/external/edk2: Verbose builds with coreboot build-systemBenjamin Doron
Rather than requiring another Kconfig symbol to be set, reuse the same `make V=1` command argument. This simplifies rebuilds with a single point of reference. Also, this means that coreboot doesn't have to be rebuilt due to Kconfig changes. Change-Id: I9eba86b234768641a215095b8657e9d07832b1b5 Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75185 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Reviewed-by: Sean Rhodes <sean@starlabs.systems> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2023-05-02payloads/edk2: Remove ABOVE_4G_MEMORY optionSean Rhodes
Remove the ABOVE_4G_MEMORY option as the option was removed in edk2 in commit dc5f2905ebfdf68ae28ce1081d435af0f8641dd9 (UefiPayloadPkg: Always build MemoryTypeInformation HOB for DXE GCD - https://github.com/tianocore/edk2/pull/4231). Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I8d5ee79ef3f7ecfcd1463c612aad2e3d629df22a Reviewed-on: https://review.coreboot.org/c/coreboot/+/74336 Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2023-05-02payloads/edk2: Add Kconfig to enable UEFI Secure Boot supportMatt DeVillier
Now that MrChromebox's default edk2 branch supports Secure Boot, add a Kconfig to enable it, and do so by default when MrChromebox's branch is used and SMMSTORE_V2 is enabled (which is a prerequisite). TEST=build/boot google boards link, panther, lulu,reef, ampton, akemi, and banshee, verify Secure Boot options available in payload, Secure Boot status reported properly by Linux/Windows. Change-Id: I4be58c3315cabe08729d717c59203fdc6a3e2958 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/74869 Reviewed-by: Sean Rhodes <sean@starlabs.systems> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-05-02payloads/edk2: Update default branch for MrChromebox repo to 2023-04Matt DeVillier
Update the default branch used for MrChromebox's edk2 fork from 2022-07 to 2023-04. This updated branch has been rebased on the latest upstream stable tag (edk2-stable202302), and adds support for UEFI Secure Boot and TPM 1.2/2.0 management (though it does not currently support Google CR50/Ti50 TPMs). TEST=build/boot google boards link, panther, lulu,reef, ampton, akemi, and banshee with edk2 payload selected. Change-Id: I096eaa4e065db731a70ba238ba5a3bb49e5db867 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/74868 Reviewed-by: Sean Rhodes <sean@starlabs.systems> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-04-13payloads/external/Makefile.inc: Make linuxboot a phony targetArthur Heymans
To quote the gnu make manual: "A phony target is one that is not really the name of a file; rather it is just a name for a recipe to be executed when you make an explicit request. There are two reasons to use a phony target: to avoid a conflict with a file of the same name, and to improve performance." Change-Id: I337f4f2e0257a75ba204d21f8aa84292e8233082 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/74309 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Marvin Drees <marvin.drees@9elements.com> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-04-06tree: Replace `egrep` with `grep -E`Felix Singer
For compatibility reasons, egrep is just a wrapper around grep today. Thus, replace it with `grep -E`. Change-Id: Ief08a22e4cd7211a3fee278492c95d37f9e058fa Signed-off-by: Felix Singer <felix.singer@secunet.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/74171 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2023-04-06payloads/external/edk2: Add option to clone edk2-platforms repoMichał Żygowski
Add possibility to clone edk2-platforms repository. Some edk2 repositories may use modules from edk2-platforms which contains various feature packages for Intel platforms, e.g VT-d driver if DMA protection is enabled. Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com> Change-Id: Iabd0793dfdcb95260046dc992ff30ef581159db9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68872 Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-03-07libpayload: strings.h: Use builtin __ffs instead of included oneThomas Heijligen
Change-Id: Ie4d0b1b19ce6524341449df8bfabc66bff7bd97e Signed-off-by: Thomas Heijligen <src@posteo.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70118 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2023-03-07libpayload: bin/lpgcc allow to call without filesThomas Heijligen
When building libflashrom ontop of libpayload, meson calls the lpgcc wrapper with -xc but without a file to obtain information about the C compiler. To make this work guard $_LIBGCC with -xnone in the lpgcc wrapper. -xnone tells the compiler to interpret the following files of libpayload by their suffix, not the privious given -x option. Change-Id: I9e037ff44c0a6d0585d8a6f8aeabae6e651142e2 Signed-off-by: Thomas Heijligen <src@posteo.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70117 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2023-02-17libpayload: Use __func__ instead of old __FUNCTION__Elyes Haouas
Change-Id: Ic3c22ac101a2ff44f97b2ac3fe3c0a89391718de Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/72380 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
2023-02-17payloads/Yabits: Remove deprecated Yabits PayloadElias Souza
Yabits is no longer maintained and git repo is archived. Yabits has not been maintained for a long time, the project is apparently closed. Change-Id: Ida0bb79342448510d2c309339fabbe8066eca73c Signed-off-by: Elias Souza <eliascontato@protonmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/72463 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
2023-02-16commonlib/bsd, libpayload: Do not include helpers.h in stddef.hThomas Heijligen
`stddef.h` should only provide the definitions defined by ISO or Posix. The included `commonlib/bsd/helpers.h` provide a lot of non standard definitions that may interfere with definitions from the application. Change-Id: Ia71edbc3ffe6694ff4b971decf3a41f915264bc8 Signed-off-by: Thomas Heijligen <src@posteo.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70116 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-02-16libpayload/string: add strndup() functionThomas Heijligen
Change-Id: Ie509e49f21fb537692704ac6527efa09649164e3 Signed-off-by: Thomas Heijligen <src@posteo.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70115 Reviewed-by: Jakub Czapiga <jacz@semihalf.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-02-16libpayload: Add VBOOT_SHA_ARMV8_CE configYidi Lin
Add Kconfig option for VBOOT_SHA_ARMV8_CE, which will use ARMv8 Crypto Extension for SHA256[1] instead of software implementation. [1] https://crrev.com/c/4170144 BUG=b:263514393 BRANCH=corsola TEST='vboot kernel verification' gets 111 msecs improvement on Tentacruel. Before: 1100:finished vboot kernel verification 905,150 (123,518) After: 1100:finished vboot kernel verification 787,277 (12,254) Cq-Depend: chromium:4170144, chromium:4242678 Change-Id: If92830830a0658dfad2a066e9efa624783865cf2 Signed-off-by: Yidi Lin <yidilin@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/72710 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2023-01-30payloads/external/LinuxBoot: Update u-root releases in Kconfigeliassouza
Building LinuxBoot with u-root newers releases can providing a better experience, Change-Id: Ie98f434c5296b7ba7c3750a766b244c747421baa Signed-off-by: eliassouza <eliascontato@protonmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/72465 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-01-27payloads/U-boot: Fix U-Boot cloning erroreliassouza
Renaming origin/master to just master fix error during cloning repo. Error: Remote branch origin/master not found in upstream origin Change-Id: Ib5d4bb0277076842f8a8400eb61da9ad23465b66 Signed-off-by: eliassouza <eliascontato@protonmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/72464 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2023-01-17payloads/*/Kconfig.name: update documentation linkEvgeny Zinoviev
Old wiki is outdated for years but Kconfig help messages of some payloads still reference it. This commit changes those links to the corresponding page at doc.coreboot.org. Change-Id: I81653f1b010d8a3ac4dfc4c6ad4fa714ce5d59a1 Signed-off-by: Evgeny Zinoviev <me@ch1p.io> Reviewed-on: https://review.coreboot.org/c/coreboot/+/71897 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2023-01-04payloads: Update GRUB2 stable version from 2.04 to 2.06Paul Menzel
GRUB2 was released on June 8th, 2021 [1]. [1]: https://lists.gnu.org/archive/html/grub-devel/2021-06/msg00022.html Change-Id: I050a78c769c3cd4c9ae627c7e3124a4894a018d7 Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55343 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2022-12-22payloads/libpayload/arch/x86/rom_media.c: Change log level messageElyes Haouas
Move a warning message from BIOS_INFO to BIOS_WARNING log level. Change-Id: I4210901a183b54e47fa62a6146ce754c544aab2c Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/71157 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2022-12-21payloads/seabios: Update stable from 1.16.0 to 1.16.1Elyes Haouas
Short summary: - virtio-blk.{mmio,pci} and virtio-scsi.{mmio,pci} improved. - Several fixes and code refactor pci_config_*() functions. - Improved AML parsing. Change-Id: I04b35d006a2bcd1621e28ac2f1b12b9af99b7552 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/71064 Reviewed-by: Felix Singer <felixsinger@posteo.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-11-21libpayload: Fix compiler warningsThomas Heijligen
Following warnings occur when compiling with `i386-elf-gcc (coreboot toolchain v2022-09-18_c8870b1334) 11.2.0` drivers/serial/8250.c:75: [-Werror=unused-variable] Move variable declaration inside the `#if !CONFIG(LP_PL011_SERIAL_CONSOLE)` block drivers/udc/dwc2.c:505: [-Werror=format=] use `%zd` to match type `size_t` Change-Id: Id285c24cba790f181fa203f3117e5df35bed27c4 Signed-off-by: Thomas Heijligen <src@posteo.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69764 Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Felix Singer <felixsinger@posteo.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2022-11-04payloads: Make PAYLOAD_NONE a bool outside of the choiceMartin Roth
Instead of having the config option PAYLOADS_NONE inside the choice of payloads, make that a separate choice that enables the payload menu. If the no_payload option is selected, this hides the other options and keeps them out of the saved config file and config.h Signed-off-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Change-Id: I932c65630261a5b39809abf4dfbda5bf932c6684 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68595 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2022-11-02payloads/grub: Work around entry point issueArthur Heymans
With -Os grub-mkimage does not create an elf with the correct entry point because some parts of the elf images are placed in .text.unlikely. The linker does not know where to place that and places it below .text, hence messing up the entry point. To avoid this use the compiler flag -fno-reorder-functions. Change-Id: Ic4a12f45d30b781870faa38575e8b2c10e0a42e8 Resolves: https://ticket.coreboot.org/issues/343 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/64235 Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Hackware <human@hackware.cl> Reviewed-by: Sean Rhodes <sean@starlabs.systems> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-10-26payloads/LinuxBoot: Fix Linuxboot kernel fetching for v6.xArthur Heymans
Change-Id: Ic1d407eab8ec4569e02729afb5c71f39ce174401 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68815 Reviewed-by: Christian Walter <christian.walter@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-10-26coreboot_tables: Drop uart PCI addrArthur Heymans
Only edk2 used this to fill in a different struct but even there the entries go unused, so removing this struct element from coreboot has no side effects. Change-Id: Iadd2678c4e01d30471eac43017392d256adda341 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68767 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Bill XIE <persmule@hardenedlinux.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-10-25payloads/edk2: Add the declaration for OBJCOPYSean Rhodes
The Shimlayer recipe requires OBJCOPY, so declare it at the top of the Makefile so this recipe works as intended. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I2e04dfe18df6252261836dcdf98f7e8de65287b5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68744 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-10-22payloads/edk2: Disable the CPU Timer Lib unless supportedSean Rhodes
For recent X86 CPUs, the 0x15 CPUID instruction will return Time Stamp Counter Frequence. For CPUs that do not support this instruction, EDK2 must include a different library which is the reason why this must be configured at build time. If this is enabled, and the CPU doesn't support 0x15, it will fail to boot. If is not enabled, and the CPU does support 0x15, it will still boot but without support for the leaf. Consequently, disabled it by default. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I4f0f43ce50c4f6f7eb03063fff34d015468f6daa Reviewed-on: https://review.coreboot.org/c/coreboot/+/65950 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-10-22payloads/edk2: Add the recipes to assemble UniversalPayloadSean Rhodes
Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Id6363c92f8155007e05c682694d7413fd4630b6d Reviewed-on: https://review.coreboot.org/c/coreboot/+/65932 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-10-13payloads,src: Replace ALIGN(x, a) by ALIGN_UP(x, a) for clarityElyes Haouas
Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Change-Id: I80f3d2c90c58daa62651f6fd635c043b1ce38b84 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68255 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-10-12payloads/edk2: Add a recipe to build the ShimLayerSean Rhodes
The ShimLayer is required to start the Universal Payload. It will build the required HOBs and pass them accordingly. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I043271994f40813d9059a89420d4311d9d5802b1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/64485 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-10-11payloads/edk2: Add a recipe to build UniversalPayload.elfSean Rhodes
Add a recipe to build UniversalPayload.elf, which uses a wrapper for the UniversalPayloadBuild.py that is hosted in the edk2 repository. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I2aa318513244f576e07e72713fad3b4f7bd7c22e Reviewed-on: https://review.coreboot.org/c/coreboot/+/68183 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-10-10payloads/edk2: Guard the build targetSean Rhodes
Specifying a build target only applies to UefiPayloadPkg, so guard it against the relevant Kconfig option. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Ia4597b5ed76616e39cec45f8a69be9f1ccd72d4c Reviewed-on: https://review.coreboot.org/c/coreboot/+/68182 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-10-10payloads/edk2: Guard the silent switchSean Rhodes
The silent switch, `-s`, only works for building UefiPayloadPkg. Guard it against the relevant Kconfig option so that it doesn't cause problems with other targets. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I5a5df636e6484a435c849c6d19c7cb61e8e62ee6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68181 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-10-08payloads/edk2: Add note that upstream edk2 does not workSean Rhodes
Upstream edk2 doesn't work, but we still have the option for it for testing. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I6ec9f4746640baa030762650ab7b83d85ab8c1e1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/67780 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-10-08payloads/edk2: Add an option for verbose buildsSean Rhodes
Add EDK2_VERBOSE_BUILD which removes the `-q` and `-s` switches so the build log becomes verbose. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Iaf1e96657f43edddfa4de0d3e00f3b24e7eb855b Reviewed-on: https://review.coreboot.org/c/coreboot/+/67677 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-10-08payloads/edk2: Separate the build target and repositorySean Rhodes
Until recently, there were two options to build edk2, UefiPayloadPkg and CorebootPayloadPkg. Now, there is only one, UefiPayloadPkg but soon, there will be Universal Payload. It makes more sense, as the official edk2 repository doesn't work with coreboot, to have the build target and repository separate. That will allow for building either UefiPayloadPkg or Universal Payload from the official repository, MrChromebox' fork or a custom repository. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: If7f12423058ef69838741f384495ca766ccea083 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66080 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-09-28payloads/external/skiboot/Makefile: fix output on `make clean`Sergii Dmytruk
skiboot's Makefile always executes $(CC) to determine whether its clang or GCC and not setting CROSS for clean target results in this annoying output (assuming `powerpc64-linux-gcc` isn't available): make[2]: powerpc64-linux-gcc: No such file or directory Change-Id: I242b2d7c1bdf1bbd70fd4e4e0605341fe8301ca5 Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/67053 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com>
2022-09-21tests: Add support for tests build failures detectionJakub Czapiga
This patch introduces new target: junit.xml-unit-tests, which builds and runs unit-tests. It also creates build log containing build logs. This feature allows for one to see build failures in Jenkins dashboard. Signed-off-by: Jakub Czapiga <jacz@semihalf.com> Change-Id: I94184379dcc2ac10f1a47f4a9d205cacbeb640fe Reviewed-on: https://review.coreboot.org/c/coreboot/+/67372 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-02cbfs/vboot: Adapt to new vb2_digest APIJulius Werner
CL:3825558 changes all vb2_digest and vb2_hash functions to take a new hwcrypto_allowed argument, to potentially let them try to call the vb2ex_hwcrypto API for hash calculation. This change will open hardware crypto acceleration up to all hash calculations in coreboot (most notably CBFS verification). As part of this change, the vb2_digest_buffer() function has been removed, so replace existing instances in coreboot with the newer vb2_hash_calculate() API. Due to the circular dependency of these changes with vboot, this patch also needs to update the vboot submodule: Updating from commit id 18cb85b5: 2load_kernel.c: Expose load kernel as vb2_api to commit id b827ddb9: tests: Ensure auxfw sync runs after EC sync This brings in 15 new commits. Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: I287d8dac3c49ad7ea3e18a015874ce8d610ec67e Reviewed-on: https://review.coreboot.org/c/coreboot/+/66561 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jakub Czapiga <jacz@semihalf.com>
2022-09-01x86/cache.c: Implement dcache_*Hsin-Te Yuan
A new ChromeOS automated test will be introduced to check the cbmem log of diagnostic boot mode. Because the diagnostic boot does not allow booting into kernel, the test must perform AP reset and then check the cbmem log afterwards. However, the memory content might not be written back to memory (from CPU cache) during AP reset because of the cache snooping mechanism on x86. Hence, some API to flush cache is needed. Implement dcache_* to allow flushing cache proactively in x86. To avoid unnecessary flush, check dma_coherent before calling dcache_* functions, which will be always true in x86. Therefore, this change won't affect the original functionality. BUG=b:190026346 TEST=FW_NAME=primus emerge-brya libpayload Cq-Depend: chromium:3841252 Signed-off-by: Hsin-Te Yuan <yuanhsinte@google.com> Change-Id: I622d8b1cc652cbe477954a900885d12e6494d94d Reviewed-on: https://review.coreboot.org/c/coreboot/+/66578 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-09-01payloads/edk2: Remove architecture from build stringSean Rhodes
Whilst UefiPayloadPkg is always built with support for 32-bit and 64-bit, this is not the case for all edk2 targets. Move this to the build command so they can be specified on each target. Also add the `-s` switch, which stands for quiet to suppress edk2 printing War and Peace whilst building. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: If94abd4e28917718c76ad5945966e7be668c8f61 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66364 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-01payloads/edk2: Rename the update recipeSean Rhodes
Rename the update recipe, which updates the edk2 repository, to $(EDK2_PATH). There is no functional change here. This recipe must be phony so it runs every time. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I30fedbee7459b79a85a23678e0075368eda95da0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66363 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-01payloads/edk2: Clone edk2 and its submodules in parallelSean Rhodes
When cloning edk2, download the submodules at the same time. There is no functional change here, just a minor speed improvement. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Ieeb481346093588bd8d237857966001dc81460b1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66362 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-01payloads/edk2: Adjust the WORKSPACE targetSean Rhodes
First, remove the `-p` flag; as it's a file target it's not needed in this case. Second, remove the clone as this is handled in the update recipe. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I3829a3151be2d05a067a160fa770e5eb7ad4aad4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66361 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-01payloads/edk2: Convert UefiPayloadPkg to a file targetSean Rhodes
Convert UefiPayloadPkg (UEFIPAYLOAD.fd) to a file target. There is no functional change here, it just avoids it being copied out of the build dir, into an output directory and then into build. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Iff097f6f1e715c697c33c50c395d7c1b88cc6280 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66360 Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-08-24payloads/edk2: Separate the tasks required to build edk2Sean Rhodes
Separate the tasks that are required to be completed prior to building edk2 into a prep recipe. This allows this to be used for building different targets. This also ensures that the COREBOOT toolchain is used. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Ic4ae8ac4118a5747f38297d0fbf4cb53aa3b6d6d Reviewed-on: https://review.coreboot.org/c/coreboot/+/66359 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>