| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For debugging hangs, CONFIG_DEBUG_PROBES and CONFIG_DEBUG_INITCALLS are
useful tools to pinpoint where the issue is. FOr issues that lock up the
SoC, their output can be misleading if we have bigger UART FIFO and not
all output has managed to make it out.
Add a new DEBUG_FLUSH_LINE_BREAK to make debugging this easier.
The option is unnecessary outside of debugging, so for now we don't add
a prompt by default and select it as needed.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20240313100048.386604-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
EFI loader will need to parse and load PE executables. Add functions to
facilitate that. The API is inspired by the already existing ELF API.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20240304190038.3486881-66-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The EFI code will grow considerably with the addition of loader support,
so it makes sense to move it to top-level to shorten the path and to
improve visibility.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20240304190038.3486881-8-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
When developing using Qemu and KASAN/Hardening options enabled, it can
be useful to just terminate Qemu on an error, because a stack trace is
already printed to console and restarting barebox or hanging just
results in the developer having to kill the process.
For this use case, add shutdown as third option besides hang and reset.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20240304190038.3486881-6-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a function API to manipulate partition tables. Basically
partition_table_new() and partition_table_read() are factored out from
existing code. Apart from that we will have partition_create() to
create a new partition and partition_remove() to remove a partition.
These functions do basic sanity checks like partition overlap checking,
access beyond device cheks and call into not yet existing efi or msdos
specific function hooks.
Link: https://lore.barebox.org/20240219083140.2713047-10-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
At the moment CONFIG_TIMESTAMP help text is inherited from U-Boot.
Fix it in accordance with barebox realities.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Link: https://lore.barebox.org/20240103170725.846378-3-antonynpavlov@gmail.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When enabled, this outputs messages like:
list_del corruption, 000000005fe4a9d0->next is LIST_POISON1 (0000000000000100)
which can be useful when debugging.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20240103101948.2630473-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
An size of 4M seems quite large and upstream OP-TEE code mostly uses 2M
for all i.MX platforms. However keep the 4M as default but make it
configurable for integrators which want to use the autom. OF fixup
logic.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.barebox.org/20240116170738.209954-8-m.felsch@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
| |
On ARM64 OP-TEE loading requires to be in EL3 so we can't load OP-TEE
via bootm on these systems.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.barebox.org/20240116170738.209954-7-m.felsch@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
So far, barebox support for OP-TEE was restricted to loading it either
early in PBL or via bootm and to not step over it when allocating
memory. This was guarded behind CONFIG_HAVE_OPTEE.
This commit imports from Linux the driver behind CONFIG_OPTEE, which
brings actual bidirectional communication with OP-TEE in barebox.
This is useful as trusted applications running in OP-TEE can provide
various services to the normal world, like filtered OTP access, RNG
seeded from normally inaccessible entropy sources, firmware TPM and
management of resources like clocks, resets, power domains and voltage
regulators in the form of SCMI.
We already have SCMI support, but only via the SMC calling convention
for communication with TF-A. For integration with publicly available
STM32MP13 firmware, we need to do SCMI over OP-TEE and this is likewise
interesting for STM32MP1 trusted boot setups.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20231127063559.2205776-7-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For DMA_FROM_DEVICE, calling dma_sync_single_for_cpu
before arch_sync_dma_for_device has been called is wrong:
- Memory region is dirty in CPU cache
- Device writes packet into region
- CPU cache lines are written back
- Buffer memory is corrupted
In order to spot such issues, let's add a new CONFIG_DMA_API_DEBUG
that will warn about mismatch in order.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20231129061758.1781732-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
TI K3 SoCs have ns16550 compatible UARTs. Add lowlevel debugging support
for the AM62x SoC from the K3 family.
Link: https://lore.barebox.org/20230803105003.4088205-5-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
| |
This adds support for debug_ll output on i.MX9 SoCs.
Link: https://lore.barebox.org/20231110125800.1901232-16-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We used to have following alignments:
32-bit CPU 64-bit CPU
dummy 8 bytes 8 bytes
dlmalloc 8 bytes 16 bytes
tlsf 4 bytes 8 bytes
With recent change to TLSF, we now always have at least 8 bytes as
alignment. To make this clearer, define a new CONFIG_MALLOC_ALIGNMENT
and either use it as the alignment (as done for dummy) or add static
asserts to ensure we have at least this alignment.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230911152433.3640781-6-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Generating the crc table on a not-so-powerfull i.MX6q SoC takes
around 100us. This is negligible and not worth bothering the user with
an extra Kconfig option. Just drop the option and make it the default.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
CONFIG_RSA_KEY and CONFIG_BOOTM_FITIMAGE_PUBKEY can both point at the
RSA public key, but with different formats. CONFIG_RSA_KEY is probably
easier to integrate, so reference it from CONFIG_BOOTM_FITIMAGE_PUBKEY
and be explicit about the different formatting.
Link: https://lore.barebox.org/20230727094748.1152484-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Both the Freedesktop and the systemd links are outdated, so replace them
with the current home of the spec.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230629065225.1119341-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Link: https://lore.barebox.org/20230614073444.3493711-1-u.oelmann@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For development, it may be useful to enforce warning-free builds.
Add a Kconfig option for this.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230605063755.1438127-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The linker scripts fail in an odd way if CONFIG_TEXT_BASE doesn't
fit in 32-bit, e.g. reporting that the PBL is greater than
0xffffffff, because CONFIG_TEXT_BASE is bigger than that.
As new platform should just select CONFIG_PBL_RELOCATABLE and
CONFIG_RELOCATABLE anyway, let's enforce the 32-bit maximum in
Kconfig to make errors easier to grok.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230605062803.3994132-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
| |
Linux has added new SYM_ macros in the assembly code and deprecated
ENTRY/PROC. Import the necessary definitions to make kernel code
porting easier.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230526063746.1155297-4-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
This adds the assorted rk3588 support stuff which is very similar
to the existing rk3568 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
memtest is quite talkative: it narrates status and advances a progress
bar. For non-interactive use, e.g. for selftest, this is a bit much,
so hide that behidnd a new MEMTEST_VERBOSE flag.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230522052835.1039143-10-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There's no reason to restrict mmuinfo to ARMv7 or ARM at all for that
matter. Prepare extending it for ARMv8 support by splitting off the
32-bit parts.
While at it, make the output available for debuggin by exporting a
mmuinfo() function.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230522052835.1039143-8-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
Drop the CONFIG_MMU_EARLY and make early MMU initialization the default.
Doing so allows us for some simplifications in the MMU code as we have
less code pathes to care and think about.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
PBL_CONSOLE enables use of printf and friends in the prebootloader. The
underlying putc will be what was passed to pbl_set_putc or alternatively
the DEBUG_LL PUTC_LL implementation.
In either case, PBL_CONSOLE is required to get the PBL output useful to
debugging, so let's drop the DEBUG_LL depends, but keep the help text to
lessen user confusion.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230522052222.1037931-5-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
CONFIG_STATE only enables the framework, but practically all users
interact with the framework via the device tree binding, which has a
separate symbol. Make barebox state enabling easier by automatically
enabling STATE_DRV and CMD_STATE if possible when STATE itself is
enabled. They can still be disabled for configurations that don't
need them.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230331143130.1903540-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
| |
Below mentioned commit added a select DEBUG_IMX_UART for all supported
i.MX variants apart from the i.MX6Q. Let's do likewise there, so
DEBUG_LL may be enabled without errors about missing PUTC_LL definition.
Fixes: 0fff6cb9bb4f ("ARM: i.MX: Only provide PUTC_LL() when activated")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230414132651.1703346-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
| |
Add a Kconfig symbol for the vexpress debug_ll UART port
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
With multi-arch support we must make sure we provide exactly one
PUTC_LL() function as indicated by the "Kernel low-level debugging port"
Kconfig choice. Make sure that the stm32mp specific debug_ll.h only
provides PUTC_LL() when specified.
The stm32mp specific debug_ll.h also provides other functions needed
by board code regardless if the stm32mp debug_ll port is enabled or
not, so include it explicitly where needed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
With multi-arch support we must make sure we provide exactly one
PUTC_LL() function as indicated by the "Kernel low-level debugging port"
Kconfig choice. Make sure that the omap specific debug_ll.h only
provides PUTC_LL() when specified.
The omap specific debug_ll.h also provides other functions needed
by board code regardless if the omap debug_ll port is enabled or
not, so include it explicitly where needed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
With multi-arch support we must make sure we provide exactly one
PUTC_LL() function as indicated by the "Kernel low-level debugging port"
Kconfig choice. Make sure that the Rockchip specific debug_ll.h only
provides PUTC_LL() when specified.
The Rockchip specific debug_ll.h also provides other functions needed
by board code regardless if the Rockchip debug_ll port is enabled or
not, so include it explicitly where needed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
With multi-arch support we must make sure we provide exactly one
PUTC_LL() function as indicated by the "Kernel low-level debugging port"
Kconfig choice. Make sure that the i.MX specific debug_ll.h only
provides PUTC_LL() when specified.
The i.MX specific debug_ll.h also provides other functions needed
by board code regardless if the i.MX debug_ll port is enabled or
not, so include it explicitly where needed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
When CONFIG_HAS_ASM_DEBUG_LL is set then include/debug_ll.h includes
asm/debug_ll.h, otherwise it includes mach/debug_ll.h. Drop this option
and instead always include asm/debug_ll.h and include mach/debug_ll.h
from there if necessary. This also adds the missing asm/debug_ll.h for
architectures which previously did not have that file.
Link: https://lore.barebox.org/20230302111606.1054037-6-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
We have DEBUG_LL for the PL011 on the ARM64 QEMU Virt,
but it is unused. Wire it in.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230130064510.2398689-1-ahmad@a3f.at
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
CONFIG_INITCALL_DEBUG=y is a very useful tool for debugging barebox
hangs, but it's not so useful if the hang happens very early.
Define a new CONFIG_DEBUG_PBL symbol that will define DEBUG globally
in PBL to get more insight into boot hangs.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20221212164212.2358450-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have two methods of loading a trusted OS: The legacy, but generic,
way of doing it in barebox proper during bootm and the new way of doing
it in prebootloader to reduce attack surface as much as possible by
running barebox proper completely in normal world.
Add a new CONFIG_HAVE_OPTEE symbol that is selected in both cases, so
code can use just that instead of checking for both.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230111075940.922817-7-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
We have 9 symbols beginning with ARCH_HAS, but only with HAS_ARCH.
Change it over for symmetry. No functional change.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20221205133033.3008535-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|