Re: [PATCH] scripts: imx: fix header entry offset

2024-04-18 Thread Marco Felsch
Hi Benjamin, On 24-04-18, Benjamin Gaignard wrote: > Header entry is at a fixed offset and doesn't rely on header lenght. > Use header lenght create a bug when adding a signed firmware like > the HDMI firmware for IMX8MQ. NAK, please see b6e2b263f304 ("scripts: imx-image: header_v2: add

Re: [PATCH] file-list: remove unused variable

2024-04-17 Thread Marco Felsch
On 24-04-17, Sascha Hauer wrote: > struct file_list::num_entries is only ever used to check if a file list > is empty. Do this check with list_empty() instead and remove the unused > member. > > Signed-off-by: Sascha Hauer Reviewed-by: Marco Felsch

Re: [PATCH 1/4] DNM: dts: arm64: rockchip: copy pf5 device tree from mainline Linux

2024-04-12 Thread Marco Felsch
On 24-04-12, Ahmad Fatoum wrote: > Hi, > > On 12.04.24 15:02, Michael Riesch wrote: > > Hi Marco, > > > > Thanks for your response! > > > > On 4/5/24 19:02, Marco Felsch wrote: > >> Hi Michael, > >> > >> thanks for your patche

[PATCH] mci: sdhci: fix dma mapping

2024-04-08 Thread Marco Felsch
In case of MMC_DATA_READ the dest address should be used and in case of MMC_DATA_WRITE the src address should be used. We had no issues for now since both dest and src point to same address due to the union. Signed-off-by: Marco Felsch --- drivers/mci/sdhci.c | 4 ++-- 1 file changed, 2

[PATCH v2 1/2] bootm: replace CONFIG_BOOTM_FORCE_SIGNED_IMAGES with helper

2024-04-08 Thread Marco Felsch
commit. No functional change. Signed-off-by: Ahmad Fatoum Signed-off-by: Marco Felsch --- Changelog: v2: - add my s-o-b tag v1: - https://lore.barebox.org/barebox/20231023162748.533468-1-a.fat...@pengutronix.de/ arch/arm/lib32/bootm.c | 2 +- common/bootm.c | 11 +-- include

[PATCH v2 2/2] bootm: add support for dynamically forcing signature verification

2024-04-08 Thread Marco Felsch
verifying a JSON web token with the appropriate claim. For such systems, provide a bootm_force_signed_images() function. There's intentionally no unforce counterpart as this is meant to be non-reversible. Signed-off-by: Ahmad Fatoum Signed-off-by: Marco Felsch --- Changelog: v2: - fix commit

Re: [PATCH 2/2] bootm: always apply strict signed FIT boot rules

2024-04-08 Thread Marco Felsch
On 24-04-08, Ahmad Fatoum wrote: > Hello Marco, > > On 08.04.24 09:36, Marco Felsch wrote: > > We do use an strict boot rule if the CONFIG_BOOTM_FORCE_SIGNED_IMAGES > > switch was enabled. Instead of only checking the compile time switch we > > should che

Re: [PATCH 1/2] bootm: don't allow bootm_set_verify_mode if BOOTM_FORCE_SIGNED_IMAGES is enabled

2024-04-08 Thread Marco Felsch
On 24-04-08, Ahmad Fatoum wrote: > Hello Marco, > > On 08.04.24 09:36, Marco Felsch wrote: > > The only allowed value for bootm_verify_mode is BOOTM_VERIFY_SIGNATURE > > if CONFIG_BOOTM_FORCE_SIGNED_IMAGES is enabled. This is set via the > > bootm_init() initcall. All

[PATCH 2/2] bootm: always apply strict signed FIT boot rules

2024-04-08 Thread Marco Felsch
the mode. If CONFIG_BOOTM_FORCE_SIGNED_IMAGES was enabled the only allowed value is BOOTM_VERIFY_SIGNATURE. Signed-off-by: Marco Felsch --- common/bootm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/bootm.c b/common/bootm.c index e6703b19b3ba..03af3d2b28f7 100644

[PATCH 1/2] bootm: don't allow bootm_set_verify_mode if BOOTM_FORCE_SIGNED_IMAGES is enabled

2024-04-08 Thread Marco Felsch
The only allowed value for bootm_verify_mode is BOOTM_VERIFY_SIGNATURE if CONFIG_BOOTM_FORCE_SIGNED_IMAGES is enabled. This is set via the bootm_init() initcall. All further attempts to modify this variable should be prevented. Signed-off-by: Marco Felsch --- common/bootm.c | 5 + 1 file

Re: [PATCH 1/4] DNM: dts: arm64: rockchip: copy pf5 device tree from mainline Linux

2024-04-05 Thread Marco Felsch
Hi Michael, thanks for your patches. > DNM: dts: arm64: rockchip: copy pf5 device tree from I suppose DNM means "do not merge", instead of marking it this way we put the not yet upstream Linux dts files into arch as well but mark them as upstream dts file, e.g.: -

[PATCH] pmdomain: imx8mp-blk-ctrl: fix adb handshake handling

2024-04-03 Thread Marco Felsch
: 5cb41f0b62dc ("pmdomain: imx: add i.MX8MP HSIO blk-ctrl driver") Signed-off-by: Marco Felsch --- drivers/pmdomain/imx/imx8mp-blk-ctrl.c | 28 -- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/drivers/pmdomain/imx/imx8mp-blk-ctrl.c b/drivers/pmdomain/

Re: [PATCH 2/5] nvmem: expose nvmem cells as cdev

2024-03-25 Thread Marco Felsch
On 24-03-25, Sascha Hauer wrote: > On Fri, Mar 22, 2024 at 05:45:56PM +0100, Marco Felsch wrote: > > Expose the nvmem cells via cdevs which is our equivalent to the Linux > > sysfs exposure. This allows the easier user queries for board code and > > shell. Keep the Linux

Re: [PATCH 3/5] nvmem: constify the write path

2024-03-25 Thread Marco Felsch
On 24-03-25, Sascha Hauer wrote: > On Fri, Mar 22, 2024 at 05:45:57PM +0100, Marco Felsch wrote: > > Constify the nvmem_*_write() functions as the write functions shouldn't > > alter the buffer content. > > > > Signed-off-by: Marco Felsch > > --- > &g

[PATCH 8/8] of: overlay: replace filename with an more unique name

2024-03-22 Thread Marco Felsch
-by: Marco Felsch --- drivers/of/overlay.c | 39 +-- include/of.h | 3 ++- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index 150b07daccaa..964b56db2337 100644 --- a/drivers/of/overlay.c

[PATCH 6/8] of: overlay: add FIT overlay support

2024-03-22 Thread Marco Felsch
signature). - The "name" filter check is performed on the config-node name (the node under the configurations) and not the FIT overlay image name (the node name under the images node). - The "content" filter check does not differ from the file based overlay handling. Signed-

[PATCH 7/8] of: overlay: drop unnecessary empty check in of_overlay_global_fixup_dir

2024-03-22 Thread Marco Felsch
This is now done during of_overlay_global_fixup() so we can drop it here. Signed-off-by: Marco Felsch --- drivers/of/overlay.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index c8e70ab00091..150b07daccaa 100644 --- a/drivers/of/overlay.c

[PATCH 5/8] FIT: expose useful helpers

2024-03-22 Thread Marco Felsch
The upcoming FIT overlay support requires these helpers for performing check on a fit image. Signed-off-by: Marco Felsch --- common/image-fit.c | 4 ++-- include/image-fit.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/image-fit.c b/common/image-fit.c index

[PATCH 3/8] of: overlay: make the pattern match function more generic

2024-03-22 Thread Marco Felsch
by dropping the "file" prefix. Keep the backward compatibility by still providing the filepattern filter and the global of.overlay.filepattern variable but notice the user that the usage of those are deprecated. No functional change. Signed-off-by: Marco Felsch --- drivers/of/over

[PATCH 2/8] FIT: skip possible overlay config nodes

2024-03-22 Thread Marco Felsch
ip all config nodes matching the pattern from global.of.overlay.fitconfigpattern. Signed-off-by: Marco Felsch --- common/image-fit.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/common/image-fit.c b/common/image-fit.c index b16752de05bc..bf

[PATCH 1/8] of: overlay: add of.overlay.fitconfigpattern param

2024-03-22 Thread Marco Felsch
Add the a parameter which will be used by image-fit to decide if a config node belongs to a devicetree-overlay. Signed-off-by: Marco Felsch --- drivers/of/overlay.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index 2d2367fc101b

[PATCH 4/8] of: overlay: make search dir/path more generic

2024-03-22 Thread Marco Felsch
the directory handling into a separate of_overlay_global_fixup_dir() helper. No functional change. Signed-off-by: Marco Felsch --- drivers/of/overlay.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index

[PATCH 2/5] nvmem: expose nvmem cells as cdev

2024-03-22 Thread Marco Felsch
Expose the nvmem cells via cdevs which is our equivalent to the Linux sysfs exposure. This allows the easier user queries for board code and shell. Keep the Linux function name scheme for nvmem_populate_sysfs_cells() to reduce the diff for nvmem_register() function. Signed-off-by: Marco Felsch

[PATCH 5/5] eeprom: at24: fix device name handling

2024-03-22 Thread Marco Felsch
to not add an additional id. Furthermore the devname can be static since the name gets later allocated by the dev_set_name(). Fix these three issues by just using the alias or the static "eeprom" sting and supply the correct NVMEM_DEVID_NONE or NVMEM_DEVID_AUTO to the core. Signed-off

[PATCH 1/5] nvmem: sync with linux code base

2024-03-22 Thread Marco Felsch
of_nvmem_cell_get() - The registered cells are now tracked per nvmem device, no longer in a global nvmem_cells list This prepares our code base also to include the new nvmem-layout drivers and to expose cells via cdevs. Signed-off-by: Marco Felsch --- Hi Sascha, I know this patch is large

[PATCH 4/5] nvmem: allow single and dynamic device ids

2024-03-22 Thread Marco Felsch
() by using the dev_name() which honors the DEVICE_ID_* cases else we end up with different names for the devfs and the device itself. Signed-off-by: Marco Felsch --- drivers/nvmem/core.c | 16 +++- include/linux/nvmem-provider.h | 4 2 files changed, 15 insertions(+), 5

[PATCH 3/5] nvmem: constify the write path

2024-03-22 Thread Marco Felsch
Constify the nvmem_*_write() functions as the write functions shouldn't alter the buffer content. Signed-off-by: Marco Felsch --- drivers/nvmem/core.c | 10 +- include/linux/nvmem-consumer.h | 8 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers

Re: [PATCH 4/4] bootm: add global.bootm.provide_hostname option

2024-03-20 Thread Marco Felsch
Hi Ahmad, On 24-03-14, Ahmad Fatoum wrote: > Hello Marco, > > Cc += Leonard > > On 13.03.24 20:45, Marco Felsch wrote: > > + if (!barebox_hostname_is_valid(hostname)) { > > + pr_err("Provided hostname is not compatible to syst

[PATCH] console: make console_set_stdoutpath public

2024-03-19 Thread Marco Felsch
This can be an very useful helper for boards to setup the linux console boot param. Signed-off-by: Marco Felsch --- common/console.c | 2 +- include/console.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/common/console.c b/common/console.c index 03b76b122b2b

[PATCH 2/4] boot: add helper to set default boot source from board file

2024-03-13 Thread Marco Felsch
Add a helper which can be called from board files to setup the "boot.default" parameter to be independent of the initcall level. Signed-off-by: Marco Felsch --- common/boot.c | 9 - include/boot.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/commo

[PATCH 4/4] common: barebox_banner: fix missing newline

2024-03-13 Thread Marco Felsch
Albeit the banner is shown correctly due to following printf(), the dmesg() output isn't. This cause the next log buffer print printed on the same line as the "Buildsystem version:" print. Fix this by adding a newline afterwards. Signed-off-by: Marco Felsch --- common/version.c | 2

[PATCH 3/4] startup: fix autoboot_state in case of abort

2024-03-13 Thread Marco Felsch
Currently do_autoboot_countdown() always returns AUTOBOOT_BOOT if no interactive console was found which is wrong if global_autoboot_state was set to AUTOBOOT_ABORT. Fix this by checking the global_autoboot_state as well. Signed-off-by: Marco Felsch --- common/startup.c | 3 ++- 1 file changed

[PATCH 1/4] fastboot: add support to set fastboot_bbu from board code

2024-03-13 Thread Marco Felsch
Add a helper to set the fastboot_bbu variable to be independent of the initlevel. Signed-off-by: Marco Felsch --- common/fastboot.c | 5 + include/fastboot.h | 5 + 2 files changed, 10 insertions(+) diff --git a/common/fastboot.c b/common/fastboot.c index 261283d50a3a..da55e9c2577f

[PATCH 3/4] common: hostname: validate the provided hostname

2024-03-13 Thread Marco Felsch
Port the systemd hostname_is_valid() function to perform hostname validation and inform the user about a invalid hostname. Signed-off-by: Marco Felsch --- common/misc.c | 66 +++ 1 file changed, 66 insertions(+) diff --git a/common/misc.c b

[PATCH 1/4] string: add isempty helper

2024-03-13 Thread Marco Felsch
This adds systemd's isempty() helper which can be very handy. Signed-off-by: Marco Felsch --- include/string.h | 2 ++ lib/string.c | 6 ++ 2 files changed, 8 insertions(+) diff --git a/include/string.h b/include/string.h index 43911b75762f..ffe7c42d3093 100644 --- a/include/string.h

[PATCH 4/4] bootm: add global.bootm.provide_hostname option

2024-03-13 Thread Marco Felsch
. Signed-off-by: Marco Felsch --- common/bootm.c | 25 + common/misc.c| 2 +- include/bootm.h | 5 + include/common.h | 1 + 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/common/bootm.c b/common/bootm.c index 29ea13e28cb8..17d273831558 100644

[PATCH 2/4] common: env: make use of isempty()

2024-03-13 Thread Marco Felsch
Start making use of the new isempty() helper. No functional change. Signed-off-by: Marco Felsch --- common/env.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common/env.c b/common/env.c index d673b061ab7a..3ffde8bbd1dc 100644 --- a/common/env.c +++ b/common

Re: [PATCH master] optee: don't warn about missing OP-TEE header

2024-02-29 Thread Marco Felsch
On 24-02-29, Ahmad Fatoum wrote: > On 29.02.24 10:33, Marco Felsch wrote: > > On 24-02-29, Ahmad Fatoum wrote: > >> hdr is a valid pointer for me, but it doesn't point at a header, which > >> causes > >> me to get an error message. > > > > Ye

Re: [PATCH master] optee: check optee_verify_header argument for error pointers

2024-02-29 Thread Marco Felsch
On 24-02-29, Ahmad Fatoum wrote: > optee_verify_header is called at two places with > imx_scratch_get_optee_hdr() as argument, which returns an error pointer. > > Check against that to avoid crashing in error cases. > > Suggested-by: Marco Felsch > Signed-off-by: Ah

Re: [PATCH master] optee: don't warn about missing OP-TEE header

2024-02-29 Thread Marco Felsch
On 24-02-29, Ahmad Fatoum wrote: > On 29.02.24 10:10, Marco Felsch wrote: > > Hi Ahmad, > > > > On 24-02-28, Ahmad Fatoum wrote: > >> OP-TEE header is checked once in PBL, saved into scratch area after > >> verification and then checked again in barebox p

Re: [PATCH master] optee: don't warn about missing OP-TEE header

2024-02-29 Thread Marco Felsch
Hi Ahmad, On 24-02-28, Ahmad Fatoum wrote: > OP-TEE header is checked once in PBL, saved into scratch area after > verification and then checked again in barebox proper. > > The check in PBL fails silently, but the check in barebox proper that > should always follow, because the header isn't

Re: [PATCH 0/3] use environment partitions in GPT

2024-02-19 Thread Marco Felsch
e back from doing this earlier was that barebox > was not able to create an environment partition itself, so barebox > couldn't persist the environment on an unpartitioned device. Now with > parted support this has changed, so I think it's worth it to give it a > try now. > > Sascha LGTM,

Re: [PATCH 2/3] bootsource: add function to get device_node we booted from

2024-02-19 Thread Marco Felsch
On 24-02-19, Sascha Hauer wrote: > We have a relation between the bootsource and the corresponding > device_node. Add a function to get the device_node we booted from. > This is already open coded in of_fixup_bootargs_bootsource(), > use the newly created function for it. > > Signed-off-by:

Re: [PATCH master] i2c: don't return error pointers from of_find_i2c_adapter_by_node

2024-02-16 Thread Marco Felsch
> > Signed-off-by: Ahmad Fatoum Reviewed-by: Marco Felsch > --- > drivers/i2c/i2c.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/i2c/i2c.c b/drivers/i2c/i2c.c > index 70d1b810c1c3..1985ddfdc776 100644 > --- a/drivers/i2c/i2c.

Re: [PATCH 1/2] of: platform: return -EPROBE_DEFER when ensuring probe with driver missing

2024-02-16 Thread Marco Felsch
Hi Ahmad, On 24-02-16, Ahmad Fatoum wrote: > -ENODEV is a bad choice for an error code for of_device_ensure_probed. > > The function is either called from board code or from driver frameworks, > which usually just propagate the error code with unintended > consequences: > > - A board driver

Re: [PATCH 0/7] Detect partition changes at runtime

2024-02-15 Thread Marco Felsch
ion table changes, then barebox will continue with > the old partition table just like Linux does. Finally :) except my three comments fell free to add my: Reviewed-by: Marco Felsch

Re: [PATCH 4/7] block: reparse partition table when necessary

2024-02-15 Thread Marco Felsch
On 24-02-15, Sascha Hauer wrote: > Call reparse_partition_table() when the partition table may have > changed. We detect this by recording if the block device has been > written to in the area where the partition table is. > > Signed-off-by: Sascha Hauer > --- > common/block.c | 30

Re: [PATCH 7/7] fastboot: evaluate fastboot partitions when used

2024-02-15 Thread Marco Felsch
On 24-02-15, Sascha Hauer wrote: > So far we have evaluated the fastboot partition description during > initialization of the fastboot gadget. Let's make this more flexible > and parse it when actually needed. > This gives us the possibility to first write an image including a > partition table to

Re: [PATCH 3/7] partition: allow to reparse a partition table

2024-02-15 Thread Marco Felsch
On 24-02-15, Sascha Hauer wrote: > The partition table of a block device may change when it is written to. > Allow to reparse the partition table when this happens. > This is easy when none of the partitions is opened, in that case just > remove the old partitions and call parse_partition_table()

Re: [PATCH 0/6] implement i.MX93 AHAB secure boot

2024-02-15 Thread Marco Felsch
On 24-02-15, Sascha Hauer wrote: > On Wed, Feb 14, 2024 at 07:09:16PM +0100, Ahmad Fatoum wrote: > > Hello Sascha, > > > > On 13.02.24 16:17, Sascha Hauer wrote: > > > This adds support for AHAB based secure boot on i.MX93. The user > > > interface is integrated into the existing hab command used

Re: [PATCH] decompress: change length arguments to long

2024-02-06 Thread Marco Felsch
On 24-02-06, Sascha Hauer wrote: > On Tue, Feb 06, 2024 at 12:16:28PM +0100, Marco Felsch wrote: > > On 24-02-06, Sascha Hauer wrote: > > > In order to support decompression of files > 2GiB Linux has changed > > > the prototypes of decompression functions from > &

Re: [PATCH] decompress: change length arguments to long

2024-02-06 Thread Marco Felsch
On 24-02-06, Sascha Hauer wrote: > In order to support decompression of files > 2GiB Linux has changed > the prototypes of decompression functions from > > int uncompress(unsigned char *inbuf, int len, > int(*fill)(void*, unsigned int), > int(*flush)(void*, unsigned

Re: [PATCH] ARM: i.MX: add Kconfig option for scratchmem

2024-02-05 Thread Marco Felsch
On 24-02-05, Sascha Hauer wrote: > scratch.c is needed for both i.MX8 and i.MX9, but is compiled only for > i.MX8, so linking will failed if only i.MX9 is enabled. > Add a Kconfig option for it and select it from both i.MX8 and i.MX9. > > Signed-off-by: Sascha Hauer Reviewed-b

Re: [PATCH v2 5/8] common: add TQ EEPROM support

2024-02-05 Thread Marco Felsch
Hi Sascha, On 24-02-05, Sascha Hauer wrote: > Many TQ boards have an EEPROM with useful board information equipped. > Add support for reading this EEPROM. The code is based on the > corresponding U-Boot code from the TQ downstream U-Boot. > > Right now not much of this information is actually

[PATCH] fixup! bootm: add support to boot ZSTD compressed images

2024-02-01 Thread Marco Felsch
--- lib/decompress_unzstd.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/decompress_unzstd.c b/lib/decompress_unzstd.c index 42166c21e255..ba8013da7af9 100644 --- a/lib/decompress_unzstd.c +++ b/lib/decompress_unzstd.c @@ -138,11 +138,11 @@ static int INIT

[PATCH v3 2/2] ARM: i.MX8M: convert the machine init to the soc driver

2024-01-25 Thread Marco Felsch
: string) | revision: 1.0 (type: string) | serial_number: 15182A09DAB5B3C9 (type: string) | soc_id: i.MX8MM (type: string) Signed-off-by: Marco Felsch --- Changelog: v3: - rebased on current master v2: - make use of xasprintf() - check of_compatible early and return no error

[PATCH v3 1/2] Port SoC framework from Linux

2024-01-25 Thread Marco Felsch
required SoC information and provide a standard interface to query the data via device params. Signed-off-by: Marco Felsch --- Changelog: v3: - rebased on current master v2: - nothing drivers/base/Kconfig| 3 + drivers/base/Makefile | 1 + drivers/base/soc.c | 123

Re: [PATCH 3/3] uncompress: add detected file type debug print

2024-01-24 Thread Marco Felsch
On 24-01-24, Marco Felsch wrote: > On 24-01-24, Ahmad Fatoum wrote: > > On 24.01.24 14:47, Marco Felsch wrote: > > > This can be useful for developers. > > > > > > Signed-off-by: Marco Felsch > > > --- > > > lib/uncompress.c | 2 ++ > >

Re: [PATCH 3/3] uncompress: add detected file type debug print

2024-01-24 Thread Marco Felsch
On 24-01-24, Ahmad Fatoum wrote: > On 24.01.24 14:47, Marco Felsch wrote: > > This can be useful for developers. > > > > Signed-off-by: Marco Felsch > > --- > > lib/uncompress.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --

[PATCH 0/3] Add bootm ZSTD support

2024-01-24 Thread Marco Felsch
Hi, this small series of patches finally enables barebox to boot zstd compressed kernels. Regards, Marco Marco Felsch (3): filetype: add zstd support bootm: add support to boot ZSTD compressed images uncompress: add detected file type debug print common/bootm.c

[PATCH 2/3] bootm: add support to boot ZSTD compressed images

2024-01-24 Thread Marco Felsch
This adds the support to bootm to decompress and boot ZSTD compressed kernels. The decompress_unzstd.c was taken from Linux and slighlty adapted. Also the unzstd() function is adapted since we don't support large >2G images yet like Linux does. Signed-off-by: Marco Felsch --- common/boot

[PATCH 3/3] uncompress: add detected file type debug print

2024-01-24 Thread Marco Felsch
This can be useful for developers. Signed-off-by: Marco Felsch --- lib/uncompress.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/uncompress.c b/lib/uncompress.c index e7a3ffde823e..48e8173501c6 100644 --- a/lib/uncompress.c +++ b/lib/uncompress.c @@ -97,6 +97,8 @@ int uncompress

[PATCH 1/3] filetype: add zstd support

2024-01-24 Thread Marco Felsch
Add support to detect ZSTD compressed files. Signed-off-by: Marco Felsch --- common/filetype.c | 4 include/filetype.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/common/filetype.c b/common/filetype.c index 14948db4469f..7f1ce20d0094 100644 --- a/common/filetype.c +++ b/common

Re: [PATCH] Documentation: usb: document bbu fastboot partition name

2024-01-23 Thread Marco Felsch
On 24-01-23, Bastian Krause wrote: > After looking this up the nth time in the code base, it's really time to > document this. :) > Signed-off-by: Bastian Krause Reviewed-by: Marco Felsch > --- > Documentation/user/usb.rst | 3 ++- > 1 file changed, 2 insertions(+), 1 del

Re: [PATCH] ddr: imx8m: add missing DDR clock rates

2024-01-23 Thread Marco Felsch
On 24-01-23, Ahmad Fatoum wrote: > On 23.01.24 11:04, Marco Felsch wrote: > > On 24-01-22, Ahmad Fatoum wrote: > >> ddrphy_init_set_dfi_clk() is called to translate a scalar clock rate > >> as specified by board code into PLL parameters, which are configured. > &

Re: [PATCH] ddr: imx8m: add missing DDR clock rates

2024-01-23 Thread Marco Felsch
of them, except for 2600 and > 2376 MHz, rendering these two rates unusable. > > Fix this by adding support for them into ddrphy_init_set_dfi_clk. Do we need to support this in TF-A as well for dvfs? > Signed-off-by: Ahmad Fatoum The barebox change itself lgtm, therefore:

Re: [PATCH] ARM: dts: i.MX8MP: fix Debix environment partition unit address mismatch

2024-01-21 Thread Marco Felsch
On 24-01-19, Ahmad Fatoum wrote: > The environment partitions start at address 0x10, but the unit > address indicated otherwise. As the reg is what matters, align the unit > address to follow suit. > > Signed-off-by: Ahmad Fatoum Reviewed-by: Marco Felsch

Re: [PATCH 6/7] ARM: i.MX93: add scratch space support

2024-01-19 Thread Marco Felsch
On 24-01-19, Sascha Hauer wrote: > With upcoming i.MX93 OP-TEE support we'll need to transport the OP-TEE > base address from PBL to barebox proper. Add scratch space support for > i.MX93 to accommodate this. > > Signed-off-by: Sascha Hauer Reviewed-by: Marco Felsch > --- &g

Re: [PATCH 5/7] ARM: i.MX: export imx9_ddrc_sdram_size()

2024-01-19 Thread Marco Felsch
On 24-01-19, Sascha Hauer wrote: > imx9_ddrc_sdram_size() will be needed by upcoming i.MX93 scratch space > support, so export it. > > Signed-off-by: Sascha Hauer Reviewed-by: Marco Felsch > --- > arch/arm/mach-imx/esdctl.c | 7 --- > include/mach/imx/esdctl.h | 1

Re: [PATCH 4/7] ARM: i.MX93: add imx93_barebox_entry()

2024-01-19 Thread Marco Felsch
On 24-01-19, Sascha Hauer wrote: > We already have support for detecting the DDR size automatically on > i.MX93. Create imx93_barebox_entry() from it and use it instead of > the hardcoded DDR size in the tqmba9xxxca board. > > Signed-off-by: Sascha Hauer > --- >

Re: [PATCH 3/7] firmware: i.MX OP-TEE: Add some Kconfig help

2024-01-19 Thread Marco Felsch
On 24-01-19, Sascha Hauer wrote: > By enabling FIRMWARE_IMX8M*_OPTEE barebox will load and start OP-TEE > via the TF-A. Add some help text which explains where the OP-TEE > binaries are expected during barebox build. > > Signed-off-by: Sascha Hauer Reviewed-by: Marco Felsch &g

Re: [PATCH 2/7] firmware: add missing include

2024-01-19 Thread Marco Felsch
On 24-01-19, Sascha Hauer wrote: > include/firmware.h uses _text and as such needs asm/sections.h. Add the > missing include. > > Signed-off-by: Sascha Hauer Reviewed-by: Marco Felsch > --- > include/firmware.h | 1 + > 1 file changed, 1 insertion(+) > > diff -

Re: [PATCH 1/7] firmware: add missing FIRMWARE_IMX8MQ_OPTEE symbol

2024-01-19 Thread Marco Felsch
On 24-01-19, Sascha Hauer wrote: > CONFIG_FIRMWARE_IMX8MQ_OPTEE is used but not defined in Kconfig. Add the > missing symbol like existing for the other i.MX8M variants. > > Signed-off-by: Sascha Hauer Reviewed-by: Marco Felsch > --- > firmware/Kconfig | 4 &g

[PATCH master] ARM: i.MX8MM bootsource: fix serial detection for QSPI boot source

2024-01-19 Thread Marco Felsch
Signed-off-by: Marco Felsch --- arch/arm/mach-imx/boot.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-imx/boot.c b/arch/arm/mach-imx/boot.c index c6134f35b659..153da835606c 100644 --- a/arch/arm/mach-imx/boot.c +++ b/arch/arm/mach-imx/boot.c @@ -711,

Re: [PATCH v2 00/18] Dynamic OP-TEE Loading

2024-01-19 Thread Marco Felsch
On 24-01-19, Sascha Hauer wrote: > On Fri, Jan 19, 2024 at 09:02:15AM +0100, Sascha Hauer wrote: > > > > On Tue, 16 Jan 2024 18:07:20 +0100, Marco Felsch wrote: > > > by this series it is supported to load OP-TEE to random DRAM locations. > > > The location is par

Re: [PATCH v2 18/18] ARM: i.MX8M: fix optee of-fixup logic

2024-01-18 Thread Marco Felsch
On 24-01-18, Sascha Hauer wrote: > On Tue, Jan 16, 2024 at 06:07:38PM +0100, Marco Felsch wrote: > > The current code checks only if "/firmware/optee" exist on the builtin > > dtb and applys the fixup if not found and if found nothing is done. If a > > builtin dts co

Re: [PATCH v2 12/18] ARM64: mmu: add dynamic optee memory mapping support

2024-01-18 Thread Marco Felsch
On 24-01-17, Sascha Hauer wrote: > On Tue, Jan 16, 2024 at 06:07:32PM +0100, Marco Felsch wrote: > > Use the dynamic optee memory base address for the early mapping if > > possible and fallback to the static mapping if the query failed. > > > > Signed-off-by: Marco Fe

Re: [PATCH v2 02/18] ARM: i.MX8M: bundle imx-scratch code

2024-01-18 Thread Marco Felsch
On 24-01-17, Sascha Hauer wrote: > On Tue, Jan 16, 2024 at 06:07:22PM +0100, Marco Felsch wrote: > > The scatch code spread over the code base which is ok as long as we use > > it for the bootrom-log only. > > > > This commit bundles the scratch code into a o

Re: [PATCH v2 05/18] ARM: i.MX8M: scratch: add optee_hdr area

2024-01-18 Thread Marco Felsch
On 24-01-17, Sascha Hauer wrote: > On Tue, Jan 16, 2024 at 06:07:25PM +0100, Marco Felsch wrote: > > Add a new scratch storage slot for possible optee-hdr information which > > have to passed between barebox-pbl and barebox-proper. Reserve 512 bytes > > between the bootrom-

Re: [PATCH] firmware: fix missing firmware handling for external firmware

2024-01-17 Thread Marco Felsch
Hi Sascha, sry. for the delayed answer. On 24-01-17, Sascha Hauer wrote: > On Tue, Jan 16, 2024 at 03:44:16PM +0100, Sascha Hauer wrote: > > Hi Marco, > > > > On Wed, Jan 10, 2024 at 03:59:08PM +0100, Marco Felsch wrote: > > > Currently we depend on the extern

[PATCH] fixup! pbl: add COMPILE_TEST prompt for PBL_VERIFY_PIGGY

2024-01-16 Thread Marco Felsch
--- - remove the trailing whitespace pbl/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pbl/Kconfig b/pbl/Kconfig index f94791ff8a49..223bf0640e1b 100644 --- a/pbl/Kconfig +++ b/pbl/Kconfig @@ -48,7 +48,7 @@ config PBL_RELOCATABLE config PBL_VERIFY_PIGGY

[PATCH v2 2/2] ARM: i.MX8M: convert the machine init to the soc driver

2024-01-16 Thread Marco Felsch
: string) | revision: 1.0 (type: string) | serial_number: 15182A09DAB5B3C9 (type: string) | soc_id: i.MX8MM (type: string) Signed-off-by: Marco Felsch --- Changelog: v2: - make use of xasprintf() - check of_compatible early and return no error if it does not match arch/arm/mach-imx

[PATCH v2 1/2] Port SoC framework from Linux

2024-01-16 Thread Marco Felsch
required SoC information and provide a standard interface to query the data via device params. Signed-off-by: Marco Felsch --- Changelog: v2: - nothing drivers/base/Kconfig| 3 + drivers/base/Makefile | 1 + drivers/base/soc.c | 123 include

[PATCH v2 18/18] ARM: i.MX8M: fix optee of-fixup logic

2024-01-16 Thread Marco Felsch
ory region nodes but the barebox builtin dts don't we do add additional reserved memory nodes which may conflict due to different name scheme: vs. @. Move the "/firmware/optee" check into the of_optee_fixup() so the check is done on the correct dtb root nodes. Signed-off-by: Marco Felsch

[PATCH v2 16/18] ARM: i.MX8M: allow board code to configure the bl33 loadaddr

2024-01-16 Thread Marco Felsch
and barebox afterwards e.g. if multiple DRAM setups are required for the platform/som-family. A nice side effect of this change is to bundle the usage of MX8M*_ATF_BL33_BASE_ADDR at a single place. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/atf.c| 42

[PATCH v2 17/18] ARM: i.MX8M: cleanup MX8M*_ATF_BL33_BASE_ADDR defines

2024-01-16 Thread Marco Felsch
Instead of having three defines for the same just use the base definition which is MX8M_ATF_BL33_BASE_ADDR and drop the others. Signed-off-by: Marco Felsch --- Documentation/boards/imx/zii-imx8mq-dev/openocd.cfg | 10 +- arch/arm/boards/phytec-som-imx8mq/lowlevel.c| 2 +- arch

[PATCH v2 15/18] ARM: i.MX8M: atf: add support for optee hdr parsing

2024-01-16 Thread Marco Felsch
The OP-TEE binary can contain a header with useful information like loadaddr and size. This commit adds the support to take the header loadaddr into account. If the header is not found the common builtin loadaddr is used. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/atf.c | 27

[PATCH v2 12/18] ARM64: mmu: add dynamic optee memory mapping support

2024-01-16 Thread Marco Felsch
Use the dynamic optee memory base address for the early mapping if possible and fallback to the static mapping if the query failed. Signed-off-by: Marco Felsch --- arch/arm/cpu/mmu_64.c | 14 -- arch/arm/mach-imx/esdctl.c | 4 common/Makefile| 2 +- 3 files

[PATCH v2 13/18] ARM: i.MX8M: add dynamic optee memory of-fixup support

2024-01-16 Thread Marco Felsch
Try to set the dynamic optee memory base address if the builtin optee binary had an header. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/imx8m.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mach-imx/imx8m.c b/arch/arm/mach-imx/imx8m.c index ca50eec63622..6db16f024148

[PATCH v2 10/18] optee: add helper functions to set/get the optee memory base

2024-01-16 Thread Marco Felsch
Provide helper functions to set/get the optee memory base address gathered previously from the builtin optee binary header. Signed-off-by: Marco Felsch --- common/optee.c | 27 +++ include/tee/optee.h | 18 ++ 2 files changed, 45 insertions(+) diff

[PATCH v2 11/18] optee: optee_verify_header: constify optee_header

2024-01-16 Thread Marco Felsch
Signed-off-by: Marco Felsch --- common/optee.c | 2 +- include/tee/optee.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/optee.c b/common/optee.c index 2ae28b172bbb..34667f1f51e0 100644 --- a/common/optee.c +++ b/common/optee.c @@ -8,7 +8,7 @@ static u64

[PATCH v2 14/18] drivers: tee: optee: add support for dynamic optee memory base address

2024-01-16 Thread Marco Felsch
Make use of the platform provided optee memory base address. Fallback to the current behaviour if the platform doesn't provide the optee memory base. Signed-off-by: Marco Felsch --- drivers/tee/optee/of_fixup.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff

[PATCH v2 06/18] common: limit BOOTM_OPTEE to 32bit systems

2024-01-16 Thread Marco Felsch
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 --- common/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/Kconfig b/common/Kconfig index 02f376c59757..c38cfaed0e9f 100644

[PATCH v2 05/18] ARM: i.MX8M: scratch: add optee_hdr area

2024-01-16 Thread Marco Felsch
Add a new scratch storage slot for possible optee-hdr information which have to passed between barebox-pbl and barebox-proper. Reserve 512 bytes between the bootrom-log and the optee-hdr in case the bootrom-log need more space in the future. Signed-off-by: Marco Felsch --- arch/arm/mach-imx

[PATCH v2 08/18] optee: add support to verify 64-bit headers as well

2024-01-16 Thread Marco Felsch
From: Rouven Czerwinski Guard the check by IS_ENABLED() to make it possible to verify 32-bit and 64-bit optee headers. Signed-off-by: Rouven Czerwinski Signed-off-by: Marco Felsch --- common/optee.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/common/optee.c

[PATCH v2 07/18] common: add OPTEE_SHM_SIZE to configure optee shared memory

2024-01-16 Thread Marco Felsch
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 --- arch/arm/mach-imx/imx8m.c | 3

[PATCH v2 04/18] ARM: i.MX8M: romapi: refactor saving the bootrom log

2024-01-16 Thread Marco Felsch
Saving the bootrom log to the scratch area was the last open coded part. Move the code to the scratch module to make the scratch handling completely opaque. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/atf.c | 12 arch/arm/mach-imx/romapi.c | 6 ++ arch/arm/mach-imx

[PATCH v2 02/18] ARM: i.MX8M: bundle imx-scratch code

2024-01-16 Thread Marco Felsch
The scatch code spread over the code base which is ok as long as we use it for the bootrom-log only. This commit bundles the scratch code into a own module to make it easier to adapt later on and to make the scratch space independent of CONFIG_ARCH_IMX_ROMAPI. Signed-off-by: Marco Felsch

[PATCH v2 03/18] ARM: i.MX8M: scratch: make imx_scratch_space private

2024-01-16 Thread Marco Felsch
Make the scratch layout opaque and provide required accessor functions to make it easier to extent it later on. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/romapi.c | 6 ++ arch/arm/mach-imx/scratch.c | 12 +++- include/mach/imx/scratch.h | 6 ++ 3 files changed, 15

[PATCH v2 00/18] Dynamic OP-TEE Loading

2024-01-16 Thread Marco Felsch
on origin/next (c324e9ea7f8808ae069cd8bd0aa53021c1239bd2). Regards, Marco Marco Felsch (17): ARM: i.MX8M: atf: make use of imx8m*_save_bootrom_log macros ARM: i.MX8M: bundle imx-scratch code ARM: i.MX8M: scratch: make imx_scratch_space private ARM: i.MX8M: romapi: refactor saving

  1   2   3   4   5   6   7   8   >