Re: [PATCH 2/3] crypto/fsl: Introduce SPL_FSL_CAAM_RNG

2024-04-26 Thread Heinrich Schuchardt
On 4/26/24 19:34, Tim Harvey wrote: On Fri, Apr 26, 2024 at 7:45 AM Heinrich Schuchardt wrote: On 26.04.24 06:03, Marek Vasut wrote: On 4/26/24 2:16 AM, Tim Harvey wrote: diff --git a/drivers/crypto/fsl/Makefile b/drivers/crypto/fsl/Makefile index 7a2543e16cc..4fbce519a0b 100644

Re: [RFC 11/14] efi_loader: move distro_efi_get_fdt_name()

2024-04-26 Thread Heinrich Schuchardt
On 26.04.24 16:52, Caleb Connolly wrote: Hi Heinrich, On 26/04/2024 16:13, Heinrich Schuchardt wrote: Move distro_efi_get_fdt_name() to a separate C module and rename it to efi_get_distro_fdt_name(). Signed-off-by: Heinrich Schuchardt ---   boot/bootmeth_efi.c  | 60

Re: [RFC 02/14] efi_loader: library function efi_dp_merge

2024-04-26 Thread Heinrich Schuchardt
On 26.04.24 16:30, Ilias Apalodimas wrote: Hi Heinrich, On Fri, 26 Apr 2024 at 17:13, Heinrich Schuchardt wrote: Provide a function to append a device_path to a list of device paths that is separated by final end nodes. Signed-off-by: Heinrich Schuchardt --- include/efi_loader.h

Re: [PATCH 2/3] crypto/fsl: Introduce SPL_FSL_CAAM_RNG

2024-04-26 Thread Heinrich Schuchardt
On 26.04.24 06:03, Marek Vasut wrote: On 4/26/24 2:16 AM, Tim Harvey wrote: diff --git a/drivers/crypto/fsl/Makefile b/drivers/crypto/fsl/Makefile index 7a2543e16cc..4fbce519a0b 100644 --- a/drivers/crypto/fsl/Makefile +++ b/drivers/crypto/fsl/Makefile @@ -6,6 +6,6 @@ obj-y += sec.o  

Re: [PATCH] cmd: move ELF load and boot to lib/elf.c

2024-04-26 Thread Heinrich Schuchardt
On 26.04.24 11:11, Maxim Moskalets wrote: Loading and running the ELF image is the responsibility of the library and should not be associated with the command line interface. It is also required to run ELF images from FIT with the bootm command so as not to depend on the command line interface.

[RFC 14/14] efi_loader: load distro dtb in bootmgr

2024-04-26 Thread Heinrich Schuchardt
If no device-tree is specified, try to load a device-tree from the boot device use the $fdtfile concatenated to either of the paths '/dtb/', '/', '/dtb/current/'. Signed-off-by: Heinrich Schuchardt --- include/efi_loader.h | 1 + lib/efi_loader/efi_bootmgr.c | 13 +-- lib

[RFC 12/14] efi_loader: return binary from efi_dp_from_lo()

2024-04-26 Thread Heinrich Schuchardt
Up to now efi_dp_from_lo() only could return the initrd or fdt device-path. Allow returning the binary device-path to. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_device_path.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/efi_loader

[RFC 11/14] efi_loader: move distro_efi_get_fdt_name()

2024-04-26 Thread Heinrich Schuchardt
Move distro_efi_get_fdt_name() to a separate C module and rename it to efi_get_distro_fdt_name(). Signed-off-by: Heinrich Schuchardt --- boot/bootmeth_efi.c | 60 ++--- include/efi_loader.h | 2 ++ lib/efi_loader/Makefile | 1 + lib/efi_loader/efi_fdt.c

[RFC 10/14] efi_loader: load device-tree specified in boot option

2024-04-26 Thread Heinrich Schuchardt
We allow to specify the triple of binary, initrd, and device-tree in boot options. Add the code to actually load the specified device-tree. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_bootmgr.c | 57 +++- 1 file changed, 56 insertions(+), 1

[RFC 08/14] efi_loader: improve error handling in try_load_entry()

2024-04-26 Thread Heinrich Schuchardt
the image if efi_set_load_options() fails. Fixes: 53f6a5aa8626 ("efi_loader: Replace config option for initrd loading") Signed-off-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- lib/efi_loader/efi_bootmgr.c | 97 +-- test/py/tests/test_e

[RFC 13/14] efi_loader: export efi_load_image_from_path

2024-04-26 Thread Heinrich Schuchardt
We can reuse this function to load the device-tree. Signed-off-by: Heinrich Schuchardt --- include/efi_loader.h | 4 lib/efi_loader/efi_bootmgr.c | 17 + lib/efi_loader/efi_boottime.c | 1 - 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/include

[RFC 09/14] efi_loader: do not install dtb if bootmgr fails

2024-04-26 Thread Heinrich Schuchardt
If the UEFI boot manager fails there is no point in installing the device-tree as a configuration table. Unload image if device-tree cannot be installed. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_bootmgr.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions

[RFC 06/14] efi_loader: superfluous efi_restore_gd after EFI_CALL

2024-04-26 Thread Heinrich Schuchardt
EFI_CALL() invokes __efi_entry_check() which executes set_gd(efi_gd). There is no need to execute set_gd(efi_gd) again via efi_restore_gd(). Signed-off-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- cmd/bootefi.c | 1 - cmd/efidebug.c | 2 -- lib

[RFC 05/14] cmd: efidebug: add support for setting fdt

2024-04-26 Thread Heinrich Schuchardt
by the device-tree GUID. Signed-off-by: Heinrich Schuchardt --- cmd/efidebug.c | 68 ++ 1 file changed, 63 insertions(+), 5 deletions(-) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index 93ba16efc7d..32c64711b6c 100644 --- a/cmd/efidebug.c +++ b/cmd

[RFC 07/14] cmd: terminate efidebug test bootmgr early on error

2024-04-26 Thread Heinrich Schuchardt
If efi_bootmgr_load() fails, there is no point in trying to start an image that has not been loaded. Signed-off-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- cmd/efidebug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index 30def6b6831

[RFC 04/14] cmd: eficonfig: add support for setting fdt

2024-04-26 Thread Heinrich Schuchardt
by the device-tree GUID. Signed-off-by: Heinrich Schuchardt --- cmd/eficonfig.c | 68 + 1 file changed, 63 insertions(+), 5 deletions(-) diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c index 1c57e66040b..d314051ee58 100644 --- a/cmd/eficonfig.c +++ b/cmd

[RFC 02/14] efi_loader: library function efi_dp_merge

2024-04-26 Thread Heinrich Schuchardt
Provide a function to append a device_path to a list of device paths that is separated by final end nodes. Signed-off-by: Heinrich Schuchardt --- include/efi_loader.h | 3 +++ lib/efi_loader/efi_device_path.c | 31 +++ 2 files changed, 34 insertions

[RFC 03/14] efi_loader: simplify efi_dp_concat()

2024-04-26 Thread Heinrich Schuchardt
As we now have efi_dp_merge() we can use this function to replace efi_dp_concat(,,true) and remove the last parameter from efi_dp_concat() otherwise. Signed-off-by: Heinrich Schuchardt --- cmd/eficonfig.c| 22 +- cmd/efidebug.c

[RFC 01/14] efi_loader: pass GUID by address to efi_dp_from_lo

2024-04-26 Thread Heinrich Schuchardt
We should not pass GUIDs by value as this requires copying. Signed-off-by: Heinrich Schuchardt --- include/efi_loader.h | 2 +- lib/efi_loader/efi_helper.c | 4 ++-- lib/efi_loader/efi_load_initrd.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include

[RFC 00/14] efi_loader: improve device-tree loading

2024-04-26 Thread Heinrich Schuchardt
/', '/', or '/dtb/current/' on the boot device if no device-tree is specified in the boot option or via a bootefi command parameter. Heinrich Schuchardt (14): efi_loader: pass GUID by address to efi_dp_from_lo efi_loader: library function efi_dp_merge efi_loader: simplify efi_dp_concat() cmd

[PATCH] efi_loader: fix description efi_dp_shorten

2024-04-26 Thread Heinrich Schuchardt
Use Sphinx style for return value. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_device_path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c index 46aa59b9e40..aec224d8466 100644 --- a/lib

Re: [PATCH v2 1/3] efi_loader: enable QueryVariableInfo at runtime for file backed variables

2024-04-25 Thread Heinrich Schuchardt
On 25.04.24 07:18, Ilias Apalodimas wrote: Since commit c28d32f946f0 ("efi_loader: conditionally enable SetvariableRT") we are enabling the last bits of missing runtime services. Add support for QueryVariableInfo which we already support at boottime and we just need to mark some fucntions

[PATCH v2] efi_loader: do not install dtb if bootmgr fails

2024-04-25 Thread Heinrich Schuchardt
If the UEFI boot manager fails there is no point in installing the device-tree as a configuration table. Unload image if device-tree cannot be installed. Signed-off-by: Heinrich Schuchardt --- v2: Unload image if device-tree cannot be installed. --- lib/efi_loader/efi_bootmgr.c | 14

Re: [PATCH v3 2/2] board: starfive: Rename spl_soc_init() to spl_dram_init()

2024-04-24 Thread Heinrich Schuchardt
board_init_f(). Signed-off-by: Lukas Funke Reviewed-by: Heinrich Schuchardt --- Changes in v3: - Reorganize patches such that each patch can be built individually Changes in v2: - capitalized acronym DRAM arch/riscv/cpu/jh7110/spl.c | 2 +- arch/riscv/include/asm/arch-jh7110

Re: EFI payload in 64 bit mode?

2024-04-24 Thread Heinrich Schuchardt
On 24.04.24 09:55, Philip Oberfichtner wrote: Hi, I'm wondering if it is currently possible to have U-Boot run in 64-bit mode as EFI payload. TARGET_EFI_APP64 selects X86_64 to achieve this. TARGET_EFI_PAYLOAD does currently always switch 32-bit mode. Any hints what would have to be done to

Re: [PATCH 2/3] efi_selftest: add tests for QueryVariableInfo at runtime

2024-04-24 Thread Heinrich Schuchardt
On 24.04.24 07:03, Ilias Apalodimas wrote: Since we support QueryVariableInfo at runtime now add the relevant tests. Since we want those to be reusable at bootime, add them in a separate file Add tests for - Test QueryVariableInfo returns EFI_SUCCESS - Test null pointers for the function

Re: [PATCH v2 3/3] board: starfive: Call spl_dram_init() for DRAM initialization

2024-04-23 Thread Heinrich Schuchardt
On 23.04.24 11:14, lukas.funke-...@weidmueller.com wrote: From: Lukas Funke Call spl_dram_init() since this is commonly used for dram initialization in u-boot. Signed-off-by: Lukas Funke --- Changes in v2: - capitalized acronym DRAM board/starfive/visionfive2/spl.c | 4 ++-- 1 file

[PATCH 1/1] net: consider option-length when parsing NIS domain

2024-04-23 Thread Heinrich Schuchardt
When parsing option 40 (network information service domain) the option length is in variable 'oplen' and not in 'size'. Addresses-Coverity-ID: 492765 Uninitialized variables (UNINIT) Fixes: 8ab388bfdbcf ("net: add support to parse the NIS domain for the dhcp options") Signed-off-by

Re: [PATCH] efi_loader: address coverity report 492766 for dead code

2024-04-23 Thread Heinrich Schuchardt
-by: Heinrich Schuchardt --- lib/efi_loader/efi_var_mem.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/efi_loader/efi_var_mem.c b/lib/efi_loader/efi_var_mem.c index 940ab6638823..139e16aad7c6 100644 --- a/lib/efi_loader/efi_var_mem.c +++ b/lib/efi_loader/efi_var_mem.c @@ -232,8 +232,6

[PATCH 1/1] doc: correct description of 'env print -e'

2024-04-22 Thread Heinrich Schuchardt
If 'env print -e' is invoked without variable name, all UEFI variables are listed. Describe that 'env print -e' requires CONFIG_HEXDUMP=y to print content of UEFI variables. Signed-off-by: Heinrich Schuchardt --- doc/usage/cmd/env.rst | 10 +++--- 1 file changed, 7 insertions(+), 3

[PATCH 1/1] cmd: CONFIG_CMD_BLOBLIST must depend on CONFIG_BLOBLIST

2024-04-22 Thread Heinrich Schuchardt
': cmd/bloblist.c:19:(.text.do_bloblist_info+0x6): undefined reference to `bloblist_show_stats' Fixes: 4aed22762303 ("bloblist: Add a command") Signed-off-by: Heinrich Schuchardt --- cmd/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/Kconfig b/c

[PATCH] efi_loader: do not install dtb if bootmgr fails

2024-04-22 Thread Heinrich Schuchardt
If the UEFI boot manager fails, there is no point in installing the device-tree as a configuration table. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_bootmgr.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader

[PATCH v2 1/1] efi_loader: improve error handling in try_load_entry()

2024-04-22 Thread Heinrich Schuchardt
the image if efi_set_load_options() fails. Fixes: 53f6a5aa8626 ("efi_loader: Replace config option for initrd loading") Signed-off-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- v2: remove incorrect statement about uninitialized 'size' from commit message --- lib/

[PATCH] cmd: terminate efidebug test bootmgr early on error

2024-04-20 Thread Heinrich Schuchardt
If efi_bootmgr_load() fails, there is no point in trying to start an image that has not been loaded. Signed-off-by: Heinrich Schuchardt --- cmd/efidebug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index a587860e2a5..5103ada29a5 100644 --- a/cmd

[PATCH 1/1] efi_loader: improve error handling in try_load_entry()

2024-04-20 Thread Heinrich Schuchardt
("efi_loader: Replace config option for initrd loading") Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_bootmgr.c | 97 +-- test/py/tests/test_efi_secboot/test_signed.py | 28 +++--- .../test_efi_secboot/test_signed_intca.py | 10 +- .../tests/test_e

Pull request efi-2024-07-rc1-3

2024-04-20 Thread Heinrich Schuchardt
callback for initrd deregistration Others: * correct alignment of x86 firmware tables Heinrich Schuchardt (5): doc: sort env sub-commands alphabetically doc: update list of aliases for the env command cmd: eficonfig

Re: [PATCH v3 0/4]

2024-04-20 Thread Heinrich Schuchardt
On 4/18/24 14:54, Ilias Apalodimas wrote: Hi! This is v3 of SetVariable at runtime [0] Nothing changed drastically from v2. A few more test cases have been added, comments/suggestions have been addressed and a bug where deleting a variable by setting 'attributes' to 0 has been fixed. Changes

Re: [PATCH v3 4/4] efi_selftest: add tests for setvariableRT

2024-04-20 Thread Heinrich Schuchardt
On 4/18/24 14:54, Ilias Apalodimas wrote: Since we support SetVariableRT now add the relevant tests - Search for the RTStorageVolatile and VarToFile variables after EBS - Try to update with invalid variales (BS, RT only) - Try to write a variable bigger than our backend storage - Write a

[PATCH 1/2] event: typo arguemnts

2024-04-19 Thread Heinrich Schuchardt
%s/arguemnts/arguments/ Signed-off-by: Heinrich Schuchardt --- include/event.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/event.h b/include/event.h index a8f046da3c3..fb353ad623e 100644 --- a/include/event.h +++ b/include/event.h @@ -316,7 +316,7 @@ static

[PATCH 2/2] tools: type arguemnts

2024-04-19 Thread Heinrich Schuchardt
%s/arguemnts/arguemnts/ Signed-off-by: Heinrich Schuchardt --- tools/buildman/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index bdd3d84158a..f92add7a7c5 100644 --- a/tools/buildman/test.py +++ b/tools/buildman

[PATCH 1/1] efi_loader: superfluous efi_restore_gd after EFI_CALL

2024-04-19 Thread Heinrich Schuchardt
EFI_CALL() invokes __efi_entry_check() which executes set_gd(efi_gd). There is no need to execute set_gd(efi_gd) again via efi_restore_gd(). Signed-off-by: Heinrich Schuchardt --- cmd/bootefi.c | 1 - cmd/efidebug.c | 2 -- lib/efi_loader/efi_helper.c | 2 -- 3 files

Re: [PATCH] efi_loader: change the error message when storing EFI variables

2024-04-19 Thread Heinrich Schuchardt
On 19.04.24 09:42, Ilias Apalodimas wrote: When we try to store EFI variables on a file, we need to use an ESP. if an ESP is not found, variables will change in memory, but U-Boot won't be able to restore them across reboots. Adjust the error message so users can understand what's going on

Re: [PATCH v2 2/4] doc: Document capsule generation through a config file

2024-04-19 Thread Heinrich Schuchardt
On 19.04.24 08:55, Sughosh Ganu wrote: The UEFI capsule can now be generated by specifying the capsule parameters through a config file. Highlight these changes in the documentation. Signed-off-by: Sughosh Ganu --- doc/develop/uefi/uefi.rst | 70 +++ 1

Re: [PATCH v2 1/4] tools: mkeficapsule: Add support for parsing capsule params from config file

2024-04-19 Thread Heinrich Schuchardt
On 19.04.24 08:55, Sughosh Ganu wrote: Add support for specifying the parameters needed for capsule generation through a config file, instead of passing them through command-line. Parameters for more than a single capsule file can be specified, resulting in generation of multiple capsules

Re: [PATCH v3 3/4] efi_loader: add an EFI variable with the file contents

2024-04-18 Thread Heinrich Schuchardt
On 18.04.24 17:59, Ilias Apalodimas wrote: On Thu, 18 Apr 2024 at 18:42, Heinrich Schuchardt wrote: On 18.04.24 17:36, Ilias Apalodimas wrote: Hi Mark, On Thu, 18 Apr 2024 at 18:15, Mark Kettenis wrote: From: Ilias Apalodimas Date: Thu, 18 Apr 2024 15:54:52 +0300 Hi Illias

Re: [PATCH v3 3/4] efi_loader: add an EFI variable with the file contents

2024-04-18 Thread Heinrich Schuchardt
Ard Biesheuvel # dumping all variables to a variable Co-developed-by: Heinrich Schuchardt # contributed on efi_var_collect_mem() Signed-off-by: Heinrich Schuchardt Signed-off-by: Ilias Apalodimas --- include/efi_variable.h| 16 +++- lib/charset.c | 2 +-

[PATCH 1/1] mailmap: add entry for AKASHI Takahiro

2024-04-18 Thread Heinrich Schuchardt
Akashi-san's Linaro email address in not valid anymore. Cc: AKASHI Takahiro Signed-off-by: Heinrich Schuchardt --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index 932bd4d9a97..8049856d41c 100644 --- a/.mailmap +++ b/.mailmap @@ -15,6 +15,7 @@ # Proper

[PATCH 1/1] acpi: set creator_revision in acpi_fill_header

2024-04-17 Thread Heinrich Schuchardt
We should have a single place where we write the default value to the creator revision field. If we ever will have any table created by another tool, we can overwrite the value afterwards. Signed-off-by: Heinrich Schuchardt --- arch/x86/lib/acpi_table.c | 2 -- lib/acpi/acpi_table.c | 2

[PATCH v2 1/1] efi_loader: typo mstching

2024-04-17 Thread Heinrich Schuchardt
%s/mstching/matching/ Reported-by: E Shattow Signed-off-by: Heinrich Schuchardt --- v2: correct Reported-by line --- lib/efi_loader/efi_var_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_var_common.c b/lib/efi_loader/efi_var_common.c

[PATCH 1/1] efi_loader: typo mstching

2024-04-17 Thread Heinrich Schuchardt
%s/mstching/matching/ Reported-by: Reported-by: E Shattow Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_var_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_var_common.c b/lib/efi_loader/efi_var_common.c index aa8feffd3ec..ed53bcf3939

[PATCH 1/1] cmd: eficonfig: check initrd path allocation

2024-04-17 Thread Heinrich Schuchardt
After allocating memory for the initrd file path we need to check the initrd buffer pointer is not NULL. Fixes: 87d791423ac6 ("eficonfig: menu-driven addition of UEFI boot option") Signed-off-by: Heinrich Schuchardt --- cmd/eficonfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH 2/2] cmd: sbi: add coreboot and oreboot implementation IDs

2024-04-17 Thread Heinrich Schuchardt
Let the sbi command detect the coreboot and oreboot SBI Implementation IDs defined in SBI specification v2.0. Signed-off-by: Heinrich Schuchardt --- cmd/riscv/sbi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/riscv/sbi.c b/cmd/riscv/sbi.c index 55507b0aa63..2d8ee7e5bbb 100644

[PATCH 1/2] cmd: sbi: add Supervisor Software Events extension

2024-04-17 Thread Heinrich Schuchardt
OpenSBI has implemented the Supervisor Software Events Extension. Allow detecting it in the sbi command. Signed-off-by: Heinrich Schuchardt --- arch/riscv/include/asm/sbi.h | 1 + cmd/riscv/sbi.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/riscv/include/asm/sbi.h b

Re: [PATCH v2 3/4] efi_loader: add an EFI variable with the file contents

2024-04-17 Thread Heinrich Schuchardt
tle-endian format. So, storing variables works like this: $~ efibootmgr -n 0001 $~ dd if=/sys/firmware/efi/efivars/VarToFile-b2ac5fc9-92b7-4acd-aeac-11e818c3130c of=/boot/efi/ubootefi.var skip=4 bs=1 [0] https://arm-software.github.io/ebbr/index.html#document-chapter5-variable-storage Co-dev

Re: [PATCH v2 2/4] efi_loader: Add OS notifications for SetVariable at runtime

2024-04-17 Thread Heinrich Schuchardt
: 75 62 6f 6f 74 65 66 69 2e 76 61 72 00 |ubootefi.var. | Signed-off-by: Ilias Apalodimas Reviewed-by: Heinrich Schuchardt --- include/efi_loader.h | 4 lib/efi_loader/efi_runtime.c | 19 --- 2 files changed, 20 insertions(+), 3

Re: [PATCH v2 1/4] efi_loader: conditionally enable SetvariableRT

2024-04-17 Thread Heinrich Schuchardt
FI_UNSUPPORTED) { - efi_st_error("SetVariable failed\n"); - return EFI_ST_FAILURE; + if (IS_ENABLED(CONFIG_EFI_RT_VOLATILE_STORE)) { + if (ret != EFI_INVALID_PARAMETER) { A comment might be helpful here: /* At runtime only non-volatile variab

Re: [PATCH v2 4/4] efi_selftest: add tests for setvariableRT

2024-04-17 Thread Heinrich Schuchardt
On 17.04.24 12:19, Ilias Apalodimas wrote: Since we support SetVariableRT now add the relevant tests - Search for the RTStorageVolatile and VarToFile variables after EBS - Try to update with invalid variales (BS, RT only) - Try to write a variable bigger than our backend storage - Write a

Re: [PATCH 4/4] configs: visionfive2: enable SPL_YMODEM_SUPPORT

2024-04-17 Thread Heinrich Schuchardt
of this patch series I would prefer leaving it to future discussion. Best regards Heinrich On Mon, Apr 15, 2024 at 4:51 AM Heinrich Schuchardt wrote: We can use U-Boot for recovering JH7110 based boards via UART if CONFIG_SPL_YMODEM_SUPPORT=y. * Send u-boot-spl.normal.out via XMODEM. * Send u

[PATCH 1/2] doc: sort env sub-commands alphabetically

2024-04-17 Thread Heinrich Schuchardt
The 'env' man-page is currently only partially sorted. Signed-off-by: Heinrich Schuchardt --- doc/usage/cmd/env.rst | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/doc/usage/cmd/env.rst b/doc/usage/cmd/env.rst index a7e21693a67

[PATCH 2/2] doc: update list of aliases for the env command

2024-04-17 Thread Heinrich Schuchardt
* add link to askenv man-page * add printenv Signed-off-by: Heinrich Schuchardt --- doc/usage/cmd/env.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/usage/cmd/env.rst b/doc/usage/cmd/env.rst index 60a294328e8..040076bcc03 100644 --- a/doc/usage/cmd/env.rst +++ b

[PATCH 0/2] doc: env sub-commands, env list of aliases

2024-04-17 Thread Heinrich Schuchardt
* sort env sub-commands alphabetically * update list of aliases for the env command Heinrich Schuchardt (2): doc: sort env sub-commands alphabetically doc: update list of aliases for the env command doc/usage/cmd/env.rst | 35 ++- 1 file changed, 18

Re: [PATCH] stm32mp: Reserve OPTEE area in EFI memory map

2024-04-17 Thread Heinrich Schuchardt
On 17.04.24 09:25, Patrick DELAUNAY wrote: Hi, On 3/8/24 11:12, Patrice Chotard wrote: Since commit 7b78d6438a2b3 ("efi_loader: Reserve unaccessible memory") memory region above ram_top is tagged in EFI memory map as EFI_BOOT_SERVICES_DATA. In case of STM32MP1 platform, above ram_top, there is

Re: [PATCH v2 5/5] common: Convert *.c/h from UTF-8 to ASCII enconfing

2024-04-16 Thread Heinrich Schuchardt
On 16.04.24 18:06, Tom Rini wrote: On Tue, Apr 16, 2024 at 08:55:19AM +0200, Michal Simek wrote: Convert UTF-8 chars to ASCII in cases where make sense. No Copyright or names are converted. Signed-off-by: Michal Simek Reviewed-by: Tom Rini Now, how did you test / find these? Given names

[PATCH 1/1] Makefile: don't add -Wno-maybe-uninitialized twice

2024-04-16 Thread Heinrich Schuchardt
Avoid adding the same flag to KBUILD_CFLAGS twice. Fixes: 8602d97ca2cf ("Makefile: avoid false positive -Wmaybe-uninitialized") Signed-off-by: Heinrich Schuchardt --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7321fe1499e..4

Re: [PATCH 1/4] board: starfive: function to read eMMC size

2024-04-16 Thread Heinrich Schuchardt
On 4/16/24 06:09, E Shattow wrote: On Mon, Apr 15, 2024 at 4:50 AM Heinrich Schuchardt wrote: The EEPROM provides information about the size of the EEPROM. "The EEPROM provides information about the size of the eMMC." Thanks for catching this. Provide a ne

Re: [PATCH 2/4] Kconfig: Add missing quotes around source file

2024-04-15 Thread Heinrich Schuchardt
On 15.04.24 13:35, Michal Simek wrote: All errors are generated by ./tools/qconfig.py -b -j8 -i whatever. Error look like this: drivers/crypto/Kconfig:9: warning: style: quotes recommended around 'drivers/crypto/nuvoton/Kconfig' in 'source drivers/crypto/nuvoton/Kconfig' Should we add a

Re: [PATCH 3/4] Kconfig: Add missing quotes around default string value

2024-04-15 Thread Heinrich Schuchardt
e storage in the EFI system partition. The Reviewed-by: Heinrich Schuchardt

Re: [PATCH 4/4] Kconfig: Make all Kconfig encoding ascii

2024-04-15 Thread Heinrich Schuchardt
On 15.04.24 13:35, Michal Simek wrote: Some of Kconfigs are using utf-8 encoding because of used chars. Convert all of them to ascii enconging. Signed-off-by: Michal Simek --- There are other files which are using utf-8 enconding and pretty much I think we should convert all of them because

[PATCH 3/4] doc: Milk-V Mars CM and Milk-V Mars CM Lite

2024-04-15 Thread Heinrich Schuchardt
Provide a man-page describing the usage of U-Boot on the Milk-V Mars CM and Milk-V Mars CM Lite boards. Signed-off-by: Heinrich Schuchardt --- doc/board/starfive/index.rst | 1 + doc/board/starfive/milk-v_mars_cm.rst | 125 ++ 2 files changed, 126 insertions

[PATCH 4/4] configs: visionfive2: enable SPL_YMODEM_SUPPORT

2024-04-15 Thread Heinrich Schuchardt
We can use U-Boot for recovering JH7110 based boards via UART if CONFIG_SPL_YMODEM_SUPPORT=y. * Send u-boot-spl.normal.out via XMODEM. * Send u-boot.itb via YMODEM. Signed-off-by: Heinrich Schuchardt --- configs/starfive_visionfive2_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 2/4] board: add support for Milk-V Mars CM

2024-04-15 Thread Heinrich Schuchardt
We already support the VisionFive 2 and the Milk-V Mars board by patching the VisionFive 2 device tree. With this patch the same is done for the Milk-V Mars CM. Signed-off-by: Heinrich Schuchardt --- board/starfive/visionfive2/spl.c | 27 ++- .../visionfive2

[PATCH 1/4] board: starfive: function to read eMMC size

2024-04-15 Thread Heinrich Schuchardt
The EEPROM provides information about the size of the EEPROM. Provide a new function get_mmc_size_from_eeprom() to read it. Signed-off-by: Heinrich Schuchardt --- arch/riscv/include/asm/arch-jh7110/eeprom.h| 7 +++ board/starfive/visionfive2/Kconfig | 9

[PATCH 0/4] board: starfive: add Milk-V Mars CM support

2024-04-15 Thread Heinrich Schuchardt
to indicate that eMMC is not present. Thanks to E. Shattow for all the helpful discussions. He figured out what needed to be patched in the device-tree. Heinrich Schuchardt (4): board: starfive: function to read eMMC size board: add support for MARS CM SD doc: Milk-V Mars CM and Milk-V Mars CM Lite

Pull request efi-2024-07-rc1-2

2024-04-13 Thread Heinrich Schuchardt
at' be a debug message * sanitize efi_tcg2_final_events_table definition * move efi_var_collect to common functions * improve error messages in variables unit test by using EFI_UNSUPPORTED for private authenticated variables Heinrich

Re: [PATCH] Fix references to trace doc

2024-04-13 Thread Heinrich Schuchardt
On 4/11/24 18:44, Vincent Stehlé wrote: The README.trace has been moved and converted to rst in commit dce26c7d56ed ("doc: move README.trace to HTML documentation"); fix all the remaining references to this file. Signed-off-by: Vincent Stehlé Cc: Tom Rini Cc: Simon Glass Cc

Re: [PATCH] doc/sphinx: Bump idna to 3.7

2024-04-12 Thread Heinrich Schuchardt
On 4/12/24 16:23, Tom Rini wrote: While we unlikely to have an issue with CVE-2024-3651, it is simple enough to bump our version of idna to receive the fix, do so. Cc: Heinrich Schuchardt Reported-by: GitHub dependabot Signed-off-by: Tom Rini Tested-by: Heinrich Schuchardt --- doc

Re: [PATCH v4] cmd: bootm: add ELF file support

2024-04-11 Thread Heinrich Schuchardt
On 11.04.24 10:57, Maxim Moskalets wrote: From: Maxim Moskalets Some operating systems (e.g. seL4) and embedded applications are ELF images. It is convenient to use FIT-images to implement trusted boot. Added "elf" image type for booting using bootm command. Signed-off-by: Maxim Moskalets

Re: [PATCH 1/1] clk: sifive: append missing \n to messages

2024-04-11 Thread Heinrich Schuchardt
On 11.04.24 05:13, Sean Anderson wrote: On 2/16/24 11:35, Heinrich Schuchardt wrote: If multiple messages are written, line-feeds improve the readability. Fixes: c40b6df87fc0 ("clk: Add SiFive FU540 PRCI clock driver") Signed-off-by: Heinrich Schuchardt ---   drivers/clk/analog

Re: [PATCH 1/1] tools: use adequate entropy source for initialization vector

2024-04-10 Thread Heinrich Schuchardt
On 4/11/24 01:46, Mark Kettenis wrote: From: Heinrich Schuchardt Date: Thu, 11 Apr 2024 01:31:16 +0200 The random() function is unsafe to initialize cryptographic data. Use getrandom() which reads from /dev/urandom instead. getrandom() is available on Linux sine release 3.17 and on BSD

[PATCH 1/1] tools: use adequate entropy source for initialization vector

2024-04-10 Thread Heinrich Schuchardt
The random() function is unsafe to initialize cryptographic data. Use getrandom() which reads from /dev/urandom instead. getrandom() is available on Linux sine release 3.17 and on BSD. Addresses-Coverity-ID: 312953 Calling risky function Signed-off-by: Heinrich Schuchardt --- tools/image

[PATCH 1/1] efi_loader: sanitize efi_tcg2_final_events_table definition

2024-04-10 Thread Heinrich Schuchardt
read Signed-off-by: Heinrich Schuchardt --- include/efi_tcg2.h | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/efi_tcg2.h b/include/efi_tcg2.h index b21c5cb3dd6..a75b5a35b6e 100644 --- a/include/efi_tcg2.h +++ b/include/efi_tcg2.h @@ -150,16 +150,14 @@ struct

[PATCH 1/1] bootflow: always initialize bootflow_iter_set_dev parameters

2024-04-10 Thread Heinrich Schuchardt
method_flags may be passed uninitialized to bootflow_iter_set_dev() if dev is not NULL. Always initialize method_flags. Addresses-Coverity-ID: 467057 Uninitialized scalar variable Signed-off-by: Heinrich Schuchardt --- boot/bootflow.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions

[PATCH 1/1] sandbox: don't call os_close with invalid file descriptor

2024-04-10 Thread Heinrich Schuchardt
If open() fails it returns -1. Calling close() with this value makes no sense. Return -EIO instead. Addresses-Coverity-ID: 185828 Improper use of negative value Signed-off-by: Heinrich Schuchardt --- arch/sandbox/cpu/os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch

Re: [PATCH 1/2] dm: core: add support for fallback drivers

2024-04-10 Thread Heinrich Schuchardt
Am 10. April 2024 19:06:57 MESZ schrieb Caleb Connolly : >Introduce support for a uclass to provide a fallback/stub driver which >can be used when no device is found for a given node. This might be >useful for handling non-essential clock controllers like the RPMh on >Qualcomm platforms, or

Re: [PATCH] efi_loader: using EFI_UNSUPPORTED for private authenticated variables

2024-04-10 Thread Heinrich Schuchardt
= EFI_UNSUPPORTED; This looks more adequate than EFI_SECURITY_VIOLATION. Thanks. Reviewed-by: Heinrich Schuchardt goto err; }

Re: [RFC PATCH] efi_loader: Fix EFI_VARIABLE_APPEND_WRITE hash check

2024-04-10 Thread Heinrich Schuchardt
On 10.04.24 13:53, Weizhao Ouyang wrote: On Thu, Apr 4, 2024 at 1:48 AM Weizhao Ouyang wrote: Hi Heinrich, On Wed, Apr 3, 2024 at 10:54 PM Heinrich Schuchardt wrote: On 27.03.24 15:06, Weizhao Ouyang wrote: According to UEFI v2.10 spec section 8.2.6, if a caller invokes the SetVariables

[PATCH 1/1] sandbox: use sane access rights for files

2024-04-10 Thread Heinrich Schuchardt
other executable") Fixes: d9165153caea ("sandbox: add flags for open() call") Fixes: 5c2859cdc302 ("sandbox: Allow reading/writing of RAM buffer") Signed-off-by: Heinrich Schuchardt --- arch/sandbox/cpu/os.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff -

Re: [PATCH v2 01/16] board: Define GUIDs for firmware images

2024-04-10 Thread Heinrich Schuchardt
On 09.04.24 23:05, Jon Humphreys wrote: Heinrich Schuchardt writes: On 4/9/24 00:31, Jonathan Humphreys wrote: Define GUIDs for the different firmware images (tiboot3.bin, tispl.bin, u-boot.img, sysfw). > Signed-off-by: Jonathan Humphreys --- include/configs/ti_armv7_common.h |

Re: [PATCH 1/1] api: add missing cookie checks for network access

2024-04-09 Thread Heinrich Schuchardt
On 4/10/24 02:43, Tom Rini wrote: On Tue, Apr 09, 2024 at 03:16:55PM +0200, Heinrich Schuchardt wrote: dev_write_net() and dev_read_net() should validate the provided cookie. Signed-off-by: Heinrich Schuchardt --- api/api_net.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions

[PATCH 1/1] efi_loader: 'EFI using ACPI tables at' should be debug message

2024-04-09 Thread Heinrich Schuchardt
The message "EFI using ACPI tables at %lx\n" is only of interest when debugging. Make it a debug message. Fixes: 085f8db6b98d ("efi: Use the installed ACPI tables") Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 del

[PATCH 1/1] fs: fat: fill creation and change date

2024-04-09 Thread Heinrich Schuchardt
The FAT specification requires that the change date is set. If a DM RTC device exists, set the creation and change date to the current date when updating the directory entry. Otherwise use the date 2020-01-01. Signed-off-by: Heinrich Schuchardt --- fs/fat/fat_write.c | 44

Re: [PATCH 01/13] ti:keys Add EFI signature list

2024-04-09 Thread Heinrich Schuchardt
On 4/9/24 14:14, Andrew Davis wrote: On 4/8/24 10:34 PM, Heinrich Schuchardt wrote: On 4/8/24 23:33, Jonathan Humphreys wrote: EFI signature list using TI dummy keys. Adding vendor public keys into the code base to lock down generated binaries to the vendors unpublished private key does

[PATCH 1/1] reboot-mode: must depend on CONFIG_DM_RTC

2024-04-09 Thread Heinrich Schuchardt
Reading the boot mode from RTC memory requires a real time clock. Add the missing Kconfig dependency. Fixes: c74675bd904b ("reboot-mode: read the boot mode from RTC memory") Signed-off-by: Heinrich Schuchardt --- drivers/reboot-mode/Kconfig | 1 + 1 file changed, 1 insertion(+)

[PATCH 1/1] fs: fat: convert change month correctly

2024-04-09 Thread Heinrich Schuchardt
The month is stored in 5 - 8. We need to shift it by 5 bits. Cf. Microsoft FAT Specification, 2005-08-30 Fixes: 13c11c665320 ("fs: fat: add file attributes to struct fs_dirent") Signed-off-by: Heinrich Schuchardt --- fs/fat/fat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH 1/1] api: add missing cookie checks for network access

2024-04-09 Thread Heinrich Schuchardt
dev_write_net() and dev_read_net() should validate the provided cookie. Signed-off-by: Heinrich Schuchardt --- api/api_net.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/api_net.c b/api/api_net.c index 7515c26e8b4..0b931a80787 100644 --- a/api/api_net.c +++ b

[PATCH 1/1] test: typo curren

2024-04-09 Thread Heinrich Schuchardt
Fix typos in test_eficonfig.py: %s/curren/current/ Signed-off-by: Heinrich Schuchardt --- test/py/tests/test_eficonfig/test_eficonfig.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/py/tests/test_eficonfig/test_eficonfig.py b/test/py/tests/test_eficonfig

Re: [PATCH v2 02/16] board: am64x: Define capsule update firmware info

2024-04-08 Thread Heinrich Schuchardt
On 4/9/24 00:31, Jonathan Humphreys wrote: Define the firmwares updatable via EFI capsule update. Nits: %s/firmwares/firmware/ (firmware is uncountable). Signed-off-by: Jonathan Humphreys --- board/ti/am64x/evm.c | 33 + 1 file changed, 33 insertions(+)

Re: [PATCH v2 01/16] board: Define GUIDs for firmware images

2024-04-08 Thread Heinrich Schuchardt
On 4/9/24 00:31, Jonathan Humphreys wrote: Define GUIDs for the different firmware images (tiboot3.bin, tispl.bin, u-boot.img, sysfw). > Signed-off-by: Jonathan Humphreys --- include/configs/ti_armv7_common.h | 17 + 1 file changed, 17 insertions(+) diff --git

Re: [PATCH 01/13] ti:keys Add EFI signature list

2024-04-08 Thread Heinrich Schuchardt
On 4/8/24 23:33, Jonathan Humphreys wrote: EFI signature list using TI dummy keys. Adding vendor public keys into the code base to lock down generated binaries to the vendors unpublished private key does not match well with the intent of the GNU public license. Best regards Heinrich

Re: [PATCH 00/13] EFI: capsule: ti: enable authenticated capsules

2024-04-08 Thread Heinrich Schuchardt
On 4/8/24 23:33, Jonathan Humphreys wrote: Create an EFI signature list (.esl) file based on the TI dummy key. Enable capsule authentication for several TI SoC based platforms: AM64, AM62, AM62p, BeaglePlay, J7, and BeagleboneAI. Hello Jonathan, with the patch a capsule update will not be

  1   2   3   4   5   6   7   8   9   10   >