Commit Graph

1913 Commits

Author SHA1 Message Date
Sean Rhodes 91564fc370 payloads/edk2: Separate the build target and repository
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-10-08 20:57:20 +00:00
Sergii Dmytruk 68eef53ead payloads/external/skiboot/Makefile: fix output on `make clean`
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-28 17:35:37 +00:00
Jakub Czapiga a0e36d8cba tests: Add support for tests build failures detection
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-21 14:06:42 +00:00
Julius Werner d96ca24652 cbfs/vboot: Adapt to new vb2_digest API
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-02 23:51:29 +00:00
Hsin-Te Yuan cb28d649ea x86/cache.c: Implement dcache_*
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-01 14:21:11 +00:00
Sean Rhodes 234c42f7ed payloads/edk2: Remove architecture from build string
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-01 14:15:13 +00:00
Sean Rhodes 461d1c8268 payloads/edk2: Rename the update recipe
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-01 14:14:31 +00:00
Sean Rhodes f2a9a3fb41 payloads/edk2: Clone edk2 and its submodules in parallel
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-01 14:13:49 +00:00
Sean Rhodes bbec7129d4 payloads/edk2: Adjust the WORKSPACE target
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-01 14:13:15 +00:00
Sean Rhodes 306550dac9 payloads/edk2: Convert UefiPayloadPkg to a file target
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-09-01 14:11:57 +00:00
Sean Rhodes 724c0cd5b4 payloads/edk2: Separate the tasks required to build edk2
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>
2022-08-24 23:58:15 +00:00
Sean Rhodes 147c9578a1 payloads/edk2: Separate the Release String variable
Separate the Release String from the Build String. This allows
the makefile to locate built files more precisely.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Id98674f0bbf485b2bfdbf5784d325c5ac89ad076
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66358
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-08-24 23:56:46 +00:00
Yu-Ping Wu 30d8e724e7 libpayload: Add const for dma_coherent argument
Add the const modifier for the ptr argument of dma_coherent to avoid
unnecessary type casting in payloads.

BUG=none
TEST=emerge-corsola libpayload
BRANCH=none

Change-Id: Ic4bb1d8318c7e83fd3ab3054aa0333cb27afe588
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66961
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hsin-Te Yuan <yuanhsinte@google.com>
2022-08-24 21:27:46 +00:00
Sean Rhodes 403d22076c payloads/edk2: Move building to directory called workspace
The current edk2 makefile will work in a directory that's name is
derived from the repository, such as `mrchromebox` or `starlabsltd`.

Move this under a directory, so that it can be ignored by git and
so that the makefile can be adjusted to use file targets, rather
than phony recipes with wildcards.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: If0c80dbc59130f229b78cab9578115e14172301d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66356
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-08-24 21:27:24 +00:00
Sean Rhodes b02cc14367 payloads/edk2: Move the restoration of the logo
Logo.bmp is overwritten with a custom one from coreboot. This needs to
be restored before the branch is updated otherwise git will report that
the repository is dirty.

Move this to the update recipe so that will always be done for any
recipe that needs to update the branch.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I85bf753a47d9e70d6555dec9a539e8ed7395bead
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66355
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-08-14 21:20:06 +00:00
Sean Rhodes 175445b4bb payloads/edk2: Move printing the build options to a separate recipe
Move the code that prints the edk2 build options to it's own recipe
so that it can be called for different targets.

This change also fixes the print, as it accounts for recent switches
such as `--pcd` and `-s`.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Ie797ca26cd28eab0f633bd8dee5ec19634fcea99
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66354
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-08-13 17:11:54 +00:00
Sean Rhodes 38c99b5659 payloads/tianocore: Rename TianoCore to edk2
coreboot uses TianoCore interchangeably with EDK II, and whilst the
meaning is generally clear, it's not the payload it uses. EDK II is
commonly written as edk2.

coreboot builds edk2 directly from the edk2 repository. Whilst it
can build some components from edk2-platforms, the target is still
edk2.

[1] tianocore.org - "Welcome to TianoCore, the community supporting"
[2] tianocore.org - "EDK II is a modern, feature-rich, cross-platform
firmware development environment for the UEFI and UEFI Platform
Initialization (PI) specifications."

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I4de125d92ae38ff8dfd0c4c06806c2d2921945ab
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65820
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-08-13 16:35:18 +00:00
Yidi Lin 5ef258b3f6 libpayload: usb: Fix spacing issues
Found by:
find payloads/libpayload/drivers/usb -type f -name "*.[ch]" | xargs \
util/lint/checkpatch.pl --types SPACING -q --fix-inplace -f

Change-Id: Id23e2e573e475c6d795812a4b2df9aeffbcaaaf4
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66596
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-08-12 17:17:53 +00:00
Yidi Lin 8610dd5022 libpayload: usbmsc: Prevent usbdisk_remove() from being called twice
When removing SD card from USB card reader, the USB MSC stack does
not detach the device immediately. Instead, the USB MSC stack calls
usbdisk_remove() and calls usb_msc_destroy() after several pollings.
It results in usbdisk_remove() being called twice.

Since the usbmsc_inst_t instance is freed after first usbdisk_remove()
call, the second call invokes an invalid usbmsc_inst_t instance and
causes exception in CPU.

This patch prevents usbdisk_remove() from being called twice by setting
usbdisk_created to zero.

BUG=b:239492347
TEST=insert an empty SD card into the USB card reader then remove
     the SD card. AP firmware does not crash.

Change-Id: I0675e9fde3e770d63dd0047928356a204245ef18
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66449
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-08-12 17:14:54 +00:00
Sean Rhodes 02f2b19384 payloads/tianocore: Remove the option for CorebootPayloadPkg
Recent changes to both coreboot and edk2 means that UefiPayloadPkg
seems to work on all hardware. It has been tested on:
* Intel Core 2nd, 3rd, 4th, 5th, 6th, 8th, 8th, 9th, 10th,
  11th and 12th generation processors
* Intel Small Core BYT, BSW, APL, GLK and GLK-R processors
* AMD Stoney Ridge and Picasso

This includes the problematic Lenovo X230s. The most likely fixes are:
* Configuring the PCI Base and Length in edk2
* Fixes to the HostBridgeLib in edk2
* Adjustment to the SD/eMMC initialisation timeout

This means we can now remove the already deprecated option for
CorebootPayloadPkg and the legacy 8254 timer build option.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Ice7b7576eb3d32ea46e5138266b7df3fbcdcf7ea
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65721
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-08-07 19:48:17 +00:00
Matt DeVillier 4c24606637 payloads/tianocore/Makefile: Fix restoring default boot logo
the missing `; \` at the end of the line meant subsequent lines
were no longer run from $project_dir, so Logo.bmp was silently
failing to restore. This led to the working dir being dirty,
and on subsequent runs, any change to a different branch in the
same repo would fail.

Change-Id: I17a323bc2dda19b69d809e398b273f24e14b43af
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66321
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-08-02 12:19:34 +00:00
Veerabhadrarao Badiganti 7a0440afc6 libpayload: Enable PCIe driver for sc7280
Enable PCIe driver for herobrine board.

BUG=b:182963902,b:216686574,b:181098581
TEST=Verified on Qualcomm sc7280 development board with NVMe card
(Koixa NVMe, Model-KBG40ZPZ256G with FW AEGA0102). Confirmed NVMe is
getting detected in response to 'storage init' command in depthcharge
CLI prompt.

Output logs:
  ->dpch: storage init
    Initializing NVMe controller 1e0f:0001
    Identified NVMe model KBG40ZPZ256G TOSHIBA MEMORY
    Added NVMe drive "NVMe Namespace 1" lbasize:512, count:0x1dcf32b0
    *  0: NVMe Namespace 1
    1 devices total

Also verified NVMe boot path, that is depthcharge is able to load the
kernel image from NVMe storage.

Change-Id: Idb693ca219ba1e5dfc8aec34027085b53af49a2c
Signed-off-by: Veerabhadrarao Badiganti <quic_vbadigan@quicinc.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65661
Reviewed-by: Shelley Chen <shchen@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-08-01 18:04:54 +00:00
Prasad Malisetty 857d3781e2 libpayload/pci: Add pci_map_bus function for Qualcomm platform
Add 'pci_map_bus' function and PCIE_QCOM config for Qualcomm platform.

BUG=b:182963902,b:216686574,b:181098581
TEST=Verified on Qualcomm sc7280 development board with NVMe endpoint
(Koixa NVMe, Model-KBG40ZPZ256G with FW AEGA0102). Confirmed NVMe is
getting detected in response to 'storage init' command in depthcharge
CLI prompt.

Output logs:
 ->dpch: storage init
   Initializing NVMe controller 1e0f:0001
   Identified NVMe model KBG40ZPZ256G TOSHIBA MEMORY
   Added NVMe drive "NVMe Namespace 1" lbasize:512, count:0x1dcf32b0
  *  0: NVMe Namespace 1
    1 devices total

Also verified NVMe boot path that is depthcharge is able to load the
kernel image from NVMe storage.

Change-Id: I7d1217502cbd7d4d0cdd298919ae82435630d61c
Signed-off-by: Prasad Malisetty <quic_pmaliset@quicinc.com>
Signed-off-by: Veerabhadrarao Badiganti <quic_vbadigan@quicinc.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57615
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-08-01 18:04:54 +00:00
Sean Rhodes 37bf8c6dd5 payloads/tianocore: Update MrChromebox’ default branch to 202207
Update MrChromebox’ default branch from uefipayload_202107 to
uefipayload_202207.

This is based on upstream edk2, commit f26b70c (UefiPayloadPkg:
Add support for logging to CBMEM console).

Tested on:
* StarBook Mk V
* StarLite Mk III

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I16a012485e4b4957439e776914ffd016b4506a47
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66083
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
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>
2022-07-30 18:43:09 +00:00
Matt DeVillier 38a682fe92 payloads/tianocore: Use SMMSTORE when branch is MrChromeBox
SMMSTORE support in edk2 was not allowed in upstream edk2
as it was bootloader specific.

Shortly, it will be built from edk2-platforms and then,
it will be retired.

For now, the patches exist in the MrChromeBox fork (TIANOCORE_UEFIPAYLOAD), so enable
these by default when SMMSTORE_v2 is enabled.

Change-Id: I1861bf739c2e25f661b4f06a303348f0537dc8b3
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65867
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-30 18:41:55 +00:00
Sean Rhodes c5055883eb payloads/tianocore: Allow passing custom build params to all versions
Allow passing custom build parameters to any version of edk2, not
just forks.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I4eed535415ba15ae73e22cada9153820538f5f6d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66210
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-07-30 18:40:58 +00:00
Sean Rhodes c14bbbc47b payloads/tianocore: Bind the PCDs for screen size to Kconfig
Bind the PCDs that allow edk2 to use the whole display to a
Kconfig option called TIANOCORE_FULL_SCREEN_SETUP.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Ic977a199f3b308c566391e37f126c4fe518b2eb6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66162
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-07-27 14:01:15 +00:00
Sean Rhodes 6388a5b892 payloads/tianocore: Correct the multiplication of the SD/MMC timeout
The `call int-multiply` couldn't handle the Kconfig option being a
string so do the calculation in bash.

Tested on:
* Qemu
* StarLite Mk III

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I1879d7efd504e2c42dadb12d2d8add4f69ca7b9c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66161
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-07-27 13:59:57 +00:00
Sean Rhodes ce6f63a898 payloads/tianocore: Add missing CONFIG for SERIAL_SUPPORT
This caused edk2 serial output to be disabled 100% of the time.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: If272369b405e7745fe82f49026cbed0abc50f355
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66160
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-07-27 13:59:19 +00:00
Matt DeVillier 7b087c0594 payloads/tianocore: use BMP (vs SVG) logo file as default
converting the SVG logo to BMP at compile time using 'convert'
introduces terrible aliasing artifacts, so use a properly converted
BMP file as the default instead.

Test: boot qemu w/Tianocore, observe lack of aliasing in coreboot logo

Change-Id: I62d643c24abca57fa35b79732d8cedc83b94815f
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66144
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-07-27 13:58:58 +00:00
Matt DeVillier 845222f739 payloads/tianocore: Fix bootsplash/logo handling
commit 108e537928
("payloads/tianocore: Add a proper target for the Boot Splash")
introduced 2 bugs in bootsplash handling:

- the "logo" make target added a spurious "/edk2" to the project dir
- the "logo" make target failed to account for the case where no user-
  defined logo file is used (the upstream Tianocore one will be used
  in this case)

Fix both these issues.

Test: build/boot qemu w/Tianocore w/o user-defined bootsplash file.

Change-Id: Ieebc547670213459823f58956ae87c6bf94b74ef
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66142
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-07-27 13:39:17 +00:00
Angel Pons 7127013f7c payloads/ext/tianocore/Makefile: Fix word in comment
revalant ---> relevant

Change-Id: Id31a57644947bf8c0f461dbfc9ca8b1984e9acb8
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66151
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-07-27 13:37:03 +00:00
Sean Rhodes 108e537928 payloads/tianocore: Add a proper target for the Boot Splash
edk2's default is to show a Boot Splash with their own logo which
looks like it's from the 1960's. Therefore, we replace this image
with coreboot's logo, taken from https://coreboot.org unless a
custom one is specified.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I1b133e2a2cfd45a6650e4523b267f7508974137b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65881
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Martin L Roth <gaumless@tutanota.com>
2022-07-25 23:46:11 +00:00
Sean Rhodes 8f296038e5 payloads/tianocore: Increase default timeout for SD MMC init to 10ms
Firstly, change the unit of `μs` to `ms` so it's easier to read.

This patch changes the default amount of time allowed to initialise
SD Card Readers and eMMC drives from 1ms to 10ms. Having a timeout
too short will stop certain devices from booting, which was seen on
google/akemi; it throws an exception when attempting to boot from
the internal eMMC drive.

This new value is still lower than upstream edk2's value of 1s.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Id1f66d5d50f889f07a34836ab2932b28ef7fb245
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65813
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-07-19 19:01:43 +00:00
Petr Cvek 61f3f33311 Remove executable flag from source codes and text files
Markdown, definition file and sconfig source codes don't need to be
executables. This patch fixes that.

Signed-off-by: Petr Cvek <petrcvekcz@gmail.com>
Change-Id: Ic97d684318c689259f7895e3dfbd552434c3882e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65807
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2022-07-14 12:46:07 +00:00
Sean Rhodes 6a2ebb3000 payloads/tianocore: Limit legacy build options to CorebootPayloadPkg
Limited to two legacy build options to only be set when
CorebootPayloadPkg is used, as they don't exist in UefiPayloadPkg.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I71aaa940543075962e167b52b23f45976d39c616
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65779
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-07-13 10:45:58 +00:00
Sean Rhodes 6790249b56 payloads/tianocore: Allow edk2 to use the full framebuffer
Set all PCDs relating to console size to 0, which allows edk2 to
use the full framebuffer.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Id105a2c822a2b05da6e45dac9deeca1f155bfa33
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65778
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-07-13 10:45:34 +00:00
Sean Rhodes 5a26d817f7 payloads/tianocore: Hook up PCI Express Base Address and Length
Hook up edk2 build options PCIE_BASE_ADDRESS and PCIE_BASE_LENGTH to
CONFIG_ECAM_MMCONF_BASE_ADDRESS and CONFIG_ECAM_MMCONF_LENGTH.

This patch has been reviewed upstream but not yet merged (2022/07/08).

It won't cause any problems for any existing branches or forks that do
not have this build option hooked up.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Ie5d50cc4619354d3c98adf6cde12c192be759869
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65644
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-07-13 10:45:12 +00:00
Sean Rhodes 8e10a4826a payloads/external/tianocore: Hook up debug builds to serial support
ConSplitterDxe uses the intersection of all outputs, which includes
serial, for the list of supported text modes. When serial output is
supported, this slows down performance and limits the size of
FrontPage.

Only enable edk2's serial support when it's a debug build as
it's the only case where there will be debug output.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Ic3633767dabb3543e865aa65c4101840a7b69cc1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65643
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-07-06 15:46:27 +00:00
Jon Murphy c4e90454f4 treewide: Unify Google branding
Branding changes to unify and update Chrome OS to ChromeOS (removing the
space).

This CL also includes changing Chromium OS to ChromiumOS as well.

BUG=None
TEST=N/A

Change-Id: I39af9f1069b62747dbfeebdd62d85fabfa655dcd
Signed-off-by: Jon Murphy <jpmurphy@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65479
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
2022-07-04 14:02:26 +00:00
Sean Rhodes 7ea7986963 payloads/tianocore: Show build options
Show the build options that are passed to edk2 in one clear block.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I917a8c1d3ac8f2a223e584fec10689679835630c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65184
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2022-06-23 12:17:12 +00:00
Sean Rhodes eb5dd2a8dd payloads/tianocore/Makefile.inc: Alphabetise Kconfig options
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I12a18acd24a0aede8113e1daa607c852eba67049
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65160
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2022-06-22 00:42:32 +00:00
Sean Rhodes 50e4a377fb payloads/external/tianocore: Allow Kconfig options for all UefiPayloadPkg versions
Most of the Kconfig options are upstream, so they should exist in
most forks. Therefore, allow them to be set and passed when using
a custom repository or upstream edk2.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I31e6e267ee6e4e3a254f733e1dfc1ecb3a3d3576
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65040
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2022-06-21 16:19:38 +00:00
Nicholas Chin cc8be37a59 libpayload/Makefile.inc: Initialize vboot submodule
After commit 63e54275f6 (libpayload: Implement new CBFS access API),
libpayload includes headers from commonlib/bsd, which in turn include
vb2_sha.h from vboot after commit 0655f78041 (commonlib/bsd: Add new
CBFS core implementation). Usually submodules are initialized by the top
level Makefile.inc, but since this file is never read when building
libpayload based payloads outside the main coreboot build, the header
cannot be found unless the vboot submodule had previously been
initialized. This is especially evident when following Tutorial 1 in the
documentation, where the coreboot repo is cloned without recursing into
submodules and coreinfo is built separately from the coreboot build
using `make -C payloads/coreinfo`.

TEST=Deinitialize submodules and run `make -C payloads/coreinfo`.
Coreinfo should build without error.

Change-Id: I29b16525999921fbce51c2459d3d534b64e00b3c
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65222
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-20 13:54:31 +00:00
Arthur Heymans 241c1c6d94 payloads/LinuxBoot: Use wildcards
If no directory is found then no harm is done either.

Change-Id: I0842ec106f11eca80bf01fd4771e1dfc4588b3fa
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65153
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2022-06-17 07:12:05 +00:00
Yu-Ping Wu c1d7d89d48 libpayload/libcbfs: Fix file hash check
Fix the buffer pointer passed to cbfs_file_hash_mismatch().

Add a test case with LZ4 compression, which would catch the bug we are
fixing.

Change-Id: I36605e2dbc0423fa6743087512f2042b37c49d35
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65149
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-06-16 18:02:34 +00:00
Nico Huber e1e762716c libpayload/Makefile.payload: Fix CFLAGS
GCC_CFLAGS_<arch> contains only the flags that are GCC specific, iow.
flags that don't work with Clang.

CFLAGS_<arch>, OTOH, contains all flags that should be used and auto-
matically includes GCC_CFLAGS_<arch> if GCC is selected.

Change-Id: I5ec15f169d51c7a32ca86e54a98a2ce0e3b51e6d
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62248
Reviewed-by: Thomas Heijligen <src@posteo.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-15 18:06:39 +00:00
Nico Huber 27c1da6c26 libpayload/Makefile.payload: Include libpayload's .config
It's required to tell xcompile what compiler to use.

Change-Id: I9f1ddef96a20df1d83bfd4883b2e006ba78ce7c4
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62269
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
2022-06-15 18:06:23 +00:00
Nico Huber 543c79224c libpayload/Makefile.payload: Revise config strategy
Payloads often just use one of the defconfigs for libpayload. When
the `Makefile.payload` was introduced, it also added dependencies
to pass a `make oldconfig` or `make defconfig` for the payload on
to libpayload. Turned out, this creates some dependency madness
when, for instance, `make oldconfig` gets called without a libpay-
load `.config` available, or when we try to include the `.config`
in the `Makefile`.

To make things worse, Kconfig's `Makefile` that is imported from
Linux contains some rarely used paths that are generally incompa-
tible to our environment. So let's get rid of the hard-to-control
automatism.

Payloads that don't want to use a libpayload defconfig need to
clear the `$(LIBPAYLOAD_DEFCONFIG)` variable and manually run
the respective config target to generate a `.config`. To fully
support this, the rule to create a `.config` via `defconfig` is
guarded by `$(LIBPAYLOAD_DEFCONFIG)`. Otherwise we'd have a
spurious, broken recipe when the variable is unset.

We keep the option to call libpayload targets with an `lp-` prefix
for convenience. The existing, explicit targets `lp-defconfig` and
`lp-oldconfig` are replaced with a pattern match, so all config
and other targets should work.

Change-Id: Ie3fcce58d98e248c7182cd47f2a797fe066dd18a
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62273
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
2022-06-15 18:06:05 +00:00
Patrik Tesarik f5c2f253a7 external/LinuxBoot: Fix cleanup mechanism
`make clean` never thoroughly removed LinuxBoot build artifacts. This
change checks for kernel directories present in the project directory
and deletes all of them, if found.

Signed-off-by: Patrik Tesarik <patrik.tesarik@9elements.com>
Change-Id: Ia056ac6608e3631dfc270ba5c2f32216c3e1ac50
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65098
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-14 13:35:54 +00:00
Patrik Tesarik ed8aef9ccd external/LinuxBoot: Kconfig defaults to systemboot
In addition to change CB:40316 this commit proposes a change of default
behavior inside of the LinuxBoot toolchain.

Currently the defaults build a LinuxBoot payload which boots into the
u-root shell and waits for input. In fact it does not deliver any
bootloader with it, but the build image is on the other hand rather
small.

This commit changes the defaults in a way that the LinuxBoot
bootloader will actually be able to boot a local or remote system image.
In consequence the build payload size is rather big, but accepted for a
working out-of-the-box startup behavior.

See discussion on that topic in the above mentioned change.

Signed-off-by: Patrik Tesarik <mail@patrik-tesarik.de>
Change-Id: Ieaba7e523aef10c467a8bea29ae323e22324b225
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40527
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-14 13:35:28 +00:00
Patrik Tesarik 868282e195 payloads/external/LinuxBoot: Adopt u-root change
The u-root toolkit dropped the original uinit bootloader in the master
branch and respectively the systemboot-option in templates.go. In
consequence the LinuxBoot builds will boot into the u-root shell and
waiting for input. This commit enables the reuse of the -uinitcmd flag
to specify a command, which runs after the u-root init-process.

Systemboot as a bootloader wrapper will mimic a BIOS/UEFI boot device
selection. Other preselections, i.e. stboot and boot2 are implemented as
well. Custom strings or programs can be set as well, but they cannot
contain program flags. E.g. 'fbnetboot -class linuxboot' will not work,
because they aren't symlinkable.

This commit and its respective LinuxBoot builds with systemboot, none
and one custom option have been tested successfully on a UP squared
single board computer with the intended behavior.

Change-Id: I4ac3409040ea77a1836f90f43fba07d2cd05a952
Signed-off-by: Patrik Tesarik <mail@patrik-tesarik.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40316
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2022-06-13 13:16:01 +00:00
Patrik Tesarik b35c1f45a9 external/LinuxBoot: Deprecate GOPATH in u-root
This is a breaking change for now when using latest u-root main, which
is the default behavior in LinuxBoot.
u-root switched to golang modules and therefore `go get` is not the
standard behavior anymore. The workaround for this is to pull the
repository and build directly in the directory for now. Another apporach
would be to use `go install $pkg@latest` to install the binary at that
particular version into the golang binary path.

Currently missing is a control structure to enable the build process for
legacy versions <v0.8.0.

Signed-off-by: Patrik Tesarik <patrik.tesarik@9elements.com>
Change-Id: Ifa03504da6fa321ffc6d2506b27ebd2e3ed9961b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65090
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
2022-06-13 13:15:23 +00:00
Michał Żygowski ba08c4904d payloads/tianocore: Allow custom build parameters
Currently, custom TianoCore builds are allowed, but those may need
different parameters. Add a Kconfig option to specify additional
parameters to be appended to build command.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Change-Id: I025459ae94592103b4be0c68b422100b7c649d34
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62497
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2022-06-09 16:58:39 +00:00
Hsuan Ting Chen 607b39c593 libpayload: Add commonlib/bsd/elog and its dependency
Add commonlib/bsd/elog dependency in libpayload. This will allow other
payloads (e.g. depthcharge) to implement their own eventlog read and
write utilities.

Also include commonlib/bsd/elog.c source to libc-srcs. This ensure
payloads could utilize commonlib elog helper functions.

Change-Id: I64d0fdd2a8eff1d89a1ac451d37b61787b5564e7
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63115
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-06-09 13:33:35 +00:00
Bill XIE bb1e37e76b payloads/external: Reword help of SEAGRUB_ALLOW_SEABIOS_BOOTMENU
The sentence about "to bypass the secure mechanism implemented in
the GRUB runtime config" sounded confusing, so reword it.

Signed-off-by: Bill XIE <persmule@hardenedlinux.org>
Change-Id: I9c6f40d6d11d459fe4be40a624921c2632a89564
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64970
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2022-06-07 12:56:18 +00:00
Julius Werner 23d2465720 commonlib: Clean up compiler.h
This patch contains several minor cleanups related to compiler.h:

- Replace __always_unused() (which is a Linux-specific concept that
  doesn't make sense without also having __maybe_unused(), and had zero
  uses in the codebase) with __unused() which moves here from helpers.h

- Add __underscores__ to the names of all attributes in the compiler
  attribute shorthand macros. This is necessary to make them work in
  files where the same name was already used for an identifier (e.g.
  cbfstool/cbfs.h's `unused` array of file types).

- Remove libpayload's own copy of compiler.h and make it directly pull
  in the commonlib/bsd copy.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I9644da594bb69133843c6b7f12ce50b2e45fd24b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64737
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2022-06-07 12:34:35 +00:00
Nicholas Chin 8d885577ce payloads/external: Add support for coreDOOM payload
coreDOOM is a port of DOOM to libpayload, based on the doomgeneric
source port. It renders the game to the coreboot linear framebuffer,
and loads WAD files from CBFS.

Tested with QEMU i440fx/q35 and a Dell Latitude E6400 using the
libgfxinit provided linear framebuffer.

Project page: https://github.com/nic3-14159/coreDOOM

Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Change-Id: Ice0403b003a4b2717afee585f28303c2f5abea5d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57222
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Martin L Roth <gaumless@tutanota.com>
2022-05-28 15:01:47 +00:00
Nicholas Chin c217f31d0b payloads/tianocore: Fix unclean working directory detection
After commit ae48b42683 (payloads/tianocore: Init submodules),
Tianocore's Makefile no longer detects an unclean working directory and
thus always performs a `git checkout`, overwriting any uncommited
changes made in the cloned sources.

The change of "clean" to "dirty" effectively inverts the logic of the
if-else condition, which would normally swap the two possible code paths
of the branch. However, since `git status` outputs multiple lines, most
of which do not contain "clean", the -v option (select non-matching
lines) causes grep to always match at least 1 line and thus return
success.  This causes the if-else branch containing the `git checkout`
to always be taken regardless of the state of the working tree, masking
the issue of the inverted logic.  Removing the -v option addresses both
of these issues and restores the intended behavior of the if-else block.

TEST:
1) Build coreboot successfully with the Tianocore UefiPayloadPkg option.
2) Make a change in the cloned Tianocore sources that results in an
   unclean working directory and check for the "Working directory not
clean" message when building coreboot.

Change-Id: Icd4952b40c147d0fba676089ced5a8b59b93ad50
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64608
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@tutanota.com>
2022-05-28 14:57:07 +00:00
Bill XIE 3dda4dad1d payloads/external: Add more option related to SeaBIOS and GRUB2
Also known as "SeaGRUB", running GRUB2 atop SeaBIOS proves to be a
useful configuration, since SeaBIOS has improved its hardware
compatibility. For example, some USB drive can work under SeaBIOS but
do not work under native GRUB2, and GRUB2 can use BIOS call (provided
by SeaBIOS) as a fallback method to access hardware if it is present.

But more option is added addition to "SeaGRUB": now GRUB2 and SeaBIOS
can be built as secondary payloads, and "SeaGRUB" is now implemented
as "Primary SeaBIOS + Secondary GRUB2 (selected) + config files".

Signed-off-by: Bill XIE <persmule@hardenedlinux.org>
Change-Id: Ie681fa231abfe4a8f1e4510b3c17957550a9d2f8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60640
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@tutanota.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2022-05-24 12:58:52 +00:00
Jianjun Wang 20a87c0bed libpayload/pci: Add pci_map_bus function for MediaTek platform
Add 'pci_map_bus' function and PCIE_MEDIATEK config for MediaTek
platform.

TEST=Build pass and boot up to kernel successfully via SSD on Dojo
board, here is the SSD information in boot log:
 == NVME IDENTIFY CONTROLLER DATA ==
    PCI VID   : 0x15b7
    PCI SSVID : 0x15b7
    SN        : 21517J440114
    MN        : WDC PC SN530 SDBPTPZ-256G-1006
    RAB       : 0x4
    AERL      : 0x7
    SQES      : 0x66
    CQES      : 0x44
    NN        : 0x1
Identified NVMe model WDC PC SN530 SDBPTPZ-256G-1006

BUG=b:178565024
BRANCH=cherry

Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
Change-Id: I9ea7d111fed6b816fa2352fe93c268116519a577
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56794
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2022-05-20 02:53:35 +00:00
Jianjun Wang 2ad74deb2a libpayload/pci: Add support for bus mapping
Move the common APIs to pci_ops.c and IO based operations to
pci_io_ops.c, and add pci_map_bus_ops.c to support bus mapping.

TEST=Build pass and boot up to kernel successfully via SSD on Dojo
board, here is the SSD information in boot log:
 == NVME IDENTIFY CONTROLLER DATA ==
    PCI VID   : 0x15b7
    PCI SSVID : 0x15b7
    SN        : 21517J440114
    MN        : WDC PC SN530 SDBPTPZ-256G-1006
    RAB       : 0x4
    AERL      : 0x7
    SQES      : 0x66
    CQES      : 0x44
    NN        : 0x1
Identified NVMe model WDC PC SN530 SDBPTPZ-256G-1006

BUG=b:178565024
BRANCH=cherry

Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
Change-Id: Ie74801bd4f3de51cbb574e86cd9bb09931152554
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56789
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2022-05-20 02:51:33 +00:00
Jianjun Wang d16c2aa6de coreboot_tables: Add PCIe info to coreboot table
Add 'lb_fill_pcie' function to pass PCIe information from coreboot to
libpayload, and add CB_ERR_NOT_IMPLEMENTED to the cb_err enum for the
__weak function.

ARM platform usually does not have common address for PCIe to access the
configuration space of devices. Therefore, new API is added to pass the
base address of PCIe controller for payloads to access PCIe devices.

TEST=Build pass and boot up to kernel successfully via SSD on Dojo
board, here is the SSD information in boot log:
 == NVME IDENTIFY CONTROLLER DATA ==
    PCI VID   : 0x15b7
    PCI SSVID : 0x15b7
    SN        : 21517J440114
    MN        : WDC PC SN530 SDBPTPZ-256G-1006
    RAB       : 0x4
    AERL      : 0x7
    SQES      : 0x66
    CQES      : 0x44
    NN        : 0x1
Identified NVMe model WDC PC SN530 SDBPTPZ-256G-1006

BUG=b:178565024
BRANCH=cherry

Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
Change-Id: I6cdce21efc66aa441ec077e6fc1d5d1c6a9aafb0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63251
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Shelley Chen <shchen@google.com>
2022-05-19 16:34:55 +00:00
David Hendricks 7d0e5fa3ff libpayload: Fix guards in include/{arm,arm64,x86}/arch/barrier.h
Change-Id: Ib4897c4f5837f7f3173d5062eecb893adbe36964
Signed-off-by: David Hendricks <david.hendricks@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64365
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2022-05-16 06:55:06 +00:00
Elyes Haouas 9ca1ef96ae payloads/coreinfo/coreboot_module.c: Remove 'break' after 'return'
Change-Id: Icb60115349ef7c4c35635021784138d45c5a8872
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61954
Reviewed-by: Martin L Roth <gaumless@tutanota.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-05-16 02:56:31 +00:00
Elyes Haouas ae2c045733 payloads/nvramcui/nvramcui.c: Reformat code
Change-Id: If5b4ae7d9f9046e56ca098c0469b503130bc8707
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61955
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@tutanota.com>
2022-05-16 02:49:50 +00:00
Nico Huber 8ddecd8538 libpayload/nvme: Fix controller disablement in (de)init sequence
We wrote to the wrong register. The EN bit is in the CC (Controller
Configuration) register at 0x14.

Fixes re-initialization in QEMU and on siemens/chili during a second
FILO run.

Change-Id: I125de55d7f1a7c9f070437190c5a08a288b274f8
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63935
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-05-11 12:19:03 +00:00
Nico Huber 88b041897f libpayload/nvme: Test for NVMe-command-set bit individually
We only need to know if the NVMe command set is supported. Other
command-set bits can be set too, but we don't have to care.

Fixes init in QEMU which has more command-set bits set by now.

Change-Id: I29a693cf8cc13775e94dc671e8d0412ad86fef9c
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63934
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-05-11 12:15:11 +00:00
Nico Huber 2b986700c9 libpayload/nvme: Fix error paths of nvme_init()
We mustn't try to release resources that we haven't acquired yet. Also,
sending commands to the NVMe device is futile if we already timed out.

Fixes hangs after a failed init noticed in QEMU and on siemens/chili.

Change-Id: Ib83c7785d6e0dc3c44fbd50a30694c74932750d6
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63933
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-05-11 12:14:20 +00:00
Selma Bensaid 4bc425c521 payloads/depthcharge: enable LP_CHROMEOS in depthcharge
Fix standslone build failure after depthcharge patch
https://crrev.com/c/3461454 merge.

BUG=chrome-os-partner:226438207
TEST=Compiled brya and redrix in standalone mode.

Signed-off-by: Selma Bensaid <selma.bensaid@intel.com>
Change-Id: Ib2bb2ce42a314e05ef22ea7b8abc067d6361d511
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63240
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Jakub Czapiga <jacz@semihalf.com>
2022-04-19 13:03:00 +00:00
Jianjun Wang b2537bdad5 coreboot_tables: Replace 'struct lb_uint64' with lb_uint64_t
Replace 'struct lb_uint64' with 'typedef __aligned(4) uint64_t
lb_uint64_t', and remove unpack_lb64/pack_lb64 functions since it's no
longer needed.

Also replace 'struct cbuint64' with 'cb_uint64_t' and remove
'cb_unpack64' in libpayload for compatible with lb_uint64_t.

Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
Change-Id: If6b037e4403a8000625f4a5fb8d20311fe76200a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63494
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-04-14 22:27:50 +00:00
Arthur Heymans c73440844d payloads/LinuxBoot: Fix u-root branch
It looks like the u-root 'master' branch was renamed to 'main'.

Change-Id: I384ba66289a49bf226b505615bd16bdf85612c1a
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62590
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-04-13 14:30:37 +00:00
Sean Rhodes f2d162efca payloads/tianocore: Don't declare tools directory twice
EDK_TOOLS_PATH is set on lines 85 and 137. Remove the instance
on 85. edk2 still builds correctly.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I0c837f14693941afec194b140c93d786ea784e53
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63180
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-04-11 13:59:29 +00:00
Jakub Czapiga 9760264a96 commonlib/bsd/helpers: Remove redundancy with libpayload defines
Move STRINGIFY() from coreboot string.h to commonlib/bsd/helpers.h
Remove redundant defines from libpayload.h and libpayloads' standard
headers.

Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: I3263b2aa7657759207bf6ffda750d839e741f99c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62921
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-03-30 21:21:47 +00:00
Arthur Heymans cddba4528d libpayload: Parse the ACPI RSDP table entry
Change-Id: I583cda63c3f0b58f8d198ed5ecea7c4619c7a897
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62576
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-03-30 00:03:28 +00:00
Jakub Czapiga 3068d562ae libpayload/vboot: Fix include paths fixup macro
Include paths fixup macro for vboot was broken and was adding
unnecessary prefix to paths from $(coreboottop). This patch adds correct
filters to fix this behavior.

Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: I264e715fa879a4e56b6e5f5423916298e8780a2b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63002
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-03-25 19:25:36 +00:00
Michał Żygowski 8a47a14a2f payloads/iPXE: Update stable version from 2019.3 to to 2022.1
Update iPXE stable from commit id ebf2eaf515:
Mar 18 10:24:08 2019 +0000
[intel] Add PCI ID for I219-V and -LM 6 to 9

to commit id 6ba671acd9:
Jan 17 16:17:17 2022 +0000
[efi] Attempt to fetch autoexec script via TFTP

This brings in 424 new commits and fixes the build with coreboot-sdk
2021-09-23_b0d87f753c.

TEST=Build PC Engines apu2 board and boot it over network with the
iPXE

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: Ide12a3a3082f9ea027e180518a80e6c0772b1232
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62289
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-03-22 21:02:59 +00:00
Sean Rhodes e8c186cdef payloads/tianocore: Add missing CONFIG_
Add missing CONFIG_ to the Boot Timeout parameter.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I88f4aa0286a77f6c94b5e5ec97a0034ea7594b4f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62920
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-03-21 21:39:43 +00:00
Ravi Kumar Bokka 42fcb2a8f4 libpayload: Parse DDR Information using coreboot tables
BUG=b:182963902,b:177917361
TEST=Validated on qualcomm sc7280 development board

Signed-off-by: Ravi Kumar Bokka <rbokka@codeaurora.org>
Change-Id: Ieca7e9fc0e1a018fcb2e9315aebee088edac858e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59193
Reviewed-by: Shelley Chen <shchen@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-03-16 01:21:44 +00:00
Felix Singer cf4a3472b9 payloads/seabios: Update stable version to 1.16.0
SeaBIOS 1.16.0 was released on March 2nd. Thus, update the stable
version from 1.14.0 to 1.16.0.

Change-Id: I475a9be47171bfbe3b3c2d4d1d14bb753d8575a8
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62575
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2022-03-14 18:18:42 +00:00
Sean Rhodes 63c6d814ce payloads/tianocore: Add prompt for Boot Timeout
Add prompt to Boot Timeout so that it can be easily configured
from a config file.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I62b8f0a9b5bc0796506b991199a457d6b34ae494
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62558
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2022-03-09 14:20:30 +00:00
Julius Werner 69cc557cfb commonlib/bsd: Remove cb_err_t
cb_err_t was meant to be used in place of `enum cb_err` in all
situations, but the choice to use a typedef here seems to be
controversial. We should not be arbitrarily using two different
identifiers for the same thing across the codebase, so since there are
no use cases for serializing enum cb_err at the moment (which would be
the primary reason to typedef a fixed-width integer instead), remove
cb_err_t again for now.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: Iaec36210d129db26d51f0a105d3de070c03b686b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62600
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-03-09 02:18:21 +00:00
Julius Werner 2c423441c0 libpayload: cbmem_console: Drop loglevel markers from snapshot
coreboot recently introduced non-printable loglevel markers in the CBMEM
console. Payloads were generally unaffected since they don't use log
levels and it is still legal to append lines without a marker to the
log. However, payloads using cbmem_console_snapshot() to display
existing logs from coreboot have started seeing '?' characters in place
of the markers. This patch fixes the issue by filtering out marker
characters.

BUG=b:221909874

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I4a9e5d464508320cf43ea572d62896d38c2a128d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62506
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-03-04 16:04:10 +00:00
Jakub Czapiga 49fff57a09 libpayload/bin/lpgcc: Make lpgcc provide TPM configuration for vboot
TPM1_MODE and TPM2_MODE defines have to be added to vboot and payload
cflags to make them build correctly without requiring payloads to provide
defines.

Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: I567a9f04d7089699840dc7e0a063cf3030fb934b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62516
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-03-03 22:38:59 +00:00
Sean Rhodes 9f091608b2 payloads/tianocore: Convert BMP at build time
Convert BMP to the correct format at build time, which removes the
requirement for any runtime checks.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I4f1e9c8df2ca7d66f362f9fa5688d6cb443c2581
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61918
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2022-02-25 20:45:02 +00:00
Sean Rhodes 4a9be9f321 payloads/tianocore: Pass SD_MMC_TIMEOUT build option
By default, edk2 allows 1000000μs for SD Card Readers and eMMC to
initialize which is excessive and causes a boot delay. This makes
the value configurable and uses a default of 1000μs which is sufficient
for the majority of readers. The value of 1000μs was hardcoded in
MrChromeBox's fork for around 2 years with no reported issues.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I873bcddf6f37a9eaae5c84991b3996d51fb460d3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61902
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2022-02-25 20:44:42 +00:00
Sean Rhodes 3f3a3eeca7 payloads/tianocore: Add option for to prioritize internal devices
Add TIANOCORE_PRIORITIZE_INTERNAL which, when enabled, will build edk2
with boot from internal devices before external devices.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Ib1f73c8f3f2f2376cdc197b58d259446dc5f0138
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61797
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2022-02-24 00:29:44 +00:00
Sean Rhodes 4600c25346 payloads/tianocore: Add option for PS/2 keyboard support
Add TIANOCORE_PS2_SUPPORT which, when enabled, will build edk2
with PS/2 keyboard support.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Ibabce6ac1ac68ab958610d42c77f3c2c494528ef
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61760
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2022-02-24 00:29:29 +00:00
Sean Rhodes f33ddb3959 payloads/tianocore: Add option to include EFI Shell
Add TIANOCORE_HAVE_EFI_SHELL, which when enabled, will build edk2
with the EFI Shell binary.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I1272f514e3f5becfe1fddd58ca0d820c5d1c1b54
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61759
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2022-02-24 00:29:14 +00:00
Sean Rhodes 14d67b3515 payloads/tianocore: Add option to use follow BGRT spec
Adds TIANOCORE_FOLLOW_BGRT_SPEC which, when enabled, will follow
the BGRT Specification implemented by Microsoft and the Boot Logo
will be vertically centered 38.2% from the top of the display.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: If508166fe657d1cc032dd09a0fa231c7b60d9846
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61758
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2022-02-24 00:29:01 +00:00
Sean Rhodes c8decce31c payloads/tianocore: Add option to use Escape for Boot Manager
Add TIANOCORE_BOOT_MANAGER_ESCAPE which, when enabled, will use
Escape as the hot-key to access the Boot Manager. This replaces
the default key of F2.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I1e60d116367542f55f0ffa241a6132e4faabe446
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61757
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2022-02-24 00:28:47 +00:00
Nico Huber 47722cfe55 libpayload/lpgcc: Add `--gc-sections` linker argument
To be able to link libcbfs without vboot, we need garbage
collection now.

Change-Id: Id9a9fe7efb9fb4409a43ae8357f4f683618805d2
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62247
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-02-23 22:47:24 +00:00
Nico Huber 4fa9f2ae8b libpayload/x86: Fix boot_device_read() and hook it up
Casts from integer to pointer are usually a case for phys_to_virt().

Change-Id: I861d435ff2361cdc26a2abd46d43b9346fa67ccc
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62246
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-02-23 22:47:09 +00:00
Sean Rhodes 0884f21042 payloads/tianocore: Rework Makefile
Rework edkii makefile so that the various build options are
unified between CorebootPayloadPkg, uefipayload_202107 and
upstream.

This sets the project directory based on the git repository name
i.e. https://github.com/mrchromebox/edk2 becomes mrchomebox

Also builds to $(obj)/UEFIPAYLOAD.fd and allows using a commit
ID without a branch.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I3cc274e7385dd71c2aae315162cc48444b7eaa5f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61620
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Martin Roth - Personal <martinroth@google.com>
2022-02-22 18:53:17 +00:00
Jakub Czapiga 0ac5ed4490 libpayload/vboot: Enable vboot and x86 SHA extension for ChromeOS
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: Ia63d44de5440b87cedb35ff92edaa0f35ccd75a4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62122
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-02-21 15:18:55 +00:00
Jakub Czapiga b17f1cebcb libpayload/vboot: Add missing quotes enclosing values
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: I1a72ea63a46dedd1fc2e1e53bf7714ad70ebc5e1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62171
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-02-21 15:18:38 +00:00
Jakub Czapiga 7f663ab3e6 libpayload/vboot/Makefile.inc: Add strip to kconfig-to-binary macro
Lack of strip made it required to pass arguments to the
kconfig-to-binary macro without spaces. Strip fixed invalid behavior of
this macro.

Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: I9889b45f773b9675fae287086d324c180c505a4b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62133
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-02-21 15:18:24 +00:00
Jakub Czapiga e904d9ad67 libpayload/cbfs: Add missing new line at the end of error messages
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: Ieec281e4f1c67e40976892b3dd1780d2f3802df4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62125
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-02-21 15:15:37 +00:00
Sergii Dmytruk a816c29882 payloads/external: add skiboot (for QEMU/Power9)
Add an option to build skiboot as a payload. This makes QEMU Power9
board simpler to use as skiboot is necessary anyway.

Change-Id: I0b49ea7464c97cc2ff0d5030629deed549851372
Signed-off-by: Igor Bagnucki <igor.bagnucki@3mdeb.com>
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58656
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2022-02-16 15:39:19 +00:00
Jakub Czapiga 5b76ae9611 libpayload/libc/coreboot: Fix CBFS MCache size
CBFS MCache size was assigned a value of the coreboot tables entry size
instead of the MCache size.

Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: I8a8c3a10c6032121b4c5246d53d2643742968c09
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61714
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-02-10 12:49:14 +00:00