Nishanth Menon [Fri, 25 Aug 2023 18:03:00 +0000 (13:03 -0500)]
arm: mach-k3: am625: Add support for UDA FS
While boot partition support with EMMC boot is useful, it is
constrained by the size of boot hardware partition itself.
In the case of K3 devices, tispl images can contain OP-TEE images that
can substantially vary in size and the u-boot image itself can vary over
time as we enable various features.
So use the CSD information in the case of EMMC_BOOT configuration being
enabled to pick boot partition or UDA FS mode operation to pick.
If EMMC_BOOT is disabled, then depend on filesystem configuration to
pick data from UDA.
Nishanth Menon [Fri, 25 Aug 2023 18:02:58 +0000 (13:02 -0500)]
arm: mach-k3: am625_init: Convert rtc_erratumi2327_init to static
The erratum is called locally, make it static, drop the #ifdeffery since
it will only be called in R5 build and mark it potentially unused to
stop compiler screaming at us.
While at this, drop the redundant return for a void function.
Nishanth Menon [Fri, 25 Aug 2023 18:02:55 +0000 (13:02 -0500)]
include: env: ti: Add a generic default_findfdt.env
ti_mmc bootmethod uses a findfdt routine that is expected to be
implemented by all platforms.
Define a default findfdt based on configured DEFAULT_DEVICE_TREE option
for u-boot. This saves duplication across multiple boards and handles
architecture folder location changes centrally.
TI ARMV7 platforms will need to override default_device_tree_subarch
in the env file to point to the appropriate platform. Note: default
"omap" is used to cater to "most common" default.
Nishanth Menon [Fri, 25 Aug 2023 18:02:52 +0000 (13:02 -0500)]
configs: am62x_evm_a53_defconfig: Switch to bootstd
Switch to using bootstd. Note with this change, we will stop using
distro_bootcmd and instead depend entirely on bootflow method of
starting the system up.
Suggested-by: Tom Rini <trini@konsulko.com> Suggested-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Emanuele Ghidoli [Thu, 24 Aug 2023 08:08:50 +0000 (10:08 +0200)]
board: verdin-am62: fix check for minimum memory size
verdin am62 SKUs comes in multiple memory configuration, check that
the detected memory is at least 512MB since we have some
reserved memory just before this threshold and therefore
the module cannot work with less memory.
Tom Rini [Wed, 6 Sep 2023 22:47:18 +0000 (18:47 -0400)]
Merge branch '2023-09-06-assorted-CI-updates' into next
- Merge in a number of changes for CI. The biggest ones of note are that
we now support sandbox64 in CI, and Azure has been reworked to
generally have more consistent overall runtime for the pipeline.
Tom Rini [Fri, 1 Sep 2023 20:41:42 +0000 (16:41 -0400)]
Azure: Split sandbox and qemu test.py runs
Currently, most sandbox runs take a long time (due to running so many
tests) while QEMu based test.py runs are fairly short. Split the
pipeline here so that we get more consistent average run times.
Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Fri, 1 Sep 2023 20:41:41 +0000 (16:41 -0400)]
Azure: Rework test_py job to publish its wrapper script
Both to aide in debugging of any test.py issues as well as to make it
easier to split the current matrix in two, have a new job that creates
and publishes the current wrapper script we use for test.py jobs.
Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Sun, 20 Aug 2023 17:31:29 +0000 (13:31 -0400)]
CI: Drop some jobs we didn't really utilize
- We have added more TODO/etc comments since this task was created and
never focused on removing them.
- The output of sloccount isn't preserved or looked at, and if desired
should be in the release stats pages instead somehow.
- The results of cppcheck aren't investigated and require modeling work
to be useful to start with.
Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Sun, 20 Aug 2023 17:31:27 +0000 (13:31 -0400)]
Azure: Rework build the world jobs
Now that we have 3600 minutes per build job, condense and rework things
such that our overall time largely doesn't change, but we can also
largely avoid having to re-tweak this job to avoid timeouts. Given that
we have 10 threads, we also move a few of the specific sandbox test
builds to a prior stage.
Note that while sandbox builds with address sanitization enabled (ASAN)
not all tests pass, so we limit ourselves to just checking that the
version test passes for now.
Marek Vasut [Fri, 25 Aug 2023 08:19:40 +0000 (10:19 +0200)]
test: print: Fix hexdump test on 64bit systems
Use the following regex to make this test compatible with
both 32bit and 64bit systems. The trick is to use %0*lx
format string for the address prefix in the test.
Marek Vasut [Wed, 23 Aug 2023 19:37:44 +0000 (21:37 +0200)]
test: dm: test-fdt: Use fdtdec_get_int() in dm_check_devices()
The current fdtdec_get_addr() takes into consideration #address-cells
and #size-cells for "ping-expect" property which is clearly neither.
Use fdtdec_get_int() instead and return negative one in case the
property is not in DT or the platform under test is not DT based,
i.e. mimic the current fdtdec_get_addr() behavior.
This fixes ut dm dm_test_bus_children test.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Mon, 4 Sep 2023 19:06:35 +0000 (15:06 -0400)]
riscv: Correct event usage for riscv_cpu_probe/setup
With having both an EVENT_SPY_SIMPLE setup for both riscv_cpu_probe and
riscv_cpu_setup we do not need the latter function to call the former
function as it will already have been done in time.
Fixes: 1c55d62fb9cc ("riscv: cpu: make riscv_cpu_probe to EVT_DM_POST_INIT_R callback") Tested-by: Milan P. Stanić <mps@arvanta.net> Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 4 Sep 2023 19:06:34 +0000 (15:06 -0400)]
riscv: Rework riscv_cpu_probe for current event macros
This function should now be a EVENT_SPY_SIMPLE call, update it.
Tested-by: Milan P. Stanić <mps@arvanta.net> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Signed-off-by: Tom Rini <trini@konsulko.com>
Marek Vasut [Sat, 26 Aug 2023 22:25:36 +0000 (00:25 +0200)]
arch: m68k: Implement relocation
Implement relocation for M68K. Perform all the updates in start.S
relocate_code in assemby, since it is a simple matter of traversing
the dynsym table and adding relocation offset - MONITOR_BASE to all
the items in that table. The necessity to deal with MONITOR_BASE is
a specific of M68K, where the ELF entry point is at offset 0x400,
which is the MONITOR_BASE, while TEXT_BASE is at offset 0 .
This also removes the one last user of NEEDS_MANUAL_RELOC, so that
could be finally cleaned up .
Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sat, 26 Aug 2023 22:25:35 +0000 (00:25 +0200)]
tools: relocate-rela: Add M68K support
Add M68K ELF32 support into this tool, so it can patch static rela
into M68K u-boot-nodtb.bin . This is the first step toward M68K
relocation support, and in turn, removal of NEEDS_MANUAL_RELOC
from the codebase altogether.
Tested-by: Michal Simek <michal.simek@amd.com> # microblaze, arm64 Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sun, 30 Jul 2023 22:16:52 +0000 (00:16 +0200)]
tools: relocate-rela: Fix BE symtab handling
The symtab contains data in target endianness, convert the data to
native endianness before doing any operations and on them, and back
to target endianness before updating the bin file.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Tested-by: Michal Simek <michal.simek@amd.com> # microblaze, arm64 Reviewed-by: Angelo Dureghello <angelo@kernel-space.org>
EHCI is usually used with companion controller (like OHCI) as companion
controller. This information on the companion is missing currently in
companion drivers.
So, if the usb-uclass isn't aware, it may scan busses in any order: OHCI
first, then EHCI.
This is seen on STM32MP1 where DT probing makes the probe order to occur
by increasing address (OHCI address < EHCI address).
When a low speed or full-speed device is plugged in, it's not detected as
EHCI should first detect it, and give ownership (handover) to OHCI.
Current situation on STM32MP1 (with a low speed device plugged-in)
STM32MP> usb start
starting USB...
Bus usb@5800c000: USB OHCI 1.0
Bus usb@5800d000: USB EHCI 1.00
scanning bus usb@5800c000 for devices... 1 USB Device(s) found
scanning bus usb@5800d000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
The "companion" property in the device tree allow to retrieve companion
controller information, from the EHCI node. This allow marking the
companion driver as such.
With this patch (same low speed device plugged in):
STM32MP> usb start
starting USB...
Bus usb@5800c000: USB OHCI 1.0
Bus usb@5800d000: USB EHCI 1.00
scanning bus usb@5800d000 for devices... 1 USB Device(s) found
scanning bus usb@5800c000 for devices... 2 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
STM32MP> usb tree
USB device tree:
1 Hub (12 Mb/s, 0mA)
| U-Boot Root Hub
|
+-2 Human Interface (1.5 Mb/s, 100mA)
HP HP USB 1000dpi Laser Mouse
1 Hub (480 Mb/s, 0mA)
u-boot EHCI Host Controller
This also optimize bus scan when a High speed device is plugged in, as
the usb-uclass skips OHCI in this case:
STM32MP> usb reset
resetting USB...
Bus usb@5800c000: USB OHCI 1.0
Bus usb@5800d000: USB EHCI 1.00
scanning bus usb@5800d000 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
STM32MP> usb tree
USB device tree:
1 Hub (480 Mb/s, 0mA)
| u-boot EHCI Host Controller
|
+-2 Mass Storage (480 Mb/s, 200mA)
SanDisk Cruzer Blade 03003432021922011407
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Reviewed-by: Marek Vasut <marex@denx.de>
Tom Rini [Mon, 4 Sep 2023 15:19:50 +0000 (11:19 -0400)]
event.h: Documented some newly added portions better
After the merge of v2023.10-rc4 to next include/event.h needs to be
fully documented in order for documentation builds to complete. Rewords
two of the event_t descriptions to be docbook style and better match the
rest of this enum. Fix two typos (flag->flags) in other comments.
Marcel Ziswiler [Mon, 28 Aug 2023 22:01:53 +0000 (00:01 +0200)]
doc: board: toradex: minor documentation update
- Update SPDX-License-Identifier from obsolete GPL-2.0+ to
GPL-2.0-or-later.
- Add links to product websites of SoM and carrier board where missing.
- Add information about update U-Boot wrapper where missing.
- Add sectionauthor where missing.
- Update information about imx-seco from version 3.7.4 to 3.8.1.
- Various minor grammatic and spelling fixes.
- Improve whitespace by adding or removing new lines.
- Change from code-block for output to just Output::.
Tom Rini [Thu, 31 Aug 2023 19:10:42 +0000 (15:10 -0400)]
Merge branch '2023-08-31-replace-more-init-hooks-with-events' into next
To quote the author:
This series replaces some more of the init hooks in board_f.c and
board_r.c with events. Notably it converts last_state_init() over.
It also provides a 'simple' event spy, which takes no arguments. It
turns out that this is quite a common case, so it is worth optimising
for this, to reduce code size, before events become too commonly used.
Finally, it introduces a way of emitting an event in an initcall,
instead of calling a function. This is likely to be used at least as
often as the functions, as we convert more of these initcalls.
As part of this, the initcall code is brought back into a C file. Somehow
the compiler has changed or something else, so that this does not confer
any benefits now.
For boards with EVENT enabled, this unfortunately results in small
growth, e.g. for firefly:
aarch64: (for 1/1 boards) all +114.0 data +16.0 rodata +22.0 text +76.0
arm: (for 1/1 boards) all +82.0 rodata +18.0 text +64.0
For boards without EVENT enabled the growth is smaller, e.g. nokia_rx51:
arm: (for 1/1 boards) all +32.0 data +8.0 rodata -8.0 text +32.0
I cannot find a good way to avoid the latter, other than macro magic
with an embedded comma (to completely remove an event entry), which
seems nasty.
Simon Glass [Tue, 22 Aug 2023 03:17:01 +0000 (21:17 -0600)]
event: Use an event to replace last_stage_init()
Add a new event which handles this function. Convert existing use of
the function to use the new event instead.
Make sure that EVENT is enabled by affected boards, by selecting it from
the LAST_STAGE_INIT option. For x86, enable it by default since all boards
need it.
For controlcenterdc, inline the get_tpm() function and make sure the event
is not built in SPL.
Simon Glass [Tue, 22 Aug 2023 03:16:55 +0000 (21:16 -0600)]
initcall: Support manual relocation
Move the manual-relocation code to the initcall file. Make sure to avoid
manually relocating event types. Only true function pointers should be
relocated.
Simon Glass [Tue, 22 Aug 2023 03:16:54 +0000 (21:16 -0600)]
initcall: Support emitting events
At present the initcall list consists of a list of function pointers. Over
time the initcall lists will likely change to mostly emitting events,
since most of the calls are board- or arch-specific.
As a first step, allow an initcall to be an event type instead of a
function pointer. Add the required macro and update initcall_run_list() to
emit an event in that case, or ignore it if events are not enabled.
The bottom 8 bits of the function pointer are used to hold the event type,
with the rest being all ones. This should avoid any collision, since
initcalls should not be above 0xffffff00 in memory.
Convert misc_init_f over to use this mechanism.
Add comments to the initcall header file while we are here. Also fix up
the trace test to handle the change.
Simon Glass [Tue, 22 Aug 2023 03:16:52 +0000 (21:16 -0600)]
initcall: Adjust the failure message and return value
Move the failure message outside the loop, so it is easier to follow the
code. Avoid swallowing the error code - just pass it along.
Drop the initcall-list address from the output. This is confusing since
we show two addresses. Really it is only the function address which is
useful, since it can be looked up in the map, e.g. with:
Simon Glass [Tue, 22 Aug 2023 03:16:51 +0000 (21:16 -0600)]
initcall: Adjust the loop logic
Use a variable to hold the function, so we don't need to repeat the
pointer access each time. Rename the init pointer to 'ptr' since we only
refer to it in the for() statement now.
Tom Rini [Thu, 31 Aug 2023 16:23:36 +0000 (12:23 -0400)]
Merge branch '2023-08-30-assorted-code-improvements' into next
- pcie-bcmstb improvements, nvmxip improvements, fix a corner case in
the serial uclass, send error messages to stderr in host tools, fwu
library CI state fixup, turn some setexpr diagnostic messages to debug
Marek Vasut [Wed, 23 Aug 2023 00:18:19 +0000 (02:18 +0200)]
drivers/mtd/nvmxip: Print phys_addr_t without warnings on both 32bit and 64bit systems
Cast the address such that it can be printed without warnings
on both 32bit and 64bit systems. This really should use some
better print formatter, but for the lack of it, do it this way.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Wed, 23 Aug 2023 00:18:18 +0000 (02:18 +0200)]
drivers/mtd/nvmxip: Rework the read accessor to support 32bit systems
Get rid of nvmxip_mmio_rawread() and just implement the readl()/readq()
reader loop within nvmxip_blk_read(). Cast the destination buffer as
needed and increment the read by either 4 or 8 bytes depending on if
this is systemd with 32bit or 64bit physical address.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Wed, 23 Aug 2023 00:18:17 +0000 (02:18 +0200)]
drivers/mtd/nvmxip: Trigger post bind as probe on driver level
Perform all the block device creation only once, after the driver itself
successfully bound. Do not do this in uclass post bind, as this might be
triggered multiple times. For example the ut_dm_host test triggers this
and triggers a memory leak that way, since there are now multiple block
devices created using the blk_create_devicef() .
To retain the old probe-on-boot behavior, set DM_FLAG_PROBE_AFTER_BIND
flag in uclass post_bind callback, so the driver model would probe the
driver at the right time.
Rename the function as well, to match similar functions in
other block-related subsystems, like the mmc one.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Wed, 23 Aug 2023 00:16:52 +0000 (02:16 +0200)]
fwu: Initialize global fwu library state during CI test
The current CI test worked by sheer luck, the g_dev global pointer
in the fwu library was never initialized and the test equally well
failed on sandbox64. Trigger the main loop in sandbox tests too to
initialize that global state, and move the sandbox specific exit
from fwu_boottime_checks after g_dev is initialized.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Acked-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Maksim Kiselev [Fri, 18 Aug 2023 09:34:30 +0000 (12:34 +0300)]
serial-uclass: reset gd->cur_serial_dev to NULL if serial not found
Reset gd->cur_serial_dev pointer to avoid calling non-relocated code
from relocated code if a serial driver is not found and
CONFIG_REQUIRE_SERIAL_CONSOLE is disabled.
Here is detailed explanation of what this patch is trying to fix.
U-boot calls the serial_find_console_or_panic() function twice.
The first console setup occurs before U-boot relocation in
the serial_init(). This stage uses simple FDT parsing and
assigns gd->cur_serial_dev to a "serial" device that lives in
non-relocated code too.
The second console setup after U-boot relocation(from serial_initialize())
may use full live DT (if OF_LIVE enabled) probe sequence with buses,
clocks, resets, etc... And if the console setup fails at this step,
than we should be caught by panic_str("No serial driver found").
But... If we disable CONFIG_REQUIRE_SERIAL_CONSOLE, than we
return from serial_init() with gd->cur_serial_dev pointing
to the "old"(non-relocated) serial device.
And if this area, where "old" serial device is placed, is changed
(e.g. Linux kernel may be relocated at this address), than we will get
an unexpected crash on the next call of printf().
Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
The make by default cuts off the stdout output from external tools,
so all error messages from the image-host are not shown in a make
output. Besides that, it is a common approach to use stderr stream
for error messages.
Use stderr for all error messages in image-host.
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Reviewed-by: Simon Glass <sjg@chromium.org>
Sam Edwards [Wed, 16 Aug 2023 22:27:53 +0000 (15:27 -0700)]
pci: pcie-brcmstb: do not rely on CLKREQ# signal
When the Broadcom STB PCIe controller is initialized, it must be set
into one of three CLKREQ# modes: "none"/"aspm"/"l1ss". The Linux driver,
through today, hard-codes "aspm" since the vast majority of boards using
this driver have a fixed PCIe bus with the CLKREQ# signal wired up.
The Raspberry Pi CM4, however, can be connected to a plethora of PCIe
devices, some of which do not connect the CLKREQ# line (they just leave
it floating). So "aspm" mode is no longer appropriate in all cases. In
Linux, there is a proposed patchset [1] to determine the proper mode.
This doesn't really make sense in U-Boot's case, so we just change the
assumption from "aspm" to "none" (which is always safe).
This patch DOES resolve a real-world crash that occurs when U-Boot is
running on a Raspberry Pi CM4 installed in slot 3 of a Turing Pi 2
cluster board.
Sam Edwards [Mon, 14 Aug 2023 22:34:13 +0000 (16:34 -0600)]
pci: pcie-brcmstb: bring over some robustness improvements from Linux
Since the initial U-Boot driver was ported here from Linux, the latter
has had a few changes for robustness/stability. This patch brings over
two of them:
- Do not attempt to access the configuration space of a PCIe device if
the link has gone down, as that will result in an asynchronous SError
interrupt which will crash U-Boot.
- Wait for the recommended 100ms after PERST# is deasserted.
I sent this patch while debugging a crash involving PCIe, but these
are unrelated improvements. I do not believe that this patch fixes any
real-world bug.
Tom Rini [Tue, 29 Aug 2023 20:58:42 +0000 (16:58 -0400)]
Merge branch '2023-08-29-integrate-efi-capsule-update-better-in-to-u-boot-buildflow' into next
To quote the author:
This patchset aims to bring two capsule related tasks under the U-Boot
build flow.
The first task is related to generation of capsules. The capsules can be
generated as part of U-Boot build, and this is being achieved through
binman, by adding a capsule entry type. The capsules can be generated by
specifying the capsule parameters as properties under the capsule entry
node.
The other task is the embedding of the public key into the platform's
DTB. The public key is in the form of an EFI Signature List(ESL) file
and is used for capsule authentication. This is being achieved by adding
the signature node containing the capsule public key in the platform's
DTB.
Corresponding changes have also been made to the test setup of the EFI
capsule update feature. The ESL public key file was embedded into the
sandbox platform's test.dtb as part of the test setup, post U-Boot
build. This is now no longer needed as the embedding of the ESL happens
as part of the build.
Secondly, the capsules needed for testing the EFI capsule update feature
were being generated through the invocation of the mkeficapsule tool.
This setup has also been changed to introduce generation of these
capsules through binman.
The document has been updated to reflect the above changes.
Sughosh Ganu [Tue, 22 Aug 2023 17:40:07 +0000 (23:10 +0530)]
test: capsule: Remove logic to add public key ESL
The public key EFI Signature List(ESL) needed for capsule
authentication is now embedded into the platform's DTB as part of the
build. Remove the superfluous logic from the test setup.
Sughosh Ganu [Tue, 22 Aug 2023 17:40:06 +0000 (23:10 +0530)]
sandbox: capsule: Add path to the public key ESL file
Add the path to the public key EFI Signature List(ESL) file for the
sandbox variants which enable capsule authentication. This ESL file
gets embedded into the platform's device-tree as part of the build.
Sughosh Ganu [Tue, 22 Aug 2023 17:40:05 +0000 (23:10 +0530)]
scripts/Makefile.lib: Embed capsule public key in platform's dtb
The EFI capsule authentication logic in u-boot expects the public key
in the form of an EFI Signature List(ESL) to be provided as part of
the platform's dtb. Currently, the embedding of the ESL file into the
dtb needs to be done manually.
Add a target for generating a dtsi file which contains the signature
node with the ESL file included as a property under the signature
node. Include the dtsi file in the dtb. This brings the embedding of
the ESL in the dtb into the U-Boot build flow.
The path to the ESL file is specified through the
CONFIG_EFI_CAPSULE_ESL_FILE symbol.
Sughosh Ganu [Tue, 22 Aug 2023 17:40:04 +0000 (23:10 +0530)]
scripts/Makefile.lib: Add dtsi include files as deps for building DTB
At the time of building the DTB, some dtsi files can be selected for
inclusion. Have these dtsi files as dependencies for the DTB
target. This also ensures generation or updating the dtsi files if
need be.
Sughosh Ganu [Tue, 22 Aug 2023 17:40:03 +0000 (23:10 +0530)]
scripts/Makefile.lib: Collate all dtsi files for inclusion
At the time of building a device-tree file, all the *u-boot.dtsi files
are looked for, in a particular order, and the first file found is
included. Then, the list of files specified in the
CONFIG_DEVICE_TREE_INCLUDES symbol are included.
Combine these files that are to be included into a variable, and then
include all these files in one go.
Sughosh Ganu [Tue, 22 Aug 2023 17:40:02 +0000 (23:10 +0530)]
sandbox: trace: Increase trace buffer size
When running the trace test on the sandbox platform, the current size
of 16MiB is no longer large enough for capturing the entire trace
history, and results in truncation. Use a size of 32MiB for the trace
buffer on the sandbox platform while running the trace test.
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Sughosh Ganu [Tue, 22 Aug 2023 17:40:00 +0000 (23:10 +0530)]
test: capsule: Generate EFI capsules through binman
Support has been added for generating the EFI capsules through
binman. Make changes in the EFI capsule update testing feature to
generate capsules through binman.
Sughosh Ganu [Tue, 22 Aug 2023 17:39:59 +0000 (23:09 +0530)]
binman: capsule: Add support for generating EFI capsules
Add support in binman for generating EFI capsules. The capsule
parameters can be specified through the capsule binman entry. Also add
test cases in binman for testing capsule generation.
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Sughosh Ganu [Tue, 22 Aug 2023 17:39:57 +0000 (23:09 +0530)]
sandbox: capsule: Enable EFI capsule module on sandbox variants
Enable the EFI capsule update code on all sandbox variants. This was
already enabled on the sandbox, sandbox64 and sandbox_flattree
variants. The rest of the variants also have the EFI capsule update
module enabled now. With this commit, the mkeficapsule tool also gets
enabled on all variants.
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Sughosh Ganu [Tue, 22 Aug 2023 17:39:56 +0000 (23:09 +0530)]
sandbox: capsule: Add keys and certificates needed for capsule update testing
Add the private keys and public key certificates which are to be used
for capsule authentication while testing the EFI capsule update
functionality. There are two pairs of private and public keys, good
and bad. The good key pair will be used for signing capsules, whilst
the bad key pair is to be used as malicious keys for testing
authentication failure cases. The capsule_pub_key_good.crt is also
converted to an EFI Signature List(ESL) file, SIGNER.esl, which is
embedded in the platform's device-tree for capsule authentication.
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>