[PATCH 1/1] tpm: fixed the nv_define_space command in TPMv2

2025-02-13 Thread Michel Alex
Added 2 HMAC bytes to the command message Signed-off-by: Alex Michel --- lib/tpm-v2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/tpm-v2.c b/lib/tpm-v2.c index 9ca7933c094..4a082af78af 100644 --- a/lib/tpm-v2.c +++ b/lib/tpm-v2.c @@ -264,7 +264,7 @@ u32

Re: [PATCH 2/5] rockchip: Improve ARMv7 support for ROCKCHIP_COMMON_STACK_ADDR

2025-02-05 Thread Alex Bee
Hi Jonas, Hi Alex, On 2025-01-27 19:59, Alex Bee wrote: Hi Jonas, thanks for working on this.  Please see one comment below. Am 27.01.25 um 00:48 schrieb Jonas Karlman: A few Rockchip ARMv7 SoCs use 0x6000 as DRAM base address instead of the more common 0x0 DRAM base address used on

Re: [PATCH 2/5] rockchip: Improve ARMv7 support for ROCKCHIP_COMMON_STACK_ADDR

2025-01-27 Thread Alex Bee
ROCKCHIP_RK3128 || ROCKCHIP_RK3188 || \ I'm not sure if adding RK3036 and RK3188 is correct at this point. Both use SPL (without TPL) currently for DRAM initialization and thus need their CFG_IRAM_BASE as SPL_TEXT_BASE. Regards, Alex + ROCKCHIP_RK322X || ROCKCHIP

Re: Simon Glass's future with Das U-Boot project?

2025-01-10 Thread Alex Kiernan
n't want to pay attention to out of tree patches. > > Simon randomly responds to emails 'applied to sjg1/master' or something > > along those lines, which further complicates things as people might think > > their code got merged. > > > > Me too. I do

Re: [PATCH v5] rockchip: board: Increase rng-seed size to make it sufficient for modern Linux

2024-10-16 Thread Alex Shumsky
On Wed, Oct 16, 2024 at 4:22 AM Dragan Simic wrote: > > Hello Alex, > > Thanks for the v5. Please see a few comments below. > > On 2024-10-15 23:28, Alex Shumsky wrote: > > Increase rng-seed size to make Linux happy and initialize rng pool > > instantly. > &

[PATCH v6] rockchip: board: Increase rng-seed size to make it sufficient for modern Linux

2024-10-16 Thread Alex Shumsky
/git/torvalds/linux.git/tree/drivers/char/random.c?h=v5.19#n551 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/char/random.c?h=v5.18#n236 Signed-off-by: Alex Shumsky Fixes: d2048bafae40 ("rockchip: board: Add board_rng_seed() for all Rockchip devices") R

[PATCH v5] rockchip: board: Increase rng-seed size to make it sufficient for modern Linux

2024-10-15 Thread Alex Shumsky
/git/torvalds/linux.git/tree/drivers/char/random.c?h=v5.19#n551 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/char/random.c?h=v5.18#n236 Signed-off-by: Alex Shumsky Fixes: d2048bafae40 ("rockchip: board: Add board_rng_seed() for all Rockchip devices") R

[PATCH] i2c: i2c-gpio: add support for i2c-gpio,sda-output-only

2024-10-15 Thread Alex Shumsky
Some I2C slave devices are read-only and don't even answer with NACK. For example FD65x segment LED controllers. Make them usable with i2c-gpio,sda-output-only that are already supported by Linux 6.3+. Signed-off-by: Alex Shumsky --- doc/device-tree-bindings/i2c/i2c-gpio.txt | 2 ++ dr

Re: [PATCH v4] rockchip: board: Increase rng-seed size to make it sufficient for modern Linux

2024-10-15 Thread Alex Shumsky
On Tue, Oct 15, 2024 at 12:34 PM Quentin Schulz wrote: > I'm wondering if we have somewhere some documentation on the environment > variables that exist and what they used for because this would be a nice > addition. At the very least, we can mention this variable in: > - include/fdt_support.h for

[PATCH v4] rockchip: board: Increase rng-seed size to make it sufficient for modern Linux

2024-10-14 Thread Alex Shumsky
/git/torvalds/linux.git/tree/drivers/char/random.c?h=v5.19#n551 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/char/random.c?h=v5.18#n236 Signed-off-by: Alex Shumsky Fixes: d2048bafae40 ("rockchip: board: Add board_rng_seed() for all Rockchip devices") R

[PATCH v3] rockchip: board: Increase rng-seed size to make it sufficient for modern Linux

2024-10-14 Thread Alex Shumsky
/7234e2ea0edd00bfb6bb2159e55878c19885ce68/drivers/char/random.c#L632 https://elixir.bootlin.com/linux/v5.18/source/drivers/char/random.c#L236 https://elixir.bootlin.com/linux/v5.19/source/drivers/char/random.c#L551 Signed-off-by: Alex Shumsky Fixes: d2048bafae40 ("rockchip: board: Add board_rng

Re: [PATCH v2] rockchip: board: Increase rng-seed size to make it sufficient for modern Linux

2024-10-14 Thread Alex ThreeD
On Mon, Oct 14, 2024 at 10:00 PM Dragan Simic wrote: > To sum up the replies from Marek, the lower limit should be 64. 64 by default, warning for custom values less than 32. Right? Since 32 bytes is sufficient for kernels released in the last 2 years.

Re: [PATCH v2] rockchip: board: Increase rng-seed size to make it sufficient for modern Linux

2024-10-14 Thread Alex ThreeD
On Mon, Oct 14, 2024 at 9:19 PM Dragan Simic wrote: > > + // rng_seed_size should be 32 bytes for Linux 5.19+, or 64 > > for older > > Linux'es > > Shouldn't it be 8 for older kernels? Looking into source code I would say Linux 5.17 requires 64 bytes to init crng. 8 bytes rng_seed sh

Re: [PATCH] rockchip: board: Increase rng-seed size to make it sufficient for modern Linux

2024-10-14 Thread Alex ThreeD
On Mon, Oct 14, 2024 at 1:34 PM Marek Vasut wrote: > > > Actually it seems that entropy required to init pool early has decreased in > > Linux 5.19 from 64 bytes (2 * CHACHA_KEY_SIZE) to 32 bytes > > (BLAKE2S_HASH_SIZE) > > A couple more random numbers would cover all the bases then. Oops, missed

[PATCH v2] rockchip: board: Increase rng-seed size to make it sufficient for modern Linux

2024-10-14 Thread Alex Shumsky
rng-seed: # dmesg | grep crng [0.00] random: crng init done https://github.com/torvalds/linux/blob/7234e2ea0edd00bfb6bb2159e55878c19885ce68/drivers/char/random.c#L632 Signed-off-by: Alex Shumsky Fixes: d2048bafae40 ("rockchip: board: Add board_rng_seed() for all Rockchip de

Re: [PATCH] rockchip: board: Increase rng-seed size to make it sufficient for modern Linux

2024-10-14 Thread Alex ThreeD
On Mon, Oct 14, 2024 at 12:10 AM Marek Vasut wrote: > Let's make this override-able via environment variable, because this > might be growing in the future again. Does this work ? > > size_t len = env_get_ulong("kaslrseed_size", 10, 32); Maybe `env_get_hex("rng_seed_size", 32)` would be better? A

[PATCH] rockchip: board: Increase rng-seed size to make it sufficient for modern Linux

2024-10-13 Thread Alex Shumsky
rng-seed: # dmesg | grep crng [0.00] random: crng init done https://github.com/torvalds/linux/blob/7234e2ea0edd00bfb6bb2159e55878c19885ce68/drivers/char/random.c#L632 Signed-off-by: Alex Shumsky Fixes: d2048ba ("rockchip: board: Add board_rng_seed() for all Rockchip de

Re: [PATCH v2] fs: btrfs: fix out of bounds write

2024-06-24 Thread Alex ThreeD
Hi all, Is there something on my side needed to push this forward? On Wed, Jun 19, 2024 at 12:41 AM Alex Shumsky wrote: > Fix btrfs_read/read_and_truncate_page write out of bounds of destination > buffer. Old behavior break bootstd malloc'd buffers of exact file size. > Previ

Re: [PATCH next 2/2] rockchip: remove support for Theobroma Systems RK3368 Lion

2024-06-20 Thread Alex Bee
Am 20.06.24 um 19:08 schrieb Tom Rini: On Thu, Jun 20, 2024 at 07:03:26PM +0200, Alex Bee wrote: Am 20.06.24 um 12:24 schrieb Quentin Schulz: From: Quentin Schulz No meaningful changes were made to this SoM since February 2021. Nobody from Theobroma has booted anything recent on that

Re: [PATCH next 2/2] rockchip: remove support for Theobroma Systems RK3368 Lion

2024-06-20 Thread Alex Bee
finally getting a OSS gpu driver [0]. I'm planning to add a board which uses TPL/SPL soonish (when my rare spare time allows). Alex [0] https://gitlab.freedesktop.org/frankbinns/linux-firmware/-/issues/1

[PATCH v2] fs: btrfs: fix out of bounds write

2024-06-18 Thread Alex Shumsky
Fix btrfs_read/read_and_truncate_page write out of bounds of destination buffer. Old behavior break bootstd malloc'd buffers of exact file size. Previously this OOB write have not been noticed because distroboot usually read files into huge static memory areas. Signed-off-by: Alex Shumsky

[PATCH] fs: btrfs: fix out of bounds write

2024-06-17 Thread Alex Shumsky
Fix btrfs_read/read_and_truncate_page write out of bounds of destination buffer. Old behavior break bootstd malloc'd buffers of exact file size. Previously this OOB write have not been noticed because distroboot usually read files into huge static memory areas. Signed-off-by: Alex Sh

Re: [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround

2024-05-22 Thread Alex Bee
Am 22.05.24 um 18:20 schrieb Jonas Karlman: On 2024-05-22 16:18, Alex Bee wrote: Am 13.05.24 um 01:22 schrieb Jonas Karlman: On 2024-05-13 00:34, Alex Bee wrote: Am 12.05.24 um 23:37 schrieb Jonas Karlman: Hi Alex, On 2024-05-12 21:49, Alex Bee wrote: Am 11.05.24 um 20:47 schrieb Jonas

Re: [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround

2024-05-22 Thread Alex Bee
Am 13.05.24 um 01:22 schrieb Jonas Karlman: On 2024-05-13 00:34, Alex Bee wrote: Am 12.05.24 um 23:37 schrieb Jonas Karlman: Hi Alex, On 2024-05-12 21:49, Alex Bee wrote: Am 11.05.24 um 20:47 schrieb Jonas Karlman: Hi Alex, On 2024-05-11 19:44, Alex Bee wrote: Hi Jonas, Am 11.05.24 um

Re: [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround

2024-05-12 Thread Alex Bee
Am 12.05.24 um 23:37 schrieb Jonas Karlman: Hi Alex, On 2024-05-12 21:49, Alex Bee wrote: Am 11.05.24 um 20:47 schrieb Jonas Karlman: Hi Alex, On 2024-05-11 19:44, Alex Bee wrote: Hi Jonas, Am 11.05.24 um 13:28 schrieb Jonas Karlman: This series add gpio request() and pinctrl

Re: [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround

2024-05-12 Thread Alex Bee
Am 11.05.24 um 20:47 schrieb Jonas Karlman: Hi Alex, On 2024-05-11 19:44, Alex Bee wrote: Hi Jonas, Am 11.05.24 um 13:28 schrieb Jonas Karlman: This series add gpio request() and pinctrl gpio_request_enable() ops so that a gpio requested pin automatically use gpio pinmux and U-Boot behaves

Re: [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround

2024-05-11 Thread Alex Bee
(not sure those if those SoCs already using OF_UPSTREAM) and leave the -u-boot.dtsi-"hack" alone for now. Alex With the gpio and pinctrl ops implemented this series also remove a PCIe reset-gpios related device lock-up workaround from board u-boot.dtsi. PX30, RK3066, RK3188, RK356

Re: [PATCH 08/14] fastboot: Remove dependencies on CMDLINE

2023-12-04 Thread Alex Kiernan
/* > * This only happens if image is somehow faulty so we start > -- Doesn't this change the logic? Previously if you didn't set fastboot_bootcmd you'd fall into the bootm path (if CONFIG_BOOTM was enabled), with this, if CONFIG_CMDLINE is enabled then you will never hit the bootm path. -- Alex Kiernan

[PATCH] timer-uclass: Always use "clock-frequency" property as fallback

2023-11-14 Thread Alex Bee
ed as 0. Signed-off-by: Alex Bee --- This is currently an issue for Rockchip RK3188 and potentially also for RK3368: The clock driver does not implement the request-op. Even if we would add it: timer-uclass always picks the first clock and the DT bindings for Rockchip timer requires us to place th

[PATCH v4] misc: i2c_eeprom: consider pagesize when writing to eeprom

2023-10-26 Thread Michel Alex
page and the page_offset + len is greater than the page boundary (pagesize), the write operation would overflow the current page and the behaviour can be undefined (e.g. at24). Signed-off-by: Alex Michel --- Changes for v2: - fixed deviations from checkpatch.pl - improved commit message Changes for

AW: [PATCH v2] misc: i2c_eeprom: consider pagesize when writing to eeprom

2023-10-26 Thread Michel Alex
Hi Tom, > We don't need to promote the types to unsigned here do we? You are right, I will provide a new version of my patch where I will change all "unsigned int" 's to int's. Alex

[PATCH v3] misc: i2c_eeprom: consider pagesize when writing to eeprom

2023-10-25 Thread Michel Alex
page and the page_offset + len is greater than the page boundary (pagesize), the write operation would overflow the current page and the behaviour can be undefined (e.g. at24). Signed-off-by: Alex Michel --- Changes for v2: - fixed deviations from checkpatch.pl - improved commit message Changes for

[PATCH v2] misc: i2c_eeprom: consider pagesize when writing to eeprom

2023-10-25 Thread Michel Alex
page and the page_offset + len is greater than the page boundary (pagesize), the write operation would overflow the current page and the behaviour can be undefined (e.g. at24). Signed-off-by: Alex Michel --- Changes for v2: - fixed deviations from checkpatch.pl - improved commit message

[PATCH] misc: i2c_eeprom: consider pagesize when writing to eeprom

2023-09-21 Thread Michel Alex
: Alex Michel --- drivers/misc/i2c_eeprom.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/misc/i2c_eeprom.c b/drivers/misc/i2c_eeprom.c index bdd7e018cc..f345e34179 100644 --- a/drivers/misc/i2c_eeprom.c +++ b/drivers/misc/i2c_eeprom.c @@ -60,6 +60,17

Re: [PATCH] x86: Update cbmem driver

2023-08-13 Thread Alex Sadovsky
t; + cons->body[pos] = data; While at it, is it OK to increment cons->cursor unconditionally, even when the buffer is full? It's better to do it after the check, isn't it? E.g.: if (cons->cursor < cons->size) cons->body[cons->cursor++] = data; Cheers, Alex.

Re: [PATCH v2 5/5] optee: Support Rockchip OP-TEE binaries

2023-07-20 Thread Alex Bee
Hi Kever, Am 19.07.23 um 09:28 schrieb Kever Yang: Hi Alex, On 2023/7/18 22:57, Alex Bee wrote: Currently the only ARM Rockchip SoC which is supported by upstream optee-os is RK322x. For all other ARM SoCs a vendor-provided OP-TEE binary has to be used to have a TEE available. Those are

[PATCH v2 5/5] optee: Support Rockchip OP-TEE binaries

2023-07-18 Thread Alex Bee
which signals that any of those vendor binaries is used and changes the calling convension accordingly. Signed-off-by: Alex Bee --- arch/arm/mach-rockchip/Kconfig | 8 common/spl/spl_optee.S | 4 2 files changed, 12 insertions(+) diff --git a/arch/arm/mach-rockchip/Kconfig

[PATCH v2 4/5] rockchip: evb_rk3229: Update/fix README

2023-07-18 Thread Alex Bee
This updates the evb_rk3229's README on howto create / use the FIT image created by binman. Also fix some wrong paths and update filenames which have changed in recent upstream optee-os versions. Signed-off-by: Alex Bee --- board/rockchip/evb_rk3229/README

[PATCH v2 3/5] rockchip: RK322x: Select SPL_OPTEE_IMAGE

2023-07-18 Thread Alex Bee
For RK322x series ARM SoCs the OP-TEE is non-optional, as besides the TEE it also provides the PSCI implementation, which is expected to be available by upstream linux. Select CONFIG_SPL_OPTEE_IMAGE if an FIT image is built. Signed-off-by: Alex Bee --- arch/arm/mach-rockchip/Kconfig | 1 + 1

[PATCH v2 2/5] configs: evb-rk3229: Increase SPL_STACK_R_MALLOC_SIMPLE_LEN

2023-07-18 Thread Alex Bee
value for CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN in order successfully unpack the FIT image. Signed-off-by: Alex Bee --- configs/evb-rk3229_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig index cf73afeded

[PATCH v2 1/5] rockchip: Support OP-TEE for ARM in FIT images created by binman

2023-07-18 Thread Alex Bee
binary is non-optional if CONFIG_SPL_OPTEE_IMAGE is selected and there will be an error if the file does not exist and/or `TEE=` build option is missing. Signed-off-by: Alex Bee --- arch/arm/dts/rk3288-u-boot.dtsi | 1 - arch/arm/dts/rockchip-optee.dtsi | 64 --- arch/arm/dts/

[PATCH v2 0/5] rockchip: Support OP-TEE binaries in ARM FIT images

2023-07-18 Thread Alex Bee
on SPL_OPTEE_IMAGE only, as the latter depends on SPL_FIT already (via `depends on SPL_LOAD_FIT || SPL_LOAD_FIT_FULL`) Alex Bee (5): rockchip: Support OP-TEE for ARM in FIT images created by binman configs: evb-rk3229: Increase SPL_STACK_R_MALLOC_SIMPLE_LEN rockchip: RK322x: Select SPL_

Re: [PATCH v1 4/5] rockchip: evb_rk3229: Update/fix README

2023-07-17 Thread Alex Bee
Hi Jerome, Am 17.07.23 um 15:42 schrieb Jerome Forissier: On 7/16/23 10:10, Alex Bee wrote: This updates the evb_rk3229's README on howto create / use the FIT image created by binman. Also fix some wrong paths and update filenames which have changed in recent upstream optee-os ver

[PATCH v1 5/5] optee: Support Rockchip OPTEE binaries

2023-07-16 Thread Alex Bee
which signals that any of those vendor binaries is used and changes the calling convension accordingly. Signed-off-by: Alex Bee --- arch/arm/mach-rockchip/Kconfig | 9 + common/spl/spl_optee.S | 4 2 files changed, 13 insertions(+) diff --git a/arch/arm/mach-rockchip

[PATCH v1 4/5] rockchip: evb_rk3229: Update/fix README

2023-07-16 Thread Alex Bee
This updates the evb_rk3229's README on howto create / use the FIT image created by binman. Also fix some wrong paths and update filenames which have changed in recent upstream optee-os versions. Signed-off-by: Alex Bee --- board/rockchip/evb_rk3229/README

[PATCH v1 3/5] rockchip: RK322x: select SPL_OPTEE_IMAGE

2023-07-16 Thread Alex Bee
For RK322x series ARM SoCs the OP-TEE is non-optional, as besides the TEE it also provides the PSCI implementation, which is expected to be available by upstream linux. Select CONFIG_SPL_OPTEE_IMAGE if an FIT image is built. Signed-off-by: Alex Bee --- arch/arm/mach-rockchip/Kconfig | 1 + 1

[PATCH v1 2/5] evb-rk3229_defconfig: Drop SPL_STACK_R_MALLOC_SIMPLE_LEN

2023-07-16 Thread Alex Bee
definition, so that the default defined will be used, in order to successfully boot that image. Signed-off-by: Alex Bee --- configs/evb-rk3229_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig index cf73afeded..b818d11b69 100644 --- a

[PATCH v1 1/5] rockchip: Support OP-TEE for ARM in FIT images created by binman

2023-07-16 Thread Alex Bee
binary is non-optional if CONFIG_SPL_OPTEE_IMAGE is selected and there will be an error if the file does not exist and/or `TEE=` build option is missing. Signed-off-by: Alex Bee --- arch/arm/dts/rk3288-u-boot.dtsi | 1 - arch/arm/dts/rockchip-optee.dtsi | 64 --- arch/arm/dts/

[PATCH v1 0/5] rockchip: Support OP-TEE binaries in ARM FIT images

2023-07-16 Thread Alex Bee
88 (vendor implementation only). [1] https://github.com/rockchip-linux/rkbin Alex Bee (5): rockchip: Support OP-TEE for ARM in FIT images created by binman evb-rk3229_defconfig: Drop SPL_STACK_R_MALLOC_SIMPLE_LEN rockchip: RK322x: select SPL_OPTEE_IMAGE rockchip: evb_rk3229: Update/fix READ

riscv64 regression

2023-01-04 Thread Alex
000fe6d:0xfe720fff] pc=0xc496 '/efibootbootriscv64.efi' My questions: * Is GCC 12.2 known broken / unreliable for riscv64 builds of u-boot? * Has anything else changed around memory management on riscv64 between May 2022 and Oct 2022 -- Alex

Re: [BISECTED] BeagleBone Black doesn't boot after a58147c2dbbf

2022-08-11 Thread Alex Kiernan
t; Some notes I have from a previous life which may be useful, but I'm afraid I've no way of checking these days: * CONFIG_DEBUG_UART=y * CONFIG_DEBUG_UART_BASE=0x44e09000 * CONFIG_DEBUG_UART_CLOCK=4800 * CONFIG_DEBUG_UART_OMAP=y * CONFIG_DEBUG_UART_SHIFT=2 * CONFIG_DEBUG_UART_BOARD_INIT=y * CONFIG_DEBUG_UART_ANNOUNCE=y -- Alex Kiernan

SiFive Unmatched (riscv64), hang scanning xhci_pci

2022-07-26 Thread Alex
Somewhere between e7fb67df319cec410c20906bbf33936a6f7479b2 and 86feeab3dc71977afb70f595e42060ce324086d0 u-boot stopped booting on the SiFive unmatched. gcc version 11.2.0 (GCC) GNU ld (GNU Binutils) 2.36.1 First boot... U-Boot SPL 2022.10-rc1-00159-g86feeab3dc (Jul 26 2022 - 17:01:52 -050

Error: unrecognized opcode on riscv64

2022-07-20 Thread Alex
x27; Any ideas on what's going on? Toolchain: riscv64-linux-gnu-gcc - gcc version 12.1.0 (GCC) riscv64-linux-gnu-as - GNU assembler (GNU Binutils) 2.36.1 Compiling on ArchLinux -- Alex

Re: [PATCH] efi_loader: Expose relocated address for gdb debugging purposes

2022-03-24 Thread Alex
March 24, 2022 1:25 PM, "Alexander von Gluck IV" wrote: > March 24, 2022 12:06 PM, "Heinrich Schuchardt" wrote: > >> On 3/24/22 17:22, Alexander von Gluck IV wrote: >> Do we really always need this output for every invokation of LoadImage()? >> >> Writing test messages during the runtime of a m

[RFC] Dumping load addresses - bootefi qemu gdb remote debugging

2022-03-24 Thread Alex
. "positioning image at address 0xfe6b" or something using the leveraged kernel_addr_r (0x8400) was not enough. -- Alex

riscv64 - SiFive Unmatched regression?

2022-03-17 Thread Alex
by u-boot. -- Alex

Re: [PATCH] image: Control FIT signature verification at runtime

2022-02-28 Thread Alex G.
ther the "required-policy" property at /signature or "required" property in individual key nodes. This might separate the logic out in a way that's acceptable to Alex. Let me poke at it. I've thought about this some more and adding support for `required-mode = &quo

Re: [PATCH] image: Control FIT signature verification at runtime

2022-02-12 Thread Alex G.
efined as macros, further depending on config selections. It makes many code parsers and IDEs poop their pantaloons. It makes u-boot harder to work with as a result. I suggest finding a way to turn this into a static inline. Alex

Re: [PATCH] tools: Do not build kwbimage if CONFIG_TOOLS_LIBCRYPTO=n

2022-01-11 Thread Alex G.
ate a bootable image. I see quite a few ARMv8 platforms throw such warnings on gitlab-ci. We can compile an elf, right? Any good reason why kwbimage should be different? Alex

Re: [PATCH] lib/rsa: avoid -Wdiscarded-qualifiers

2022-01-10 Thread Alex G.
err_get_pub_key; - rsa = EVP_PKEY_get0_RSA(pkey); + rsa = (RSA *)EVP_PKEY_get0_RSA(pkey); I think it's the wrong path to discard const qualifiers, whether unwillingly or by type punning. I suggest making 'rsa' a "const RSA *" and fixing the downstream use

Re: a question about falcon mode

2021-11-29 Thread Alex G.
On 11/26/21 4:36 PM, Abder wrote: Hi Alex, Just a quick remarque that intrigued me: Le jeu. 25 nov. 2021 à 15:57, Alex G. a écrit : On 11/25/21 1:07 AM, Chan Kim wrote: Hello all, I'm trying to implement falcon mode for our board. Then should I first implement the normal mod

Re: a question about falcon mode

2021-11-26 Thread Alex G.
On 11/26/21 1:53 AM, Chan Kim wrote: Hi Alex, Thanks for the reply. So I gather that to be able to use 'spl export fdt' to store the 'snapshot' to the storage I should make the spl program runnable at least to that stage. (being able to load kernel image, dtb, initrd and

Re: a question about falcon mode

2021-11-25 Thread Alex G.
option is to forget about "spl export" and "fdtargs", and package your kernel, devicetree, and overlays in a FIT container. You'd make sure to enable SPL_LOAD_FIT_APPLY_OVERLAY. There isn't much more to this other than the usual gotcha's with FIT and overlays. Alex

Re: [PATCH v2 2/5] ARM: dts: rockchip: update rk3xxx.dtsi

2021-11-04 Thread Alex Bee
again - at least for rk3188 and rk3399 (from what I've seen) and it is not fixable with an extra -u-boot.dtsi. Any idea (without having to define an extra config include/configs per board?) [1] https://github.com/u-boot/u-boot/commit/b212ad24a604b00b240add35516b7381965deb31 Alex Am 25.06.2

Re: [PATCH 05/16] arm: qemu: Add a devicetree file for qemu_arm64

2021-10-27 Thread Alex Bennée
600, Simon Glass wrote: > > Hi all, > > > > On Wed, 27 Oct 2021 at 08:56, Tom Rini wrote: > > > > > > On Wed, Oct 27, 2021 at 03:44:08PM +0100, Alex Bennée wrote: > > > > > > > > François Ozog writes: > > > > > > > &

Re: [PATCH 05/16] arm: qemu: Add a devicetree file for qemu_arm64

2021-10-27 Thread Alex Bennée
7;m not entirely clear what a qemu_arm and qemu_arm64 def targets are meant to be in this context. -- Alex Bennée

Re: [Query - 5 Mins] Information on U-BOOT FIT Malloc changes

2021-10-25 Thread Alex G.
On 10/25/21 6:55 PM, Spandan Mahadevegowda wrote: Hello Alexandru, I'm currently working on some POC on Pine64 that requires a Trusted Execution Environment. I was using U-Boot 2020.10 with SPL_FIT_GENERATOR and modified mksunxi_fit_atf.sh to accommodate OP-TEE. However, due to new changes in

Re: [PATCH v3 1/4] tools: Separate image types which depend on OpenSSL

2021-10-18 Thread Alex G.
n. If platforms can't build a usable image, I suggest just printing a loud warning instead of overriding the user. Alex --- Changes in v3: - Selected TOOLS_LIBCRYPTO on all platforms that use kwbimage (as best as I can tell, using the suggestions from Pali Rohár) Changes in v2: - Refa

Re: Broken build with disabling OpenSSL crypto

2021-10-18 Thread Alex G.
On 10/15/21 3:30 PM, Pali Rohár wrote: On Friday 15 October 2021 09:35:43 Alex G. wrote: On 10/15/21 6:34 AM, Pali Rohár wrote: On Wednesday 06 October 2021 17:05:24 Alex G. wrote: Hi Jernej, On 10/6/21 4:27 PM, Jernej Škrabec wrote: Hi everyone! Commit cb9faa6f98ae ("tools: Use a s

Re: Broken build with disabling OpenSSL crypto

2021-10-15 Thread Alex G.
On 10/15/21 6:34 AM, Pali Rohár wrote: On Wednesday 06 October 2021 17:05:24 Alex G. wrote: Hi Jernej, On 10/6/21 4:27 PM, Jernej Škrabec wrote: Hi everyone! Commit cb9faa6f98ae ("tools: Use a single target-independent config to enable OpenSSL") recently introduced option to disabl

Re: using device-tree fragments/overlays

2021-10-14 Thread Alex G.
ve to specify a "loadaddr=" for the overlays if you're loading the FIT from u-boot instead of SPL. AFAIR the u-boot FIT loader is defective in this regard. Alex APPENDIX A: Example FIT ITS /dts-v1/ ;/ { description = "Flu-boot image with overlay

Re: Broken build with disabling OpenSSL crypto

2021-10-11 Thread Alex G.
On 10/10/21 6:06 AM, Jernej Škrabec wrote: Dne četrtek, 07. oktober 2021 ob 00:05:24 CEST je Alex G. napisal(a): Can you please give the following diff a try, and if it works for you, submit as patch? This works, I'll submit it as a patch. Should I keep you as original author and add you

Re: [PATCH v5 02/29] kconfig: Add tools support to CONFIG_IS_ENABLED()

2021-10-07 Thread Alex G.
On 10/7/21 4:04 PM, Tom Rini wrote: On Thu, Oct 07, 2021 at 03:33:32PM -0500, Alex G. wrote: On 10/7/21 2:39 PM, Tom Rini wrote: On Thu, Oct 07, 2021 at 02:32:42PM -0500, Alex G. wrote: On 10/7/21 1:50 PM, Simon Glass wrote: Hi Tom, On Thu, 7 Oct 2021 at 12:30, Tom Rini wrote: On

Re: [PATCH v5 02/29] kconfig: Add tools support to CONFIG_IS_ENABLED()

2021-10-07 Thread Alex G.
On 10/7/21 2:39 PM, Tom Rini wrote: On Thu, Oct 07, 2021 at 02:32:42PM -0500, Alex G. wrote: On 10/7/21 1:50 PM, Simon Glass wrote: Hi Tom, On Thu, 7 Oct 2021 at 12:30, Tom Rini wrote: On Thu, Oct 07, 2021 at 12:02:24PM -0600, Simon Glass wrote: Hi Tom, On Thu, 7 Oct 2021 at 07:42

Re: [PATCH v5 02/29] kconfig: Add tools support to CONFIG_IS_ENABLED()

2021-10-07 Thread Alex G.
le to explain why it would be a hardship. That in turn, I think, is coming down to modern vs very old openssl support, rather than having any at all. OK I'll take a look at some point. Or perhaps Alex might like to? We just got a complain about OpenSSL yesterday [1] Alex [1] https://lists

Re: [Uboot-stm32] [PATCH v2 03/11] stm32mp1: Add support for falcon mode boot from SD card

2021-10-07 Thread Alex G.
On 10/4/21 9:57 AM, Patrick DELAUNAY wrote: Hi, => if OPTEE is loaded after SPL the U-Boot configuration change (running in secure world or not) I am starting to work on these issues in the branch https://github.com/u-boot/u-boot/compare/master...patrickdelaunay:spl_optee_W2140 https://g

Re: [PATCH 0/3] stm32mp: Attempt to resolve unintended breakage with v2021.10-rc2

2021-10-07 Thread Alex G.
TFORM=${OPTEE_PLATFORM} \ CFG_WITH_PAGER=n \ CFG_NS_ENTRY_ADDR=${KERNEL_UIMAGE_LOADADDRESS} \ CROSS_COMPILE=${HOST_PREFIX} \ CFG_TEE_CORE_DEBUG=y \ CFG_TEE_CORE_LOG_LEVEL=2 \ ${TZDRAM_FLAGS} \ " TZDRAM_FLAGS = "CFG_TZDRAM_START= 0xde00\ CFG_DRAM_SIZE=0x2000 " Alex

Re: Broken build with disabling OpenSSL crypto

2021-10-06 Thread Alex G.
en cross-compiling U-Boot inside LibreELEC build system. It's not needed for our case anyway. Best regards, Can you please give the following diff a try, and if it works for you, submit as patch? Alex diff --git a/tools/Makefile b/tools/Makefile index 4a86321f64..7f72ff9645 100644 --- a/t

Re: [PATCH] fit: display proper node on error

2021-10-06 Thread Alex G.
first signature- node. It seems counter-intuitive, as I would expect all signatures to be checked. In my mind, the 'break;' clause should only happen when fit_image_check_sig() returns an error. I have no idea why it happened on success. Simon, any thoughts? Alex

Re: [PATCH v5 15/29] image: Drop IMAGE_ENABLE_IGNORE

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: We can use the new host_build() function for this, so drop it. s/host_build/tools_build/ Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- (no changes since v1) common/image-fit.c | 2 +- include/image.h| 3 --- 2 files chan

Re: [PATCH v5 14/29] image: Drop IMAGE_OF_SYSTEM_SETUP

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: This is not needed with Kconfig, since we can use IS_ENABLED() easily enough. Drop it. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- (no changes since v1) common/image-fdt.c | 2 +- include/image.h| 6 -- 2 files chang

Re: [PATCH v5 13/29] image: Drop IMAGE_OF_BOARD_SETUP

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: This is not needed with Kconfig, since we can use IS_ENABLED() easily enough. Drop it. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- (no changes since v1) common/image-fdt.c | 4 ++-- include/image.h| 6 -- 2 files cha

Re: [PATCH v5 12/29] image: Drop IMAGE_BOOT_GET_CMDLINE

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: This is not needed with Kconfig, since we can use IS_ENABLED() easily enough and the board code is now in a separate file. Update the only place where this is used and drop it. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- Changes

Re: [PATCH v5 11/29] image: Use the correct checks for CRC32

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: Add a host Kconfig for CRC32. With this we can use CONFIG_IS_ENABLED(CRC32) directly in the host build, so drop the unnecessary indirection. Add a few more conditions to SPL_CRC32 to avoid build failures as well as TPL_CRC32. Also update hash.c to make c

Re: [PATCH v5 10/29] image: Use Kconfig to enable FIT_RSASSA_PSS on host

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: Add a host Kconfig for FIT_RSASSA_PSS. With this we can use CONFIG_IS_ENABLED(FIT_RSASSA_PSS) directly in the host build, so drop the forcing of this in the image.h header. Drop the #ifdef around padding_pss_verify() too since it is not needed. Use the c

Re: [PATCH v5 09/29] image: Use Kconfig to enable CONFIG_FIT_VERBOSE on host

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: Add a host Kconfig for FIT_VERBOSE. With this we can use CONFIG_IS_ENABLED(FIT_VERBOSE) directly in the host build, so drop the s/host build/ tools build/ forcing of this in the image.h header. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniu

Re: [PATCH v5 08/29] image: Drop IMAGE_ENABLE_OF_LIBFDT

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: Add a host Kconfig for OF_LIBFDT. With this we can use CONFIG_IS_ENABLED(OF_LIBFDT) directly in the host build, so drop the s/host build/tools build/ unnecessary indirection. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- Change

Re: [PATCH v5 07/29] image: Drop IMAGE_ENABLE_FIT

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: Make use of the host Kconfig for FIT. With this we can use CONFIG_IS_ENABLED(FIT) directly in the host build, so drop the unnecessary indirection. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- Changes in v5: - Rebase to next arch/a

Re: [PATCH v5 06/29] hash: Drop some #ifdefs in hash.c

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: We can use the __maybe_unused attribute to avoid some of the #ifdefs in this file. Update the functions accordingly. Note: The actual hashing interface is still a mess, with four separate combinations and lots of #ifdefs. This should really use a driver

Re: [PATCH v5 05/29] hash: Use Kconfig to enable hashing in host tools and SPL

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: At present when building host tools, we force CONFIG_SHAxxx to be enabled regardless of the board Kconfig setting. This is done in the image.h header file. For SPL we currently just assume the algorithm is desired if U-Boot proper enables it. Clean this

Re: [PATCH v5 04/29] spl: cypto: Bring back SPL_ versions of SHA

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: Unfortunately these were removed by mistake. This means that adding hash support to SPL brings in all software algorithms, with a substantial increase in code size. The origin of the problem was renaming them to SPL_FIT_xxx and then these were removed altog

Re: [PATCH v5 03/29] image: Add Kconfig options for FIT in the tools build

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: In preparation for enabling CONFIG_IS_ENABLED() on the host build, add some options to enable the various FIT options expected in these tools. This will ensure that the code builds correctly when CONFIG_TOOLS_xxx is distinct from CONFIG_xxx. Drop some #i

Re: [PATCH v5 03/29] image: Add Kconfig options for FIT in the tools build

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: In preparation for enabling CONFIG_IS_ENABLED() on the host build, add some options to enable the various FIT options expected in these tools. This will ensure that the code builds correctly when CONFIG_TOOLS_xxx is distinct from CONFIG_xxx. Drop some #i

Re: [PATCH v5 02/29] kconfig: Add tools support to CONFIG_IS_ENABLED()

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: At present we must separately test for the host build for many options, since we force them to be enabled. For example, CONFIG_FIT is always enabled in the host tools, even if CONFIG_FIT is not enabled by the board itself. It would be more convenient if we

Re: [PATCH v5 01/29] compiler: Rename host_build() to tools_build()

2021-10-05 Thread Alex G.
On 9/25/21 8:43 PM, Simon Glass wrote: With the new TOOLS_LIBCRYPTO and some other changes, it seems that we are heading towards calling this a tools build rather than a host build, although of course it does happen on the host. I cannot think of anything built by the host which cannot be des

Re: FIT image: load secure FPGA

2021-10-04 Thread Alex G.
hash-1 { algo = "${FIT_HASHISH}"; }; }; Something like: "fpga" "fpga-auth" : authenticated "fpga-enc" : encrypted "fpga-sec" : encrypted and authenticated Can these properties

Re: [PATCH] arm: dts: stm32mp1: use ssbl partition name for U-Boot

2021-09-29 Thread Alex G.
On 9/14/21 7:14 AM, Patrick Delaunay wrote: Continue to use the "ssbl" name for GPT partition of secondary boot stage = U-Boot for basic boot with SPL to avoid to disturb existing user. The "fip" partition name is only used for TFA_BOOT with FIP, it is a TF-A BL2 requirement; it the default conf

Re: [PATCH v5 05/29] hash: Use Kconfig to enable hashing in host tools and SPL

2021-09-27 Thread Alex G.
On 9/27/21 11:06 AM, Simon Glass wrote: Hi Alex, On Mon, 27 Sept 2021 at 09:53, Alex G. wrote: Hi Simon On 9/25/21 8:43 PM, Simon Glass wrote: At present when building host tools, we force CONFIG_SHAxxx to be enabled regardless of the board Kconfig setting. This is done in the image.h

Re: [PATCH v5 02/29] kconfig: Add tools support to CONFIG_IS_ENABLED()

2021-09-27 Thread Alex G.
osition to this series other than these final thoughts. We can fix the code later, and then remove the HOST configs. Alex Changes in v5: - Update commit message - Use TOOLS_ instead of HOST_ Changes in v2: - Correct comment about USE_HOSTCC being undefined in CONFIG_VAL() - Fix up co

Re: [PATCH v5 05/29] hash: Use Kconfig to enable hashing in host tools and SPL

2021-09-27 Thread Alex G.
op #define I_WANT_MD5 (which is temporary), and drop define CONFIG_SHA_*, and by extension, drop the need for CONFIG_TOOLS_SHA*. I think that's far more elegant. Alex Changes in v2: - Add SPL_ Kconfigs also, since otherwise hashing algorithms drop from SPL commo

  1   2   3   4   5   6   7   8   9   10   >