summaryrefslogtreecommitdiff
path: root/payloads
AgeCommit message (Collapse)Author
2024-09-12payloads/edk2/Makefile: detect invalid commit hash on checkoutSergii Dmytruk
There is already a check for invalid reference, however `git rev-parse reference` doesn't fail on unknown commit hash unless `^{object}` peeling operator is used (`^{commit}` can be used as well). Change-Id: I7ef39aeee2e902ac2fad6ac41b546c47418e1dec Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84292 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-09-12payloads/edk2: Update default branch for MrChromebox repo to 2024-08Matt DeVillier
Update the default branch used for MrChromebox's edk2 fork from 2023-09 to 2024-08. This updated branch has been rebased on the latest upstream stable tag (edk2-stable202408), and updates the EFI filesystem drivers which had been causing some issues with bootable USBs created using Rufus as it tried to unload the filesystem drivers and load its own. TEST=build/boot google boards link, panther, lulu, reef, ampton, akemi, banshee, zork, dewatt, frostflow with edk2 payload selected. Change-Id: I459b668345ed2a34e198e6a3d3a2da94b2940e69 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84293 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-27payloads/Kconfig: Fix dependencies of PAYLOAD_FIT_SUPPORTNico Huber
Move config PAYLOAD_FIT_SUPPORT out of the `if !PAYLOAD_NONE'. It's independent of the choice to add a payload right away. Change-Id: I4b9cd13bf017d4afc30d1599ecc2faaf87bf0213 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84086 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-08-27libpayload/Makefile.payload: Add lto flagsArthur Heymans
Change-Id: If4496e300dd239b8652285bab05c2f68a51b4437 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84015 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-27libpayload: Set reasonable arch defaultsArthur Heymans
This makes it easy to switch between x86_32 and x86_64 in payloads. Change-Id: I3ac5f24d83dc80db924e92b53403c477e6256c44 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84014 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-27payloads/external/U-Boot: Upgrade from 2024.04 to 2024.07Elyes Haouas
U-Boot v2024.07 was released on Mon 01 July 2024. Change-Id: I747f6b9856860f3da76979f702de7eae45fd500b Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83521 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-08-27libpayload: Use unsigned integer for PDG_MASKArthur Heymans
The clang compiler warns about undefined behavior about shifting signed integers. Change-Id: Ic4ce64207393ec4a8d6b188b35e0f436342826de Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84007 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-08-27libpayload: Fix x86 output archArthur Heymans
The value used is not acceptable to BFD linker. Change-Id: I0f134a96c596d69e10dd441b96184b119e9f1908 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84013 Reviewed-by: Subrata Banik <subratabanik@google.com> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-27libpayload: Allow LTO with clangArthur Heymans
Change-Id: I41bb613de5d16ca180dd684a0bec4840d9119e6f Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84012 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-27libpayload: Don't force GCC in Makefile.payloadArthur Heymans
This allows nvramcui to be build with clang. Change-Id: I5e56ead81fc92b7ba4fb63a2c098b0e10b01ca53 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84010 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-27libpayload/x86: Fix assembly for clangArthur Heymans
Change-Id: I81252dc2f89b3b3da0bb9a2388a041b600920b3f Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84009 Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-27libpayload: Use defined length movsArthur Heymans
This fixes building with clang. Change-Id: I2fabe7fbe3f8afac5c1128debf2e09a484f26fc5 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84008 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-27libpayload/arm: Guard unsupported clang argumentArthur Heymans
Change-Id: I6cb0d717518478c35bc666867c7d0be957b89322 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84006 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-26nvramcui: Fix main function signatureArthur Heymans
LTO is not happy about signature mismatch. Change-Id: Ia0c50224bd70503e884573fedf3bf33c134bba00 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84011 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-19libpayload: Add missing SIZE_MAX defineJakub Czapiga
commonlib/region.h requires SIZE_MAX to be defined. Change-Id: I588d59c2637b10def046ea02293e5503c9b6bc3d Signed-off-by: Jakub Czapiga <czapiga@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83907 Reviewed-by: Subrata Banik <subratabanik@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Eric Lai <ericllai@google.com>
2024-08-14commonlib/bsd: Add strcat() and strncat() functionsYu-Ping Wu
An upcoming vboot feature [1] will need strcat() to be defined in string.h. Therefore, add strcat() and strncat() to commonlib/bsd. Remove those functions from libpayload. [1] https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/5650810 Change-Id: If02fce0eafb4f6fa01d8bab17d87a32360f4ac83 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83765 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-08-14commonlib/bsd: Add strlen() and strnlen() functionsYu-Ping Wu
Add strlen() and strnlen() to commonlib/bsd by rewriting them from scratch, and remove the same functions from coreboot and libpayload. Note that in the existing libpayload implementation, these functions return 0 for NULL strings. Given that POSIX doesn't require the NULL check and that other major libc implementations (e.g. glibc [1]) don't seem to do that, the new functions also don't perform the NULL check. [1] https://github.com/bminor/glibc/blob/master/sysdeps/i386/strlen.c Change-Id: I1203ec9affabe493bd14b46662d212b08240cced Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83830 Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-08-08payloads/edk2: set VARIABLE_SUPPORT=SMMSTORE on CONFIG_SMMSTORE_V2Sergii Dmytruk
Official EDK2 repository has VARIABLE_SUPPORT defaulting to EMU in UefiPayloadPkg, switch it to SMMSTORE if coreboot is built with SMMSTOREv2. This removes custom default of EDK2_CUSTOM_BUILD_PARAMS for EDK2_REPO_MRCHROMEBOX which is unnecessary now. Change-Id: Ic59f89c0f708f9b144bd35cd18870d0e1c65677d Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83737 Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-22payloads/edk2/Makefile: Add $(EDK2_PATH) as dependency for 'gop_driver' targetMatt DeVillier
Without this, when doing a clean build with 'make j$(nproc)`, the build can fail copying the GOP driver file since the target directory does not exist yet. TEST=build/boot google/hatch (akemi) w/edk2 payload and GOP driver init on a clean git checkout. Change-Id: Ic510d70041dc099e6bc469528b80d1e271976655 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83474 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2024-07-13libpayload: Unconditionally handle "CBMEM_ID_CSE_*" entriesSubrata Banik
This change removes the unnecessary conditional compilation around CBMEM_ID_CSE_BP_INFO and CBMEM_ID_CSE_INFO handling in cb_parse_cbmem_entry. These CBMEM IDs are only relevant on platforms with SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD enabled, and platforms without this config option won't encounter these IDs when calling cb_parse_cbmem_entry(). BUG=b:305898363 TEST=Builds and boots successfully: * google/rex0 with SOC_INTEL_CSE_LITE_SKU * google/rex64 with SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD Change-Id: Icf056f8426015e99509be5f5a67cb66468645cd9 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83436 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2024-07-11libpayload/x86: Add x86-64 support to rdtsc()Subrata Banik
This patch adds support for x86-64 to the rdtsc() function, allowing it to correctly read the Time Stamp Counter (TSC) on both 32-bit and 64-bit x86 architectures. BUG=b:242829490, b:351851626 TEST=Builds and boots on google/rex0 and google/rex64 systems and manually verified correct TSC readings on x86-32 and x86-64 hardware. Change-Id: I0afac3db2e82a245a37c2e5cf2302bf1dad62c01 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83414 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-07-11soc/intel/cmn/cse: Refactor CBMEM ID handling for flexibilitySubrata Banik
This patch refactors the handling of CSE CBMEM IDs to enable platforms to choose whether to perform CSE sync operations within coreboot or defer it to the payload. This separation improves code organization, ensuring `cse_lite.c` focuses on coreboot-specific CSE Lite tasks. Now, platforms can select: * `SOC_INTEL_CSE_LITE_SKU` for CSE sync within coreboot * `SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD` for deferred payload sync This change ensures mutually exclusive options, avoiding unnecessary SPI flash size increases. BUG=b:305898363 TEST=Builds and boots successfully: * google/rex0 with SOC_INTEL_CSE_LITE_SKU * google/rex64 with SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD Change-Id: I74f70959715f9fd6d4d298faf310592874cc35d4 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83393 Reviewed-by: Nick Vaccaro <nvaccaro@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-09payloads/ipxe/kconfig: Fix option name prefixFelix Singer
With commit 238ff1e9c7 ("payloads/ipxe: Prefix iPXE options with "IPXE" instead "PXE""), the prefix for iPXE related Kconfig identifiers was unified to "IPXE". So rename the identifier for the TRUST_CMD option as well, which was introduced later. Change-Id: I918358b859003503526ba7849494bb23f8c893fd Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83361 Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-05payloads/external: don't prevent parallel build of iPXESergii Dmytruk
When starting a nested instance Make communicates information on the number of jobs and how to synchronize difference instances via MAKEFLAGS variable. Explicitly overwriting it when invoking payloads/external/iPXE/Makefile ends up forcing serial build of iPXE. iPXE builds hundreds of files and its dependency generation is done separately from compilation making the whole process take couple minutes on a single CPU (which becomes several seconds if large enough number of CPUs is available). iPXE seems to have Make-based build system that has no problems with parallel build and not utilizing that effectively turns it into a bottleneck when building a coreboot image in parallel. It's unclear whether MAKEFLAGS= was even added for any particular purpose. It doesn't prevent child instances from using variables of parents, nor it prevents child instance from running in parallel (because it's still passed as an environment variable that's processed prior of variable assignments on command-line), but it does prevent grandchild instance from running in parallel (actual iPXE's Makefile). MFLAGS contains flags from MAKEFLAGS and isn't used implicitly by Make, so no need to clear it either because iPXE doesn't use it. Change-Id: Iac00e2f86d160793d3217e00ddc5012202b3196a Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83081 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com>
2024-06-22treewide: Move device_tree to commonlibMaximilian Brune
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: I990d74d9fff06b17ec8a6ee962955e4b0df8b907 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77970 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-22libpayload/include/endian.h: Add 64 bit enc/decMaximilian Brune
Add 64 bit encode/decode functions to libpayload, since it is required in the patch that moves device_tree to commonlib. Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: I5dba9a7f41147a511ba1250786e7c51ce623e70a Reviewed-on: https://review.coreboot.org/c/coreboot/+/83082 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-21libpayload: add cse_*info pointer to lib_sysinfoEran Mitrani
Set a pointer in lib_sysinfo for CSE_BP_INFO and CSE_INFO. BUG=b:343022317 TEST=Verified CBMEM data in depthcharge on Screebo Signed-off-by: Eran Mitrani <mitrani@google.com> Change-Id: I3aa64d1e439a0596e732a3c0608d60913cefd19f Reviewed-on: https://review.coreboot.org/c/coreboot/+/82790 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-06-20libpayload/x86: Extend exception handling to x86_64 architectureSubrata Banik
Adds 64-bit (x86_64) support to libpayload's exception handler, previously limited to x86_32. Ensures `exception_init_asm` is called when building with LP_ARCH_X86_64 Kconfig. BUG=b:336265399 TEST=Successful build and boot of google/rex and google/rex64 on ChromeOS. Verified correct x86_64 exception handling by triggering "Debug Exception" using firmware-shell as below: firmware-shell: mm.l -0 Debug Exception Error code: n/a REG_IP: 0x0000000030023e9f REG_FLAGS: 0x0000000000000046 REG_AX: 0x0000000000000009 REG_BX: 0x0000000000000000 REG_CX: 0x0000002000000000 REG_DX: 0x0000000000000001 REG_SP: 0x0000000034072ec0 REG_BP: 0x0000000000000009 REG_SI: 0x0000000000000029 REG_DI: 0x0000000034072eef REG_R8: 0x0000000000000009 REG_R9: 0x0000000000000000 REG_R10: 0x0000000000000000 REG_R11: 0x0000000034072d70 REG_R12: 0x0000000000000004 REG_R13: 0x0000000000000001 REG_R14: 0x0000000034072ee6 REG_R15: 0x0000000000000004 CS: 0x0020 DS: 0x0000 ES: 0x0000 SS: 0x0018 FS: 0x0018 GS: 0x0050 Dumping stack: 0x340730c0: 3003c32e 00000000 ... 00000000 00000000 0x340730a0: 30034bc6 00000000 ... 0000002a 00000000 0x34073080: 34073234 00000000 ... 00002e65 00000000 ... ... 0x34072ee0: 340730ed 30300000 ... 34073000 00000000 0x34072ec0: 34072ed8 00000000 ... 00000000 00000008 Ready for GDB connection. Change-Id: I8f0aa1da8d179a760e8d49c3764dfd5a69d06887 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83036 Reviewed-by: Kapil Porwal <kapilporwal@google.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-12libpayload/arch/x86: Fix register alignment in exception state dumpSubrata Banik
Removed an extra space character from the `printf` format string in `dump_exception_state` to ensure proper alignment of register values when printed during exception handling. BUG=b:336265399 TEST=Built and booted google/rex64 successfully. Verified correct alignment in exception state dumps. Change-Id: I8ff92775e32ee754967b1b0a43cd68971b4aadfc Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83047 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-11treewide: Move skip_atoi function to commonlibKapil Porwal
BUG=none TEST=Build and verify on Screebo TEST=make unit-tests ``` $ make tests/commonlib/bsd/string-test [==========] tests_commonlib_bsd_string-test(tests): Running 1 test(s). [ RUN ] test_skip_atoi [ OK ] test_skip_atoi [==========] tests_commonlib_bsd_string-test(tests): 1 test(s) run. [ PASSED ] 1 test(s). ``` Change-Id: Ifaaa80d0c696a625592ce301f9e3eefb2b4dcd98 Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82910 Reviewed-by: Jakub Czapiga <czapiga@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-06-05payloads/external/leanefi: Add missing licenseMaximilian Brune
Change-Id: Ib95cb55add23fa172f187cbcb475958767f8a923 Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82905 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-05libpayload/arm64: Support FEAT_CCIDXYidi Lin
ARM SoC supports FEAT_CCIDX after ARMv8.3. The register field description of CCSIDR_EL1 is different when FEAT_CCIDX is implemented. If numsets and associativity from CCSIDR_EL1 are not correct, the system would hang during mmu_disable(). Rather than assuming that FEAT_CCIDX is not implemented, this patch adds a check to dcache_apply_all to use the right register format. Reference: - https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/12770 BUG=b:317015456 TEST=mmu_disable works on the FEAT_CCIDX supported SoC. Change-Id: I892009890f6ae889e87c877ffffd76a33d1dc789 Signed-off-by: Yidi Lin <yidilin@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82636 Reviewed-by: Eric Lai <ericllai@google.com> Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-06-04payloads/external/leanefi/Makefile: Fix clean targetMaximilian Brune
Just follow the examples of other payloads and simply remove the build directory of said payload. Change-Id: Idf2a8f3b9ecbb300514d2d1deede76785fd402b7 Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82897 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-04payloads: Add leanefi payloadMaximilian Brune
This adds another external payload to coreboot. The payload has been heavily based on u-boots UEFI implementation. The leanefi payload is basically a translator from coreboot to UEFI. It takes the coreboot tables and transforms them into UEFI interfaces. Although it can potentially load any efi application that can handle the minimized interface that leanefi provides, it has only been tested with LinuxBoot (v6.3.5) as a payload. It has been optimized to support only those interfaces that Linux requires to start. Among other leanefi does not support: - efi capsule update (also efi system resource table) - efi variables - efi text input protocol (it can only output) - most boot services. mostly memory services are left (e.g. alloc/free) - all runtime services (although there is still a very small runtime footprint that is planned to be removed in the near future) - TCG2/TPM (although that is mostly because of laziness) The README.md currently provides more details on why. The payload currently only supports arm64 and has only been tested on emulation/simulator targets. The original motivation was to get ACPI on arm64 published to the OS without using EDK2. It is however also possible to supply the leanefi with a FDT that is published to the OS. At that point one would however probably use coreboot only instead of this shim layer on top. It would be way nicer to have Linux support something else than UEFI to propagate the ACPI tables, but it requires to get the Linux maintainer/community on board. So for now this shim layer ciruimvents that. LBBR Test: // 1. dump FDT from QEMU like mentioned in aarch64 coreboot doc // 2. compile u-root however you like (aarch64) // 3. compile Linux (embed u-root initramfs via Kconfig) // 4. copy Linux kernel to payloads/leanefi/Image // 5. copy following coreboot defconfig to configs/defconfig: CONFIG_BOARD_EMULATION_QEMU_AARCH64=y CONFIG_PAYLOAD_NONE=n CONFIG_PAYLOAD_LEANEFI=y CONFIG_LEANEFI_PAYLOAD=y CONFIG_LEANEFI_PAYLOAD_PATH="[path-to-linux]/arch/arm64/boot/Image" CONFIG_LEANEFI_FDT=y CONFIG_LEANEFI_FDT_PATH="[path-to-dumped-DTB]" // 6. compile coreboot make defconfig make -j$(nproc) // 7. run qemu like mentioned in coreboot doc (no FIT) // 8. say hello to u-root and optionally kexec into the next kernel Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: I4093378e89c3cb43fb0846666de80a7da36b03f1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/78913 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Ron Minnich <rminnich@gmail.com> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-05-29payloads/iPXE: Hook up TRUST_CMD switchMaciej Pijanowski
Change-Id: Ia4f5d4140eeb8625c5ee41e38f048658db28a199 Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79684 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-29libpayload: Include libpayload-config.h in lib targetSubrata Banik
- Added `$(obj)/libpayload-config.h` as a dependency for the `lib` target. - This ensures the config header is up-to-date before building the library. TEST=Able to build google/rex. Change-Id: If26336f6261aadf611fa5338c4300873156cc3da Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82687 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Dinesh Gehlot <digehlot@google.com> Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-05-26libpayload: Add x86_64 (64-bit) supportSubrata Banik
This patch introduces x86_64 (64-bit) support to the payload, building upon the existing x86 (32-bit) architecture. Files necessary for 64-bit compilation are now guarded by the `CONFIG_LP_ARCH_X86_64` Kconfig option. BUG=b:242829490 TEST=Able to verify all valid combinations between coreboot and payload with this patch. Payload Entry Point Behavior with below code. +----------------+--------------------+----------------------------+ | LP_ARCH_X86_64 | Payload Entry Mode | Description | +----------------+--------------------+----------------------------+ | No | 32-bit | Direct protected mode init | +----------------+--------------------+----------------------------+ | Yes | 32-bit | Protected to long mode | +----------------+--------------------+----------------------------+ | Yes | 64-bit | Long mode initialization | +----------------+--------------------+----------------------------+ Change-Id: I69fda47bedf1a14807b1515c4aed6e3a1d5b8585 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81968 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-24libpayload: Inject head.S into libc, remove separate classSubrata Banik
Integrate head.S directly into libc and remove all instances of head.o. * Drop 'separate class' entry for head.S. * Drop special treament for head.o inside lpgcc. * Change the .text in `x86/head.S` to `.section .text._entry`. * Drop arch/mock/head.c, initially added as a dummy file. Change-Id: I156d781908fcc38d455bbf9f2c29e5ab95c7775a Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82478 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-05-24libpayload: x86: Move Multiboot header to include fileSubrata Banik
This moves the multiboot header into its own include file, simplifying head.S and making it easier to include/exclude the multiboot header based on config options. BUG=b:242829490 TEST=Able to build and boot google/rex. Change-Id: I59a22dfe36044b4dd64a5b028a134be7a7d02a48 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82533 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-18Libpayload: Rename arch variable _ARCH to _ARCHDIR for consistencySubrata Banik
This commit renames the variable _ARCH to _ARCHDIR in the libpayload build script (lpgcc) to align with the naming convention of other variables used in this file. This change improves code readability and maintainability. Change-Id: Iea4af68e49ab1cd7ec8156a14f8215244e9c0622 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82479 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-15payload/external/edk2: Explicitly define the build arch as X64Nicholas Sudsgaard
Upstream commit 11ad164bce (UefiPayloadPkg: Make UPL build script arch agnostic, 2024-02-22) changes the build script's behavior to not assume the arch. Without defining BUILD_ARCH, the build script will not function properly and results in the payload failing to build. Both UefiPayload and Universal Payload can only be built in X64. Change-Id: Icd942d0c15a99231d09f9cbdc5eb48333b6aa6e5 Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80883 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com> Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2024-05-11LinuxBoot/Makefile: initramfs not build for bzImageFrans Hendriks
initramfs is not build when bzImage is selected Add build/initramfs dependency to build/bzImage BUG = N/A TEST = Built and boot facebook monolith Change-Id: I002202a0340347e78ce22024761d997605bd3f72 Signed-off-by: Frans Hendriks <fhendriks@eltan.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77606 Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-04payloads/U-Boot: Upgrade from U-Boot v2023.07 to v2024.4Elyes Haouas
U-Boot v2024.04 was released on Tue 02 April 2024 Change-Id: I21fe81e9e01f2f21f9a4581fa8fdbf661fe270bd Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82007 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-04libpayload: Save EAX and EBX only for multiboot payloadsSubrata Banik
When CONFIG_LP_MULTIBOOT is enabled, save the values of EAX and EBX passed from the bootloader. This information can be useful for multiboot payloads feature alone. Change-Id: I98c2cd00206ee48eb0fc67edd9533032bcf3e5eb Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82040 Reviewed-by: Kapil Porwal <kapilporwal@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-04-20payloads/edk2: Add Kconfig to use LAPIC timerJean Lucas
Core 2 platforms have issues with HPET. Enable support to use the LAPIC driver so those machines actually boot and don't hang. The LAPIC is actually closer to the CPU than the HPET (on the PCH), which reduces access latency, leading to higher resolution of the timer. Tested on a Lenovo X200 with a Core 2 Duo. Change-Id: I33144d6c1c120e7faa47b99e8262b0997c45c9b9 Signed-off-by: Jean Lucas <jean@4ray.co> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82000 Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-04-19libpayload: Fix inl() return type mismatchSubrata Banik
Change `inl()` return type from `unsigned long` to `unsigned int` to match the function definition and ensure consistency across platforms. BUG=b:242829490 TEST=Compiled successfully in 32-bit and 64-bit modes. Change-Id: I681935665c8de9ee472ab72fe1ac2f5dcc0f2534 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81961 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-04-17payloads/edk2: Add Kconfig to enable AMD Picasso eMMC driverMatt DeVillier
Add a Kconfig to selectively enable the AMD Picasso eMMC driver recently added to MrChromebox's edk2 fork. When selected, will enable booting from AMD Picasso devices with eMMC storage. TEST=tested with rest of patch train Change-Id: I6536a6f243f6766b913e295afebcf5b965e4e969 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81892 Reviewed-by: Sean Rhodes <sean@starlabs.systems> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-04-17payloads/external: Call $(strip_quotes ) on prebuilt iPXE pathNico Huber
Currently, we keep the double-quotes from Kconfig, resulting in an invalid path. So just call `strip_quotes` like we do with all other paths from Kconfig. Change-Id: Ibcaa59be0fdd84d1fb9e061394fd9b0f7aa1830b Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81947 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-04-16payloads/edk2/Makefile: Drop duplicated build string optionMatt DeVillier
The `PRIORITIZE_INTERNAL` option was somehow duplicated, so remove the extra copy, leaving the one under the MrChromebox repo specific settings. TEST=build qemu w/edk2 payload, check build log that the 'PRIORITIZE_INTERNAL' option is only added once to the build string. Change-Id: I4c4c433184d93337c926e256e77054afc00a2566 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81894 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2024-04-16payloads/edk2: Add Kconfig to enable UFS supportMatt DeVillier
Add a Kconfig to selectively enable the UFS DXE driver recently added to MrChromebox's edk2 fork. When selected, will enable booting from devices with UFS storage. TEST=tested with rest of patch train Change-Id: I0b54d21dc87abf6938c03948830f92ce5097ef7d Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81870 Reviewed-by: Sean Rhodes <sean@starlabs.systems> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-03-25libpayload: Include commonlib/helpers.h in libpayload.h for GPL buildsJulius Werner
This patch makes the GPL-restricted commonlib helpers available in libpayload when CONFIG_LP_GPL is selected, as a convenience to GPL payloads that use them a lot. Cq-Depend: chromium:5375721 Change-Id: I844c6e700c4c0d557f97da94fa3aa2e868edd756 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81289 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-03-19libpayload: gdb: Make die_if() format string a literalJulius Werner
CB:77969 made minor changes to the die_if() macro. One of the consequences is that the format string passed to it can no longer be a real `char *` variable, it needs to actually be a string literal. In the vast majority of call sites that is already the case, but there was one instance in the GDB code where we're reusing the same format string many times and for that reason put it into a const variable. Fix that by turning it into a #define macro instead. (Even though this technically duplicates the format string, the linker is able to merge identical string literals together again, so it doesn't really end up taking more space.) Change-Id: I532a04b868f12aa0e3c01422c075ddaade251827 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81361 Reviewed-by: Nick Vaccaro <nvaccaro@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-03-17libpayload: Make GPL commonlib includes available to payloads and testsJulius Werner
CB:77968 made some non-BSD commonlib files part of libpayload when CONFIG_LP_GPL is set. This patch exports those headers to the payload (again only when CONFIG_LP_GPL is set) so that payloads can also call the functions in them directly. Also make those includes available to tests so that their functions can be tested. There's no menuconfig for unit tests, so they are included unconditionally, but this should be fine since the tests are standalone and won't have to link with any proprietary third-party code. Change-Id: Ifc3e52ee5c3e51520f7b7d44b483bfcb0e8380f8 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81287 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2024-03-17payloads/edk2: Set the EDK2 repository to custom for UPLSean Rhodes
UPL requires the Shim Layer, and those patches exist in the `starlabsltd` fork. Set the repository to custom, to allow this fork and branch to be selected correctly. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Ieca72498bde51a184d689670449b66ccc78d658a Reviewed-on: https://review.coreboot.org/c/coreboot/+/81277 Reviewed-by: Benjamin Doron <benjamin.doron00@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-03-15treewide: Move stdlib.h to commonlibMaximilian Brune
This patch moves commonlib/stdlib.h -> commonlib/bsd/stdlib.h, since all code is BSD licensed anyway. It also moves some code from libpayloads stdlib.h to commonlib/bsd/stdlib.h so that it can be shared with coreboot. This is useful for a subsequent commit that adds devicetree.c into commonlib. Also we don't support DMA on arm platforms in coreboot (only libpayload) therefore `dma_malloc()` has been removed and `dma_coherent()` has been moved to architecture specific functions. Any architecture that tries to use `dma_coherent()` now will get a compile time error. In order to not break current platforms like mb/google/herobrine which make use of the commonlib/storage/sdhci.c controller which in turn uses `dma_coherent` a stub has been added to arch/arm64/dma.c. Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: I3a7ab0d1ddcc7ce9af121a61b4d4eafc9e563a8a Reviewed-on: https://review.coreboot.org/c/coreboot/+/77969 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-03-13cbfs: Remove broken remnants of PAYLOAD_INFO featureJulius Werner
PAYLOAD_INFO is a very old feature that can add a key/value information section to a payload file. It seems to have only ever been generated by coreinfo and never really read by anything. Since CB:1721 in 2012, the feature has been inadvertently broken in practice since the `.note.pinfo` sections that contain the information get discarded from the payload before cbfstool gets to see them. Since CB:28647 in 2018, support for the section in the SELF loader was (inadvertently?) dropped, so if someone actually fed cbfstool a payload ELF that did have a `.note.pinfo` section, modern coreboot would refuse to boot the payload entirely (which is probably not a good state to leave things in). This patch removes the code to generate PAYLOAD_INFO entries entirely, but leaves the support to parse and extract those sections from old payloads in place in cbfstool. Change-Id: I40d8e9b76a171ebcdaa2eae02d54a1ca5e592c85 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81087 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-03-13payloads: allow selecting a file for FLAT_BINARYRonald G Minnich
085c97363ed6477c64b61263a59d7e9642e05cda introduced a bug in that we could not select a file to use, and, in fact, the payload was never installed into the image in this case. Add FLAT_BINARY to the predicate enabling a file selection dialog. Change-Id: I8174b656b1e6ebb3663172f473e4070b30f19126 Signed-off-by: Ronald G Minnich <rminnich@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81183 Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Philipp Hug <philipp@hug.cx> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-03-12payloads/Kconfig: Add flat binary as payload optionMaximilian Brune
This add another choice option for adding a flat binary instead of an ELF or some other payload. It keeps the IS_PAYLOAD_FLAT_BINARY hidden in the menuconfig because it is generally not configurable but dependent on the payload you selected. CONFIG_PAYLOAD_OPTIONS has been exposed to be configurable in commit f0055e4a81 (payloads/Kconfig: Add flat binary as payload option) as part trying to enable flat binary payloads. CONFIG_PAYLOAD_OPTIONS do not need to be configurable though unless you have a flat binary. The patch therefore takes a different appraoch by adding a new payload type besides PAYLOAD_ELF and PAYLOAD_FIT. Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: If775e0846f9a5631da3fc103bdd9e6aea0be879a Reviewed-on: https://review.coreboot.org/c/coreboot/+/80191 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-03-09tests: Add `DEBUG` make commandline option to generate debug symbolsJulius Werner
Sometimes when a test doesn't work it's convenient to run it through GDB. This patch adds a variable you can set on the make commandline to conveniently enable all the compiler flags needed to make that work. Change-Id: I3ac80ad095e0b72cc3176cbf915d1f390cd01558 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81112 Reviewed-by: Jakub Czapiga <czapiga@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-03-04LinuxBoot/targets/u-root.mk: Correct config for UROOT_ARCHFrans Hendriks
The using config string for amd64 as UROOT_ARCH contains typo Correct using CONFIG_LINUXBOOT_X86_64 BUG = N/A TEST = Build boot facebook monolith Change-Id: I6cfefb3f8e4e61bd56ca0fe3239000db8c07b088 Signed-off-by: Frans Hendriks <fhendriks@eltan.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77605 Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-03-04payloads/depthcharge: Add DEPTHCHARGE_REPO and DEPTHCHARGE_BRANCHCliff Huang
Move hard-coded repo and repo name to Kconfig as default value DEPTHCHARGE_REPO default to: https://chromium.googlesource.com/chromiumos/platform/depthcharge DEPTHCHARGE_BRANCH default to: origin/main When DEPTHCHARGE_MASTER=y, DEPTHCHARGE_BRANCH can be used to point out a particular branch. This change enable to use mirrored internal depthcharge repo and branch for early SOC development (before upstreaming SOC and dephthcharge code). TEST=Build coreboot and check the repo remote link from: payloads/external/depthcharge/depthcharge Signed-off-by: Cliff Huang <cliff.huang@intel.com> Change-Id: Icca10aa770b7b7a6e010f58bcf1e4f0a3401681a Reviewed-on: https://review.coreboot.org/c/coreboot/+/80726 Reviewed-by: Bora Guvendik <bora.guvendik@intel.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Wonkyu Kim <wonkyu.kim@intel.com> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Zhixing Ma <zhixing.ma@intel.com>
2024-03-04payloads/LinuxBoot: Build the linux kernel with -j $(CPUS)Arthur Heymans
Build the Linux kernel with the same amount of jobs as coreboot. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: Ie7af5aef4560b8d4dd840d9c578f8a2a4c387400 Reviewed-on: https://review.coreboot.org/c/coreboot/+/78644 Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-02-24treewide: Move list.h to commonlibMaximilian Brune
It is needed in order to move device_tree.c into commonlib in a subsequent commit. Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: I16eb7b743fb1d36301f0eda563a62364e7a9cfec Reviewed-on: https://review.coreboot.org/c/coreboot/+/77968 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-02-24vboot: Enable new arm64 SIMD crypto accelerationJulius Werner
This patch passes the correct flag to vboot to enable SIMD crypto acceleration on arm64 devices. This uses a core part of the ISA and should thus be supported on all arm64 SoCs -- so we normally always want it enabled, but there should still be a Kconfig in case a SoC wants to use the hwcrypto interface for its own (off-CPU) crypto acceleration engine instead. (You could also disable it to save a small amount of code size at the cost of speed, if necessary.) Change-Id: I3820bd6b7505202b7edb6768385ce5deb18777a4 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80710 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-02-22libpayload: Remove legacy CBFS APIJulius Werner
It's been several years already since we announced the deprecation of the legacy CBFS API for payloads. It's time to remove it completely. Change-Id: I0ed157ac2d1376b8dff4537af9a63731064b45f6 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80650 Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Jakub Czapiga <czapiga@google.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2024-02-18payloads: Add SPDX headers to KconfigMartin Roth
Change-Id: Iea569fd457b3cd1f4746fbc6a96319eb42733a6b Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80586 Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-02-18Treewide: Fix incorrect SPDX license stringsMartin Roth
These strings didn't match the license names exactly, so update them to match. Change-Id: Ib946eb15ca5fa64cbd6b657350b989b4a4c1b7b7 Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80583 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-02-08libpayload: timer: Revert timer_hz() return type to 64-bitsJulius Werner
It seems that reducing the return type of timer_hz() to uint32_t in CB:78888 was a bad idea... some Intel platforms actually use their raw CPU clock for the timestamp counter which can be higher than 4GHz. This patch reverts it back to uint64_t. Also remove the redundant assertion in timer/generic.c since timer_us() itself already does that check. Cq-Depend: chromium:5274555 Change-Id: I471c7de7a28aec5bb965b23525ed579481ac8361 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80320 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Yidi Lin <yidilin@google.com>
2024-02-08commonlib: Change GCD function to always use 64 bitsJulius Werner
It seems that we have some applications where we need to calculate a GCD in 64 bits. Now, we could instantiate the algorithm multiple times for different bit width combinations to be able to use the most efficient one for each problem... but considering that the function usually only gets called once per callsite per stage, and that software emulation of 64-bit division on 32-bit systems doesn't take *that* long either, we would probably usually be paying more time loading the second instance of the function than we save with faster divisions. So let's just make things easy and always do it in 64-bit and then nobody has to spend time thinking on which version to call. Change-Id: I028361444c4048a0d76ba4f80c7334a9d9983c87 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80319 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yidi Lin <yidilin@google.com>
2024-02-02libpayload: Switch to commonlib ipchksum() algorithmJulius Werner
This patch moves libpayload over to the commonlib implementation for calculating the IP checksum. Change-Id: Ie8d323ce9f8d946758619761b4b22d54bce222b6 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80253 Reviewed-by: Jakub Czapiga <czapiga@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Yidi Lin <yidilin@google.com>
2024-01-26payloads/Kconfig: Make flat-binary configurableMaximilian Brune
This adds the ability to add a flat-binary using menuconfig. Test: boot hifive-unmatched mainboard with the following config: CONFIG_PAYLOAD_NONE=n CONFIG_PAYLOAD_ELF=y CONFIG_PAYLOAD_FILE="~/repos/linux-riscv/arch/riscv/boot/Image" CONFIG_PAYLOAD_IS_FLAT_BINARY=y CONFIG_PAYLOAD_OPTIONS="-l 0x82000000 -e 0x82000000" CONFIG_COMPRESSED_PAYLOAD_LZMA=y Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: I48c6b53a0c9f5b173c89f1a294a0c37fa1a58f31 Reviewed-on: https://review.coreboot.org/c/coreboot/+/79950 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-24payloads: Rename Makefiles from .inc to .mkMartin Roth
The .inc suffix is confusing to various tools as it's not specific to Makefiles. This means that editors don't recognize the files, and don't open them with highlighting and any other specific editor functionality. This issue is also seen in the release notes generation script where Makefiles get renamed before running cloc. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Ie7038712de8cc646632d5e7d29550e3260bf2c62 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80103 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-24Makefiles: Rename top-level Makefiles from .inc to .mkMartin Roth
The .inc suffix is confusing to various tools as it's not specific to Makefiles. This means that editors don't recognize the files, and don't open them with highlighting and any other specific editor functionality. This issue is also seen in the release notes generation script where Makefiles get renamed before running cloc. The rest of the Makefiles will be renamed in following commits. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Idaf69c6871d0bc1ee5e2e53157b8631c55eb3db9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80063 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-01-22libpayload/arch/arm64/mmu: Specify ttb_buffer section name explicitlyYu-Ping Wu
Although a section ".bss.ttb_buffer" is created automatically for 'ttb_buffer' with the GCC option '-fdata-sections', specify the section name explicitly to make the name stand out to code readers, and to reduce the chance of accidentally changing the section name by renaming the variable. Change-Id: I2930f238f63b555c4caa65709768afa314d9cf87 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80014 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-01-21payload/grub2: Update from 2.06 to 2.12Felix Singer
Change-Id: I267d341075b907ac72439cf28c2c1458cbeb8d4b Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80019 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-01-21payload/seabios: Update from 1.16.2 to 1.16.3Felix Singer
Change-Id: Idfe479272abf2db93f8fc4bc1ba02d8b8072fcfe Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80018 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-01-18libpayload/vboot/Makefile.inc: Pass FIRMWARE_ARCH=mock if LP_ARCH_MOCKYu-Ping Wu
If CONFIG_LP_ARCH_MOCK, pass FIRMWARE_ARCH=mock when building vboot fwlib, so that vboot's Makefile will append the correct flags to CFLAGS. BUG=none TEST=(depthcharge) make unit-tests -j BRANCH=none Cq-Depend: chromium:5182247 Change-Id: I9ead7f2f93eac5f5c3887074423fb9aa50a489c0 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79956 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-14libpayload: Make sure to install into the right DESTDIRNico Huber
A recent update broke installation of commonlib headers with a relative path in $(DESTDIR), which is the default. Make sure to install into the right location in case we changed the current directory. Change-Id: I61fa4aa0ecd0f81ee03ff89183e1b65e7875dea6 Signed-off-by: Nico Huber <nico.h@gmx.de> Fixes: ee53dfd07d3b (libpayload: Remove shell for loops in install Makefile target) Reviewed-on: https://review.coreboot.org/c/coreboot/+/79908 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-11libpayload: Move back the ttb_buffer sectionYi Chou
Moving it into the .ttb_buffer section will accidentally set the LOAD flag. So, move it back to .bss.ttb_buffer section to prevent the binary size bloating. BUG=b:248610274 TEST=Make sure the device is still bootable with this change. BRANCH=none Cq-Depend: chromium:5173448 Change-Id: I9bb08878dd4be01d9ed3f96933f774dd6296f76e Signed-off-by: Yi Chou <yich@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79800 Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-12-31libpayload: Remove shell for loops in install Makefile targetPatrick Georgi
They always require special care so that line breaks and variable names are escaped properly. One loop can be removed entirely because install accepts multiple files to install in a target directories, the other loops were filled by find which can just call the commands on its own. Change-Id: I9f9dddfe3f3ceceb6a0510d6dd862351e4b10210 Signed-off-by: Patrick Georgi <patrick@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79523 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-12-28libpayload: Add VBOOT_X86_RSA_ACCELERATION configJeremy Compostella
Add `VBOOT_X86_RSA_ACCELERATION' Kconfig option to enable SSE2 instruction set implementation of modulus exponentiation which is part of the RSA signature verification process. This option is enabled on CHROMEOS. | modpow() function call | original on rex0 | SSE2 on rex0 | |------------------------+------------------+--------------| | depthcharge - step 1 | 0.547 | 0.288 | | depthcharge - step 2 | 0.152 | 0.081 | | depthcharge - step 3 | 0.164 | 0.079 | |------------------------+------------------+--------------| | Total (ms) | 0.863 | 0.448 | | modpow() function call | original on brya0 | SSE2 on rex0 | |------------------------+-------------------+--------------| | depthcharge - step 1 | 0.693 | 0.248 | | depthcharge - step 2 | 0.172 | 0.065 | | depthcharge - step 3 | 0.223 | 0.067 | |------------------------+-------------------+--------------| | Total (ms) | 1.088 | 0.38 | BUG=b:312709384 TEST=modular exponentiation is about twice faster on rex0 and brya0 Change-Id: I801ebd7839261c6bd07fb218e1e36a7108e219bf Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79290 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2023-12-20treewide: Use show_notices target for warningsMartin Roth
This updates all warnings currently being printed under the files_added and build_complete targets to the show_notices target. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Ia14d790dd377f2892f047059b6d24e5b5c5ea823 Reviewed-on: https://review.coreboot.org/c/coreboot/+/79423 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-12-11libpayload/arm64: Round fb_size up to a multiple of GRANULE_SIZEYidi Lin
If a framebuffer is already configured by coreboot, we need to ensure that the framebuffer size is a multiple of GRANULE_SIZE before passing to `mmu_add_memrange`. Otherwise, we would fail to allocate memory region due to `sanity_check`. Change-Id: Ia6a6400733ca10a61220087e87022f68c28e4789 Signed-off-by: Yidi Lin <yidilin@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79451 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-12-01libpayload: Fix the stack and data labelsYi Chou
We should make sure _stack/_estack and the other labels are consistent. And _data & _edata is also useful to clean up the sensitive data on the data section. BUG=b:248610274 TEST=emerge-cherry libpayload BRANCH=none Cq-Depend: chromium:5052462 Change-Id: I589040f4db60b35813ea9f4ba9503244bd7def00 Signed-off-by: Yi Chou <yich@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79144 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2023-11-25libpayload/unit-tests: Rename ARCH_BIG_ENDIAN to ARCH_MOCK_BIG_ENDIANPatrick Georgi
This fixes commit 12ae850dfc1 which used the wrong symbol, and previous versions of Kconfig didn't notice. Change-Id: I7145fd81a30a1455a6dd2c7f24564956a116d180 Signed-off-by: Patrick Georgi <patrick@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79263 Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-23libpayload: Move ttb_buffer to a standalone sectionYi Chou
When cleaning the sensitive data in the memory, we will want to prevent zero out the content of tbb_buffer. Move the ttb_buffer to a standalone section will simplify the problem. BUG=b:248610274 TEST=emerge-cherry libpayload BRANCH=none Change-Id: I610276cbe30552263d791860c15e5ad9a201c744 Signed-off-by: Yi Chou <yich@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79078 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-21libpayload: Add dma_allocator_range()Yi Chou
Some sensitive data may remain DMA buffer, we will want to zero out everything on the DMA buffer before we jump into the kernel to prevent leaking sensitive data into the kernel. To accomplish that, we will need this function to get the range of memory that can be allocated by the dma allocator. BUG=b:248610274 TEST=emerge-cherry libpayload BRANCH=none Signed-off-by: Yi Chou <yich@google.com> Change-Id: I8f3058dfd861ed44f716623967201b8cabe8d166 Reviewed-on: https://review.coreboot.org/c/coreboot/+/78407 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2023-11-11payloads/ipxe: Prefix iPXE options with "IPXE" instead "PXE"Felix Singer
Change-Id: Ieef433e9d6745c6243b4823c9a7f250d3c53ebcb Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78926 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-11payloads/ipxe/Kconfig: Properly guard iPXE optionsFelix Singer
Guard multiple options depending on another with an if-block. It's not needed to repeat the condition for every option. This also cleans up the ordering of the options and groups all options related to iPXE. Change-Id: I9e74ab567f619a2d5c20c6c0282b37193d9ac01b Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78925 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-08payloads/edk2: Remove the warning about edk2/master not workingSean Rhodes
Since #c4fdec0a83d69bd0399b1b4351fa9c3af3c6fd65, edk2/master will work with coreboot without modification. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I8350f5114445d2608861ef6e807f958e598dfe07 Reviewed-on: https://review.coreboot.org/c/coreboot/+/78636 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2023-11-07libpayload/libc/time: Fix possible overflow in multiplicationYidi Lin
The value from raw_read_cntfrq_el0() could be large enough to cause overflow when multiplied by USECS_PER_SEC. To prevent this, both USECS_PER_SEC and hz can be reduced by dividing them by their GCD. This patch also modifies the return type of `timer_hz()` from `uint64_t` to `uint32_t`, assuming that in practice the timestamp counter should never be that fast. BUG=b:307790895 TEST=boot to kernel and check the timestamps from `cbmem` Change-Id: Ia55532490651fcf47128b83a8554751f050bcc89 Signed-off-by: Yidi Lin <yidilin@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78888 Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-06payloads/ipxe/Makefile: Use sed more properlyFelix Singer
Instead of redirecting the output of sed into a temporary file and copying it to its target then, just tell sed to do the replacements in-place and don't let it create a backup of the original file. The overhead is not needed. Change-Id: I442616cd78098b653af5bd49bc7a4f021c99e081 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78924 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-11-04libpayload/libc/getopt_long: Use common GCDYidi Lin
TEST=emerge-geralt libpayload Change-Id: Ib9dd1d2f658d4411c36d0198774819690686a393 Signed-off-by: Yidi Lin <yidilin@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78887 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-28payloads/LinuxBoot: Add uImage to clean targetArthur Heymans
uImages are generated for non-x86 arch. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: Icb1184497087d66a7cc6fd27402365a028cc4eaf Reviewed-on: https://review.coreboot.org/c/coreboot/+/78643 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
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>