summaryrefslogtreecommitdiffstats
path: root/common/Kconfig
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/misc'Sascha Hauer2024-03-151-0/+12
|\
| * console: flush consoles on newline when debuggingAhmad Fatoum2024-03-131-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | common: add PE/COFF loaderAhmad Fatoum2024-03-051-0/+3
| | | | | | | | | | | | | | | | | | 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>
* | common: efi: move directory to top-levelAhmad Fatoum2024-03-051-2/+0
| | | | | | | | | | | | | | | | | | | | 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>
* | common: add option to poweroff system on failureAhmad Fatoum2024-03-051-10/+34
|/ | | | | | | | | | | | | 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>
* partitions: implement partition manipulation supportSascha Hauer2024-02-201-0/+3
| | | | | | | | | | | | | 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>
* Merge branch 'for-next/misc'Sascha Hauer2024-01-231-4/+11
|\
| * common: Kconfig: TIMESTAMP: fix helpAntony Pavlov2024-01-111-4/+3
| | | | | | | | | | | | | | | | | | 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>
| * lib: add optional linked list debuggingAhmad Fatoum2024-01-111-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | common: add OPTEE_SHM_SIZE to configure optee shared memoryMarco Felsch2024-01-191-0/+9
| | | | | | | | | | | | | | | | | | | | | | 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>
* | common: limit BOOTM_OPTEE to 32bit systemsMarco Felsch2024-01-191-1/+1
|/ | | | | | | | | 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>
* Merge branch 'for-next/op-tee'Sascha Hauer2023-12-181-0/+5
|\
| * optee: add bidirectional communication supportMarc Kleine-Budde2023-12-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | dma: add DMA API debugging supportAhmad Fatoum2023-12-051-0/+14
|/ | | | | | | | | | | | | | | | | 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>
* Merge branch 'for-next/k3'Sascha Hauer2023-11-271-1/+15
|\
| * ARM64: Add support for debug_ll on TI AM62x SoCsSascha Hauer2023-11-031-1/+15
| | | | | | | | | | | | | | | | 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>
* | ARM: i.MX: add i.MX9 debug_ll supportSascha Hauer2023-11-201-0/+6
|/ | | | | | | 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>
* common: malloc: ensure alignment is always at least 8 byteAhmad Fatoum2023-09-261-0/+5
| | | | | | | | | | | | | | | | | 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>
* crypto: crc32: Drop CONFIG_DYNAMIC_CRC_TABLE optionSascha Hauer2023-09-041-9/+0
| | | | | | | | 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>
* crypto: clarify relationship of CONFIG_{BOOTM_FITIMAGE_PUBKEY,RSA_KEY}Ahmad Fatoum2023-07-281-3/+8
| | | | | | | | | | 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>
* Documentation: use current link to bootloader spec specAhmad Fatoum2023-07-041-2/+2
| | | | | | | | | 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>
* Merge branch 'for-next/misc'Sascha Hauer2023-06-221-2/+20
|\
| * common: Kconfig: fix typoUlrich Ölmann2023-06-141-1/+1
| | | | | | | | | | | | 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>
| * common: add CONFIG_WERROR optionAhmad Fatoum2023-06-061-0/+14
| | | | | | | | | | | | | | | | | | 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>
| * common: limit CONFIG_TEXT_BASE to 32-bitAhmad Fatoum2023-06-051-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | include: sync <linux/linkage.h> with LinuxAhmad Fatoum2023-05-261-0/+6
|/ | | | | | | | | | 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>
* Merge branch 'for-next/rockchip'Sascha Hauer2023-05-241-0/+9
|\
| * ARM: rockchip: Add rk3588 supportSascha Hauer2023-05-231-0/+9
| | | | | | | | | | | | | | 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>
* | Merge branch 'for-next/arm-mmu'Sascha Hauer2023-05-241-8/+5
|\ \
| * | common: memtest: prepare for reuse in self testAhmad Fatoum2023-05-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ARM: prepare extending mmuinfo beyond ARMv7Ahmad Fatoum2023-05-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ARM: mmu: always do MMU initialization early when MMU is enabledSascha Hauer2023-05-221-9/+0
| |/ | | | | | | | | | | | | | | | | 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: have DEBUG_PBL depend only on PBL_CONSOLEAhmad Fatoum2023-05-231-1/+1
|/ | | | | | | | | | | | | | 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>
* Merge branch 'for-next/misc'Sascha Hauer2023-04-191-0/+2
|\
| * common: state: make barebox-state enabling in Kconfig easierAhmad Fatoum2023-04-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ARM: i.MX6: fix DEBUG_LL useAhmad Fatoum2023-04-171-0/+1
|/ | | | | | | | | | | 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>
* ARM: bcm283x: Only provide PUTC_LL() when activatedSascha Hauer2023-03-071-0/+7
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: vexpress: Only provide PUTC_LL() when activatedSascha Hauer2023-03-071-0/+7
| | | | | | Add a Kconfig symbol for the vexpress debug_ll UART port Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: stm32mp: Only provide PUTC_LL() when activatedSascha Hauer2023-03-071-0/+7
| | | | | | | | | | | | 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>
* ARM: zynqmp: Add multi-arch supportSascha Hauer2023-03-071-0/+7
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: omap: Only provide PUTC_LL() when activatedSascha Hauer2023-03-071-0/+6
| | | | | | | | | | | | 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>
* ARM: Rockchip: Only provide PUTC_LL() when activatedSascha Hauer2023-03-071-0/+7
| | | | | | | | | | | | 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>
* ARM: i.MX: Only provide PUTC_LL() when activatedSascha Hauer2023-03-071-0/+15
| | | | | | | | | | | | 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>
* ARM: drop CONFIG_HAS_ASM_DEBUG_LLSascha Hauer2023-03-031-4/+0
| | | | | | | | | | | 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>
* ARM: add DEBUG_LL support for ARM64 QEMU VirtAhmad Fatoum2023-01-311-0/+4
| | | | | | | | | 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>
* Merge branch 'for-next/misc'Sascha Hauer2023-01-201-0/+9
|\
| * pbl: Add Kconfig option to enable DEBUG globally in PBLAhmad Fatoum2022-12-161-0/+9
| | | | | | | | | | | | | | | | | | | | | | 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>
* | common: add new CONFIG_HAVE_OPTEE symbolAhmad Fatoum2023-01-121-1/+6
|/ | | | | | | | | | | | | | 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>
* treewide: rename CONFIG_HAS_ARCH_SJLJ to CONFIG_ARCH_HAS_SJLJAhmad Fatoum2022-12-071-2/+2
| | | | | | | | | 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>
* Merge branch 'for-next/riscv'Sascha Hauer2022-10-131-0/+5
|\