[PATCH] include: linux/iopoll: fix uninitialized warning

2024-09-03 Thread Rouven Czerwinski
))) { \ | ^~~ The warning is bogus since before usage of start !IN_PBL and timeout_us != 0 are checked for the case where start is used, but in this case it is also always initialized to get_time_ns(). Initialize it to zero to silence the warning. Signed-off-by: Rouven Czerwinski

Re: HAB warning on imx6sx

2024-07-23 Thread Rouven Czerwinski
On Tue, 2024-07-23 at 14:44 +0200, Stefano Manni wrote: > Hi, > > On Tue, 2024-07-23 at 14:24 +0200, Rouven Czerwinski wrote: > > > > This is a common warning on some i.MX6 devices which indicates a > > CAAM > > RNG self-test failure, see the descr

Re: HAB warning on imx6sx

2024-07-23 Thread Rouven Czerwinski
rs when I secure the device? This is a common warning on some i.MX6 devices which indicates a CAAM RNG self-test failure, see the description in drivers/crypto/caam/rng_self_test.c which should be run by the bootloader to ensure that the RNG part of the CAAM is not faulty. This requires the CAAM driver within barebox to be enabled. Best regards, Rouven Czerwinski

[PATCH] mci: mci-core: make devinfo hex values obvious

2024-03-25 Thread Rouven Czerwinski
The Manufacturer and OEM/Application ID are printed as hex values, but don't have a leading zero to designate them as hex to a human reader. Add the leading 0x to make it obvious that these are hex values. Signed-off-by: Rouven Czerwinski --- drivers/mci/mci-core.c | 4 ++-- 1 file chang

[PATCH v2 2/2] crypto: caam: caamrng: dma map descriptors

2024-03-07 Thread Rouven Czerwinski
With DMA API debugging Barebox complains that the descriptors are never mapped before a sync. Add the map and unmap function calls. Signed-off-by: Rouven Czerwinski --- v2: - remove dma_map_sync_single_for_device() calls - remove dma_map_single for dma coherent memory drivers/crypto/caam

[PATCH v2 1/2] crypto: caam: map DMA buffers instead of single_sync

2024-03-07 Thread Rouven Czerwinski
With dma api debugging enabled, Barebox complains correctly that the result and desc buffer are never mapped correctly. Add the correct map and unmap sequence instead of the sync single. Signed-off-by: Rouven Czerwinski --- v2: - remove dma_sync_single_for_device() calls drivers/crypto/caam

Re: [PATCH] dma: debug: detect repeated DMA sync

2024-03-07 Thread Rouven Czerwinski
Hi Ahmad, On Thu, 2024-03-07 at 12:14 +0100, Ahmad Fatoum wrote: > dma_map_single will do any necessary cache maintenance to make a buffer > available to a device. Calling debug_dma_sync_single_for_device on such > a buffer is unnecessary, so flag when this happens. AFAIUI It is only incorrect i

[PATCH 2/2] crypto: caam: caamrng: map desc and buffer

2024-03-07 Thread Rouven Czerwinski
With DMA API debugging Barebox complains that some buffers are never mapped before a sync. Add the map and unmap function calls. Signed-off-by: Rouven Czerwinski --- drivers/crypto/caam/caamrng.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/crypto/caam/caamrng.c b/drivers

[PATCH 1/2] crypto: caam: map DMA buffers before sync

2024-03-07 Thread Rouven Czerwinski
With dma api debugging enabled, Barebox complains correctly that the result and desc buffer are never mapped correctly. Add the correct map and unmap sequence. Signed-off-by: Rouven Czerwinski --- drivers/crypto/caam/rng_self_test.c | 4 1 file changed, 4 insertions(+) diff --git a

[PATCH 2/3] blspec: add new blspec.compatible.extra variable

2023-09-20 Thread Rouven Czerwinski
used for the vendor hardware distinction). Signed-off-by: Rouven Czerwinski --- common/blspec.c | 56 + 1 file changed, 56 insertions(+) diff --git a/common/blspec.c b/common/blspec.c index f8d47f20d2..e361a02333 100644 --- a/common/blspec.

[PATCH 3/3] blspec: take extra entries into account

2023-09-20 Thread Rouven Czerwinski
Wire up the possible extra entries during entry matching. Signed-off-by: Rouven Czerwinski --- common/blspec.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/common/blspec.c b/common/blspec.c index e361a02333..e950de4e99 100644 --- a/common/blspec.c +++ b

[PATCH 1/3] blspec: take compatible name as argument

2023-09-20 Thread Rouven Czerwinski
Instead of retrieving the root compatible itself, let entry_is_of_compatible take the compatible as an argument. Pass in of_get_machine_compatible for now, no functional changes. Signed-off-by: Rouven Czerwinski --- common/blspec.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions

[PATCH] rsa: escape pkcs11 string passed to RSA command

2023-07-19 Thread Rouven Czerwinski
Escape the pkcs11 string that can be passed to the rsatoc script. Otherwise the sh -c invocation for commands will interpret the pkcs11 URI semicolon separator as the end of the command. Fixes: b39100bcea12 ("rsa: Allow to directly compile in rsa public keys") Signed-off-by: Rouven

Re: [PATCH 1/6] kbuild: clean start*_*.{p,ps}imximg files

2023-07-05 Thread Rouven Czerwinski
Hi, On Wed, 5 Jul 2023 16:42:14 +0200 Rouven Czerwinski wrote: > Cleanup files build during i.MX8M image generation. > > Signed-off-by: Rouven Czerwinski > --- > images/Makefile | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/images/Ma

[PATCH 6/6] ARM: i.MX: convert i.MX8MP/MM EVK to helper

2023-07-05 Thread Rouven Czerwinski
Use the new helper for i.MX8MP/MM EVK boards. Also add the necessary gencsf header to the imxcfg. Signed-off-by: Rouven Czerwinski --- .../nxp-imx8mm-evk/flash-header-imx8mm-evk.imxcfg | 1 + .../nxp-imx8mp-evk/flash-header-imx8mp-evk.imxcfg | 1 + images/Makefile.imx

[PATCH 1/6] kbuild: clean start*_*.{p,ps}imximg files

2023-07-05 Thread Rouven Czerwinski
Cleanup files build during i.MX8M image generation. Signed-off-by: Rouven Czerwinski --- images/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/images/Makefile b/images/Makefile index c1cb56f5b1..85e5f0503c 100644 --- a/images/Makefile +++ b/images/Makefile

[PATCH 5/6] ARM: i.MX: introduce build_imx8m_habv4img

2023-07-05 Thread Rouven Czerwinski
Similar to the helper for i.MX6, this allows us to build HAB enabled images by selecting KConfig symbols. So far I have only tested signed images, so there is no support for usb-signed or encrypted images yet. Signed-off-by: Rouven Czerwinski --- images/Makefile.imx | 13 + 1 file

[PATCH 3/6] i.MX: HABv4: extend support to i.MX8M SoCs

2023-07-05 Thread Rouven Czerwinski
Instead of only supporting i.MX8MQ based boards, extend support to the whole i.MX8M family. OCRAM address values were taken from AN12263 Rev1 06/2020. While at it turn the OCRAM adresses into defines as well. Signed-off-by: Rouven Czerwinski --- drivers/hab/habv4.c | 22

[PATCH 2/6] i.MX: HABv4: fix event status comparison

2023-07-05 Thread Rouven Czerwinski
Instead of only printing events belonging to a certain level, print all events that have a higher status than the current event. This fixes event printing for i.MX8M based boards. Fixes: 8b35facbb971 ("i.MX: HABv4: Improve HAB event printing") Signed-off-by: Rouven Czerwinski --- d

[PATCH 4/6] ARM: i.MX: allow HAB for i.MX8M family

2023-07-05 Thread Rouven Czerwinski
Since the HAB driver can now parse events for the complete family, allow selection for the whole family. Signed-off-by: Rouven Czerwinski --- arch/arm/mach-imx/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig

Re: [PATCH next v2] arm: rockchip: add support for CM3 on IO board

2023-04-04 Thread Rouven Czerwinski
Hi Sascha, On Mon, 2023-04-03 at 09:11 +0200, Sascha Hauer wrote: > On Thu, Mar 30, 2023 at 06:11:01PM +0200, Rouven Czerwinski wrote: > > From: Rouven Czerwinski > > > > Working: > > - RKBIN DDR training (rk3566_ddr_1056MHz_v1.13.bin) > > - RKBIN TF-A (v1

[PATCH next v2] arm: rockchip: add support for CM3 on IO board

2023-03-30 Thread Rouven Czerwinski
From: Rouven Czerwinski Working: - RKBIN DDR training (rk3566_ddr_1056MHz_v1.13.bin) - RKBIN TF-A (v1.34) from RKBIN - Environment storage - DHCP, ping and link detection Signed-off-by: Rouven Czerwinski --- v2: - rebase on next and adjust to RK356x changes - update rockchip boards

Re: [PATCH] mci: sdhci: Add and use common sdhci_wait_for_done()

2023-03-28 Thread Rouven Czerwinski
Hi, On Tue, 2023-03-28 at 11:58 +0200, Sascha Hauer wrote: > On Mon, Mar 27, 2023 at 03:01:31PM +0200, Rouven Czerwinski wrote: > > Hi, > > > > On Tue, 2023-03-21 at 10:50 +0100, Sascha Hauer wrote: > > > We have different driver specific variants of functions poll

Re: [PATCH 1/2] mci: rockchip-dwcmshc-sdhci: use sdhci_reset()

2023-03-28 Thread Rouven Czerwinski
Hi, On Tue, 2023-03-28 at 12:10 +0200, Sascha Hauer wrote: > We have sdhci_reset() which does the same as the driver specific > variant. Use the common function instead. > > Signed-off-by: Sascha Hauer this is: Tested-by: Rouven Czerwinski > --- >  drivers/mci/rockchip-dw

Re: [PATCH] mci: sdhci: Add and use common sdhci_wait_for_done()

2023-03-27 Thread Rouven Czerwinski
a -ETIMEDOUT the core > tries to detect a eMMC next. > > at91_sdhci_wait_for_done() returned the status instead of the expected > 0 value for success. I had to revert this commit to run barebox_update on the CM3 RK3566. Otherwise writes to the boot partition would hang indefinitely.

Re: [PATCH 3/5] ARM: Rockchip: Add rk3568 specific barebox entry function

2023-03-26 Thread Rouven Czerwinski
membase, memsize, fdt); > +} > diff --git a/include/mach/rockchip/atf.h > b/include/mach/rockchip/atf.h > index e5d55af3d7..e1e68825d1 100644 > --- a/include/mach/rockchip/atf.h > +++ b/include/mach/rockchip/atf.h > @@ -28,4 +28,6 @@ static inline void rk3568_atf_load_bl31(void *fdt) > { } >  #endif >  #endif >   > +void __noreturn rk3568_barebox_entry(void *fdt); > + >  #endif /* __MACH_ATF_H */ Best regards, Rouven Czerwinski

Re: [PATCH 2/5] ARM: Rockchip: implement memory read out from controller

2023-03-26 Thread Rouven Czerwinski
Hi, On Fri, 2023-03-24 at 15:03 +0100, Sascha Hauer wrote: > From: Ahmad Fatoum > > Add a driver to read out the amount of memory from the DDR controller. > The decoding of the registers has been taken from U-Boot. Currently > supported are the RK3399 and the RK3568, but decoding should work on

[PATCH] arm: rockchip: add support for CM3 on IO board

2023-03-18 Thread Rouven Czerwinski
From: Rouven Czerwinski Working: - RKBIN DDR training (rk3566_ddr_1056MHz_v1.13.bin) - RKBIN TF-A (v1.34) from RKBIN - Environment storage - DHCP, ping and link detection Signed-off-by: Rouven Czerwinski --- arch/arm/boards/Makefile | 1 + arch/arm/boards/radxa-cm3/.gitignore

Re: AW: HAB/SecureBoot on IMX8MN

2022-10-13 Thread Rouven Czerwinski
Hi Bernd, One of the pitfalls we had when enabling HAB for i.MX8MQ was that the SIP supported by the downstream TF-A to request the HAB event log was stalling the SoC forever. I couldn't find a way to make this work, so instead for i.MX8MQ we are parsing the HAB event log directly from SRAM. The i

Re: [PATCH master] ARM: i.MX8M: HABv4: make barebox SHA256 embedding POSIX-shell compatible

2022-08-14 Thread Rouven Czerwinski
ll > will end up embedding literal \xHH characters in the output resulting in > an ubootable barebox when CONFIG_PBL_VERIFY_PIGGY=y: > > !hash mismatch, refusing to decompress > > Fix this by using octal escape sequences instead. > > Signed-off-by: Ahmad Fatoum Reviewed-by:

[RFC Patch 1/3] blspec: create list of entries, iterate over list

2022-03-03 Thread Rouven Czerwinski
entry. Signed-off-by: Rouven Czerwinski --- common/blspec.c | 41 +++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/common/blspec.c b/common/blspec.c index 158fd1e9a2..0ea857294f 100644 --- a/common/blspec.c +++ b/common/blspec.c @@ -520,6

[RFC Patch 0/3] BLSpec device-tree fallback handling

2022-03-03 Thread Rouven Czerwinski
, "oldcomp",… ; And call blspec_set_compatible_depth(2) in the board code to indicate that not only the first compatible should be compared, but oldcomp should be compared as well. Rouven Czerwinski (3): blspec: create list of entries, iterate over list blspec: take compatible name as argu

[RFC Patch 3/3] blspec: allow setting compatible depth

2022-03-03 Thread Rouven Czerwinski
compatible depth by board code. Signed-off-by: Rouven Czerwinski --- common/blspec.c | 99 +++- include/blspec.h | 2 +- 2 files changed, 65 insertions(+), 36 deletions(-) diff --git a/common/blspec.c b/common/blspec.c index c1b1991338..4713a2157f 100644

[RFC Patch 2/3] blspec: take compatible name as argument

2022-03-03 Thread Rouven Czerwinski
Instead of retrieving the root compatible itself, let entry_is_of_compatible take the compatible as an argument. Pass in of_get_machine_compatible for now, no functional changes. Signed-off-by: Rouven Czerwinski --- common/blspec.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions

[PATCH v3] ARM: imx: add support for TQMa6UL SoM on MBa6ulxl

2022-02-11 Thread Rouven Czerwinski
Add support for a TQMA6UL2L SoM on top of a MBa6ulxl baseboard. The imxcfg header is for the LGA variant, the downstream U-Boot has an ifdef for another "standard" variant, however this is not included here since I don't have hardware to test. Signed-off-by: Rouven Czerwin

Re: i.MX HABV4 USB Image generation broken since fd9c7cbfe446b0f04aa66bb198c1769045ba2fe5

2022-02-11 Thread Rouven Czerwinski
Hi Sascha, On Fri, 2022-02-11 at 10:46 +0100, Sascha Hauer wrote: > Hi Rouven, > > On Tue, Feb 08, 2022 at 08:24:24AM +0100, Rouven Czerwinski wrote: > > Hi, > > > > Commit fd9c7cbfe446 ("scripts: Add common library functions") > > intorduced the u

i.MX HABV4 USB Image generation broken since fd9c7cbfe446b0f04aa66bb198c1769045ba2fe5

2022-02-07 Thread Rouven Czerwinski
ite_file when opened with mmap", however imx-image implements its own xwrite helper and opens files itself, so there is a mismatch there Thanks, Rouven Czerwinski # # Automatically generated file; DO NOT EDIT. # Barebox/arm 2021.10.0 Configuration # CONFIG_ARM=y CONFIG_ARM_LINUX=y CONFIG_ARM_US

Re: [PATCH v2] ARM: imx: add support for TQMa6UL SoM on MBa6ulxl

2022-02-07 Thread Rouven Czerwinski
Hi Trent, On Thu, 2021-06-17 at 17:03 -0700, Trent Piepho wrote: > On Thu, Jun 17, 2021 at 2:25 AM Rouven Czerwinski > wrote: > > + > > +static void setup_uart(void) > > +{ > > + void __iomem *iomuxbase = (void *)MX6_IOMUXC_BASE_ADDR; > > + >

[PATCH] Kbuild: use printf for as-instr

2022-01-20 Thread Rouven Czerwinski
Instead of hard coding /bin/echo, port the upstream printf formatting. Signed-off-by: Rouven Czerwinski --- scripts/Kbuild.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 838ab11e7c..ab092e455c 100644 --- a

Re: [PATCH] kbuild: dtc: use env to resolve echo

2022-01-20 Thread Rouven Czerwinski
Hi Trent, On Thu, 2022-01-20 at 00:36 -0800, Trent Piepho wrote: > There's another in scripts/Kbuild.include Yep, I have a patch for that as well. We haven't hit this since as- instr isn't used anywhere within barebox. - rcz ___ barebox mailing list b

[PATCH] kbuild: dtc: use env to resolve echo

2022-01-20 Thread Rouven Czerwinski
Posix does not mandate to have binaries within a certain path, but rather that the utilities may be available. Use env to resolve and call echo from PATH. Fixes: 2ae7ac7ab2f1 ("kbuild: dtc: Allow adding device tree fragments via config") Signed-off-by: Rouven Czerwinski --

Re: [PATCH 3/4] Revert "ARM: mmu: use client domain permissions to support ARMv7 eXecute Never"

2021-09-19 Thread Rouven Czerwinski
Hi Peter, while this may break for your board, it fundamentally introduces the possibility to speculate out of the RAM area on speculation happy processors. Are you calling into SAMA5D3 ROM code somewhere? If so an exception can be added similar to the handling for the HAB code (arch/arm/cpu/mmu_e

Re: [PATCH] mci: Improve error message for non-existent vmmc regulator

2021-09-14 Thread Rouven Czerwinski
int mci_register(struct mci_host *host) > > host->supply = regulator_get(hw_dev, "vmmc"); > if (IS_ERR(host->supply)) { > - dev_err(&mci->dev, "Failed to get 'vmmc' regulator.\n"); > +

Re: [PATCH master] net: designware: eqos: fix MDIO regression for STM32MP1 boards

2021-09-02 Thread Rouven Czerwinski
vice_node, > "mdio"); > + > + miibus->dev.device_node = of_get_compatible_child(np, > "snps,dwmac-mdio"); > + if (!miibus->dev.device_node) > + miibus->dev.device_node = of_get_child_by_name(np, "mdio"); > > ret

Re: [PATCH v2 1/3] ARM: i.MX8MP: bbu: fix wrong flash header offset for eMMC boot partition

2021-08-31 Thread Rouven Czerwinski
ffset on disk. There is a knob for that > (IMX_BBU_FLAG_PARTITION_STARTS_AT_HEADER), so use that instead > > Tested on i.MX8MN. Whole series is, Tested-by: Rouven Czerwinski on i.MX8MP-EVK. Best Regards, Rouven ___ barebox mailing list barebox@lists.

Re: [PATCH] net: eqos: let phy_resume handle fixed link phys

2021-08-25 Thread Rouven Czerwinski
Hello, self review time. On Wed, 2021-08-25 at 08:55 +0200, Rouven Czerwinski wrote: > Currently barebox will try to talk to the phy over mdio, even if the > parent is a fixed-link. This will result in the following stacktrace: > > barebox@Linux Automation Test Automation Con

[PATCH] net: eqos: let phy_resume handle fixed link phys

2021-08-24 Thread Rouven Czerwinski
return with 0 if bus is zero which indicates that the phy is connected to a fixed link. Signed-off-by: Rouven Czerwinski --- drivers/net/designware_eqos.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/designware_eqos.c b/drivers/net/designware_eqos.c index f83ec12714

Re: [PATCH v2 8/8] PBL: enable LIBFDT for OP-TEE early loading

2021-08-23 Thread Rouven Czerwinski
On Thu, 2021-08-05 at 15:53 +0200, Ahmad Fatoum wrote: > On 03.08.21 11:44, Rouven Czerwinski wrote: > > This allows the OP-TEE early loaded board to add the reserved memory > > entries for the correct MMU setup. This is done by including pbl/fdt.h > > and using

[PATCH v2 1/2] file_list: add file_list_parse_null()

2021-08-09 Thread Rouven Czerwinski
Move the usbgadget parse() function to file_list and rename it to file_list_parse_null() which will return a NULL pointer instead of an error. Also adjust the callers in the usbgadget code. Signed-off-by: Rouven Czerwinski --- v2: rebase on master to fix USB mass storage conflict --- common

[PATCH v2 2/2] fastboot: use file_list_parse_null()

2021-08-09 Thread Rouven Czerwinski
n+0xf/0x14) from [<8fe62791>] (do_data_abort+0x21/0x34) WARNING: [<8fe62791>] (do_data_abort+0x21/0x34) from [<8fe624d4>] (do_abort_6+0x48/0x54) Use file_list_parse_null instead of file_list_parse to get a NULL pointer if there is a parse error. Signed-off-by: Rouven Czerwi

[PATCH] mci: imx-esdhc-pbl: initialize fsl_esdhc_host

2021-08-05 Thread Rouven Czerwinski
roperly to let the PBL correctly load images. Fixes booting on the i.MX8M* board, tested on i.MX8MP EVK. Fixes: 56ca2c197e71 ("mci: sdhci: Get rid of many register ops") Signed-off-by: Rouven Czerwinski --- drivers/mci/imx-esdhc-pbl.c | 8 1 file changed, 4 insertions(+),

[PATCH v2 6/8] pbl: fdt: add support to parse reserved mem

2021-08-03 Thread Rouven Czerwinski
This allows the PBL to fill a reserved memory map which a subsequent commit will use modify the early MMU mapping. Signed-off-by: Rouven Czerwinski --- include/pbl.h | 25 pbl/fdt.c | 103 ++ 2 files changed, 113 insertions

[PATCH v2 5/8] of: add reserved_mem_read initcall

2021-08-03 Thread Rouven Czerwinski
Add a reserved_mem_read initcall which parses the reserved-memory entries and adds barebox of reserve entries. Also remove the OP-TEE size of reserve entry, since this is now parsed from the DT and does not need to be statically configured any longer. Signed-off-by: Rouven Czerwinski

[PATCH v2 1/8] of: reserve: add xn flag mem entries

2021-08-03 Thread Rouven Czerwinski
If the OF_RESERVE_ENTRY_FLAG_XN flag is passed while creating the entry, a subsequent commit will use this information in the mmu to map the area as non-executable. Signed-off-by: Rouven Czerwinski --- arch/arm/cpu/sm.c | 2 +- arch/arm/cpu/start.c | 2 +- arch/arm/mach

[PATCH v2 8/8] PBL: enable LIBFDT for OP-TEE early loading

2021-08-03 Thread Rouven Czerwinski
This allows the OP-TEE early loaded board to add the reserved memory entries for the correct MMU setup. This is done by including pbl/fdt.h and using fdt_fill_reserve_mem(). Signed-off-by: Rouven Czerwinski --- common/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/common/Kconfig b

[PATCH v2 2/8] of: add of_get_reserve_map stub for !CONFIG_OFTREE

2021-08-03 Thread Rouven Czerwinski
This allows us to unconditionally include of.h in files which did not require CONFIG_OFTREE, required for the MMU code in later patches. Signed-off-by: Rouven Czerwinski --- include/of.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/of.h b/include/of.h index

[PATCH v2 3/8] ARM: mmu: use reserve mem entries to modify maps

2021-08-03 Thread Rouven Czerwinski
: Rouven Czerwinski --- arch/arm/cpu/mmu.c | 34 -- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index 6388e1bf14..73f4cf5b36 100644 --- a/arch/arm/cpu/mmu.c +++ b/arch/arm/cpu/mmu.c @@ -17,6 +17,7

[PATCH v2 7/8] ARM: mmu-early: map no-map entries XN & uncached

2021-08-03 Thread Rouven Czerwinski
Ensure that reserved map entries with the no-map flag are marked as uncached and non-execute during the early MMU initialization. Signed-off-by: Rouven Czerwinski --- arch/arm/cpu/mmu-early.c | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm/cpu/mmu-early.c b/arch/arm

[PATCH v2 4/8] of: add flag to not create resmem DT entries

2021-08-03 Thread Rouven Czerwinski
If we are parsing entries from the /reserved-memory device tree path we don't want to add them again as resmem blocks at the beginning of the device tree. Therefore add another flag to indicate this. Signed-off-by: Rouven Czerwinski --- drivers/of/fdt.c | 10 +++--- include/of.h

[PATCH v2 0/8] XN Support for reserved-memory areas

2021-08-03 Thread Rouven Czerwinski
memory areas from the DT passed into barebox proper, to also remove no-map entries from the MMU there. Rouven Czerwinski (8): of: reserve: add xn flag mem entries of: add of_get_reserve_map stub for !CONFIG_OFTREE ARM: mmu: use reserve mem entries to modify maps of: add flag to not create resmem

Re: [PATCH 2/2] fastboot: use file_list_parse_null()

2021-07-21 Thread Rouven Czerwinski
On Wed, 2021-07-21 at 10:40 +0200, Rouven Czerwinski wrote: > In case an invalid file list is passed to file_list_parse(), it will > return an error, i.e. by passing "/dev/mmc1(emmc) /dev/mmc1.1(root)", > the error here being that the entries are not comma separated and > fi

[PATCH 1/2] file_list: add file_list_parse_null()

2021-07-21 Thread Rouven Czerwinski
Move the usbgadget parse() function to file_list and rename it to file_list_parse_null() which will return a NULL pointer instead of an error. Also adjust the callers in the usbgadget code. Signed-off-by: Rouven Czerwinski --- common/file-list.c | 16 common/usbgadget.c | 22

Re: [PATCH] fastboot: handle error from file_list_parse()

2021-07-21 Thread Rouven Czerwinski
On Wed, 2021-07-21 at 10:03 +0200, Ahmad Fatoum wrote: > Hello Rouven, > > On 21.07.21 09:50, Rouven Czerwinski wrote: > > In case an invalid file list is passed to file_list_parse(), it will > > return an error, i.e. by passing "/dev/mmc1(emmc) /dev/mmc1.1(root)"

[PATCH 2/2] fastboot: use file_list_parse_null()

2021-07-21 Thread Rouven Czerwinski
n+0xf/0x14) from [<8fe62791>] (do_data_abort+0x21/0x34) WARNING: [<8fe62791>] (do_data_abort+0x21/0x34) from [<8fe624d4>] (do_abort_6+0x48/0x54) Use file_list_parse_null instead of file_list_parse to get a NULL pointer if there is a parse error. Signed-off-by: Rouven Czerwins

[PATCH] fastboot: handle error from file_list_parse()

2021-07-21 Thread Rouven Czerwinski
ion+0xf/0x14) from [<8fe62791>] (do_data_abort+0x21/0x34) WARNING: [<8fe62791>] (do_data_abort+0x21/0x34) from [<8fe624d4>] (do_abort_6+0x48/0x54) Add the proper error handling and notify the user with a proper error message. Signed-off-by: Rouven Czerwinski --- comm

Re: [PATCH] habv4: habv4_get_status(): do not print HAB error event in case of known RNG self test failure

2021-07-16 Thread Rouven Czerwinski
t; - is_known_rng_fail_event(data, len)) { > + if (is_known_rng_fail_event(data, len)) { > pr_debug("RNG self-test failure detected, will run > software self-test\n"); > } else { > pr_err("---

[PATCH] image-sparse: remove unused define

2021-06-21 Thread Rouven Czerwinski
CONFIG_FASTBOOT_FLASH_FILLBUF_SIZE is present since the very first addition of sparse image support. However its not used anywhere in the code, so remove it. Fixes: 13f649a4f960 ("Add support for fastboot sparse images") Signed-off-by: Rouven Czerwinski --- lib/image-sparse.c | 4 --

[PATCH 2/2] common: bbu: add pr_fmt

2021-06-18 Thread Rouven Czerwinski
This makes it easier to identify where messages are coming from. Signed-off-by: Rouven Czerwinski --- common/bbu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/bbu.c b/common/bbu.c index a66be553e9..deb6a007c9 100644 --- a/common/bbu.c +++ b/common/bbu.c @@ -4,6 +4,9

[PATCH 1/2] common: bbu: only add available handlers

2021-06-18 Thread Rouven Czerwinski
g them to the list and skip those that are not available with an info level message. Signed-off-by: Rouven Czerwinski --- common/bbu.c | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/common/bbu.c b/common/bbu.c index 1a1edda96b..a66be553e9 100644 --- a/

[PATCH] usb: usb251xb: remove >=0 check for u32 port

2021-06-17 Thread Rouven Czerwinski
t_cnt)) so drop the check. Signed-off-by: Rouven Czerwinski --- drivers/usb/misc/usb251xb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c index 10d5aa310b..e282988fb4 100644 --- a/drivers/usb/misc/usb251xb.c ++

[PATCH v2] ARM: imx: add support for TQMa6UL SoM on MBa6ulxl

2021-06-17 Thread Rouven Czerwinski
Add support for a TQMA6UL2L SoM on top of a MBa6ulxl baseboard. The imxcfg header is for the LGA variant, the downstream U-Boot has an ifdef for another "standard" variant, however this is not included here since I don't have hardware to test. Signed-off-by: Rouven Czerwinski ---

[PATCH] ARM: imx: add support for TQMa6UL SoM on MBa6ulxl

2021-06-14 Thread Rouven Czerwinski
Add support for a TQMA6UL2L SoM on top of a MBa6ulxl baseboard. The imxcfg header is for the LGA variant, the downstream U-Boot has an ifdef for another "standard" variant, however this is not included here since I don't have hardware to test. Signed-off-by: Rouven Czerwinski

Re: [PATCH v2 12/13] test: self: run selftests as part of the pytest suite

2021-06-02 Thread Rouven Czerwinski
Hi Ahamd, On Mon, 2021-05-31 at 08:55 +0200, Ahmad Fatoum wrote: > We don't want to enable self tests in the normal configs as they may, > in future, bloat size needlessly. Enable it instead in the base.cfg > fragment and add a test that verifies the selftest command > runs without errors. > > Se

Re: [PATCH v2 10/13] test: add first sample tests

2021-06-02 Thread Rouven Czerwinski
Hi Ahmad, On Mon, 2021-05-31 at 08:55 +0200, Ahmad Fatoum wrote: > The test can be run manually with e.g. > > labgrid-pytest --lg-env test/arm/qemu_virt64_defconfig.yaml test/py > > Signed-off-by: Ahmad Fatoum > --- > test/.gitignore | 1 + > test/__init__.py | 0 > test/conftes

Re: [PATCH v2 09/13] test: add labgrid configs for some emulated targets

2021-06-02 Thread Rouven Czerwinski
On Mon, 2021-05-31 at 08:55 +0200, Ahmad Fatoum wrote: > There are various ways barebox can run under emulation, some of them are > described in the documentation and some more in the git history. > > Make running the emulators more convenient to use by collecting some > known-good emulator invoca

Re: [PATCH v2] ARM: webasto-ccbv2: Add variant with 512MB RAM

2021-05-17 Thread Rouven Czerwinski
21-05-17 at 18:03 +0200, Holger Assmann wrote: > Add variant for 512MB RAM board. > > v1 -> v2: > > by Rouven Czerwinski : > - just ship one single firmware version, depending on the underlying > board variant > > by Ahmad Fatoum : > - account for th

Re: [PATCH] ARM: webasto-ccbv2: Add variant with 512MB RAM

2021-05-04 Thread Rouven Czerwinski
{ get_builtin_firmware(ccbv2_optee_bin, &tee, &tee_size) } else { get_builtin_firmware(ccbv2_optee_512m_bin, &tee, &tee_size) with a new FIRMWARE_CCBV2_OPTEE_512M symbol. TBH, I don't like this, since our firmware KConfig will expand needlessly for the var

[PATCH 1/8] of: reserve: add xn flag mem entries

2021-04-20 Thread Rouven Czerwinski
If the OF_RESERVE_ENTRY_FLAG_XN flag is passed while creating the entry, a subsequent commit will use this information in the mmu to map the area as non-executable. Signed-off-by: Rouven Czerwinski --- arch/arm/cpu/sm.c | 2 +- arch/arm/cpu/start.c | 2 +- arch/arm/mach

[PATCH 3/8] ARM: mmu: use reserve mem entries to modify maps

2021-04-20 Thread Rouven Czerwinski
: Rouven Czerwinski --- arch/arm/cpu/mmu.c | 60 -- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index 6af228505d..71d6cad1ef 100644 --- a/arch/arm/cpu/mmu.c +++ b/arch/arm/cpu/mmu.c @@ -17,6 +17,7

[PATCH 7/8] ARM: mmu-early: map no-map entries XN & uncached

2021-04-20 Thread Rouven Czerwinski
Ensure that reserved map entries with the no-map flag are marked as uncached and non-execute during the early MMU initialization. Signed-off-by: Rouven Czerwinski --- arch/arm/cpu/mmu-early.c | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm/cpu/mmu-early.c b/arch/arm

[PATCH 5/8] of: add reserved_mem_read initcall

2021-04-20 Thread Rouven Czerwinski
Add a reserved_mem_read initcall which parses the reserved-memory entries and adds barebox of reserve entries. Also remove the OP-TEE size of reserve entry, since this is now parsed from the DT and does not need to be statically configured any longer. Signed-off-by: Rouven Czerwinski --- arch

[PATCH 6/8] pbl: fdt: add support to parse reserved mem

2021-04-20 Thread Rouven Czerwinski
This allows the PBL to fill a reserved memory map which a subsequent commit will use modify the early MMU mapping. Signed-off-by: Rouven Czerwinski --- include/pbl.h | 15 ++ pbl/fdt.c | 80 +++ 2 files changed, 95 insertions(+) diff

[PATCH 4/8] of: add flag to not create resmem DT entries

2021-04-20 Thread Rouven Czerwinski
If we are parsing entries from the /reserved-memory device tree path we don't want to add them again as resmem blocks at the beginning of the device tree. Therefore add another flag to indicate this. Signed-off-by: Rouven Czerwinski --- drivers/of/fdt.c | 10 +++--- include/of.h

[PATCH 8/8] PBL: enable LIBFDT for OP-TEE early loading

2021-04-20 Thread Rouven Czerwinski
This allows the OP-TEE early loaded board to add the reserved memory entries for the correct MMU setup. This is done by including pbl/fdt.h and using fdt_fill_reserve_mem(). Signed-off-by: Rouven Czerwinski --- common/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/common/Kconfig b

[PATCH 2/8] of: export of_get_reserve_map

2021-04-20 Thread Rouven Czerwinski
This allows the retrieval of the reserve map for usage in other functions, in this case one of the next commits will use this information to modify the MMU map. Signed-off-by: Rouven Czerwinski --- include/of.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/of.h b/include/of.h

Re: [PATCH] ARM: i.MX: Kamstrup mx7 concentrator board support

2021-04-12 Thread Rouven Czerwinski
On Mon, 2021-04-12 at 13:24 +0200, Ahmad Fatoum wrote: > Hello Lars, > > On 12.04.21 12:45, Lars Pedersen wrote: > > > > +#define BOARD_RESTART_GPIO IMX_GPIO_NR(7, 12) > > > > +#define TPM_RESET_GPIO IMX_GPIO_NR(3, 8) > > > > + > > > > +static void kamstrup_mx7_tpm_reset(void) > > > > +{ > > > > +

Re: [PATCH 16/20] RISC-V: add 64-bit support

2021-03-14 Thread Rouven Czerwinski
Hi Ahmad, On Sun, 2021-03-14 at 13:28 +0100, Ahmad Fatoum wrote: > From: Rouven Czerwinski > […] >  ifeq ($(CONFIG_ARCH_RV32I),y) > - riscv-cflags-y := -march=rv32im -mabi=ilp32 > - riscv-ldflags-y := -melf32lriscv > + riscv-cflags-y += -march=rv32im -mabi=ilp32 >

[PATCH] scripts: imx-image: add error handling for pwrite

2021-03-12 Thread Rouven Czerwinski
); | ^ Signed-off-by: Rouven Czerwinski --- scripts/imx/imx-image.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/imx/imx-image.c b/scripts/imx/imx-image.c index f5e89d07a6..57d777a065 100644 --- a/scripts/imx/imx

Re: Aarch64 Qemu virt - crash

2021-03-12 Thread Rouven Czerwinski
worth it to have an MMU on qemu for the workarounds. In the end MMU on qemu won't gain any speed advantage, so for now the virt machine will only work with MMU=n. [1]: http://lists.infradead.org/pipermail/barebox/2020-November/034509.html [2]: http://lists.infradead.org/pipermail/barebox/2020-November/034511.html Regards, Rouven Czerwinski ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox

Re: [PATCH] arch: arm: mach-imx: print HAB ROM code version

2021-03-12 Thread Rouven Czerwinski
mail.io > +pr_info("version: %u.%u.%u\n", (version >> 16), ((version >> 8) & 0xff), > (version & 0xff)); > + >  status = rvt->report_status(&config, &state); >  pr_info("Status: %s (0x%02x)\n", habv4_get_status_str(status), status

Re: [PATCH] nvmem: ocotp: add support to revoke keys

2021-03-12 Thread Rouven Czerwinski
Hello Denis, On Thu, 2021-03-11 at 17:07 +, Denis Osterland-Heim wrote: > From: Denis Osterland-Heim > > Add device tree property 'barebox,key-revoke' with the syntax: > < key_phandle fuse_offset mask > > > An example: > signature { > key1: key-img1 { ... }; > key2: key-srk1 { ... }; > }; >

Re: [PATCH] bbremote: fix the exit usage

2021-02-24 Thread Rouven Czerwinski
3/library/constants.html#constants-added-by-the-site-module Regards, Rouven Czerwinski ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox

[PATCH 1/3] commands: readline: sort includes

2021-02-10 Thread Rouven Czerwinski
Signed-off-by: Rouven Czerwinski --- commands/readline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/readline.c b/commands/readline.c index ef54b5e92f..426f579ee4 100644 --- a/commands/readline.c +++ b/commands/readline.c @@ -1,11 +1,11 @@ // SPDX-License

[PATCH 3/3] commands: readline: release command slice

2021-02-10 Thread Rouven Czerwinski
Release the command slice around readline to let the workqueues run while waiting for input. Signed-off-by: Rouven Czerwinski --- commands/readline.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/commands/readline.c b/commands/readline.c index 796b4def95..ece25d12f5 100644 --- a

[PATCH 2/3] commands: readline: use exit code macros

2021-02-10 Thread Rouven Czerwinski
Signed-off-by: Rouven Czerwinski --- commands/readline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/readline.c b/commands/readline.c index 426f579ee4..796b4def95 100644 --- a/commands/readline.c +++ b/commands/readline.c @@ -16,13 +16,13 @@ static int

Re: lock path in barebox-state

2021-02-10 Thread Rouven Czerwinski
let me know what you think the best approach would be. Since barebox-state is part of the dt-utils software suite, questions should be directed to oss-to...@pengutronix.de Feel free to send patches changing the locking directory to this address as well. Regards, Rouven Czerwinski __

[PATCH] fixup! of: overlay: do not parse phandles as properties

2021-01-13 Thread Rouven Czerwinski
This breaks the eventual fixup of phandles into the linux device tree. Fix this by also keeping the phandle properties in the DT. --- drivers/of/overlay.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index 0bebe26e39..d7695726fc 100644 --- a/driver

Re: Barebox OF-Overlay Handling

2021-01-13 Thread Rouven Czerwinski
advantage of this solution is that it can happen to end in a > non-booting device for FPGA platforms using overlays to programm the > bit stream and forget to enable CONFIG_OF_OVERLAY_LIVE because the > kernel tries to access regions not existing. > > I've discussed this with Mi

[PATCH 2/2] ARM: qemu: support for state & env via DT overlay

2021-01-13 Thread Rouven Czerwinski
256M -M virt -kernel images/barebox-dt-2nd.img -nographic Storing data, changing into the qemu console via Ctrl-A Ctrl-C, issuing 'system_reset' and Ctrl-A Ctrl-C to get back into the barebox console. Signed-off-by: Rouven Czerwinski --- arch/arm/boards/qemu-virt/.gitignore |

[PATCH 1/2] of: overlay: do not parse phandles as properties

2021-01-13 Thread Rouven Czerwinski
Instead of handling phandles as properties, assign them directly as a handle to the node. This allows phandles within nodes inside the device tree overlays to be handled correctly. Signed-off-by: Rouven Czerwinski --- drivers/of/overlay.c | 5 + 1 file changed, 5 insertions(+) diff --git a

  1   2   3   4   >