Re: [RFC 13/14] efi_loader: export efi_load_image_from_path

2024-04-28 Thread Ilias Apalodimas
On Fri, 26 Apr 2024 at 17:14, Heinrich Schuchardt wrote: > > We can reuse this function to load the device-tree. This patch is correct, but needs splitting. It exports the function, but also adds IS_ENABLED etc, that belong to an earlier patch Thanks /Ilias > > Signed-off-by: Heinrich

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

2024-04-28 Thread Ilias Apalodimas
On Fri, 26 Apr 2024 at 17:13, Heinrich Schuchardt wrote: > > 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. > This patch looks correct, but I prefer keeping the existing efi_dp_concat as-is

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

2024-04-28 Thread Ilias Apalodimas
Hi Heinrich On Fri, 26 Apr 2024 at 17:14, Heinrich Schuchardt wrote: > > Up to now efi_dp_from_lo() only could return the initrd or fdt device-path. > Allow returning the binary device-path to. Why do we need this? Thanks /Ilias > > Signed-off-by: Heinrich Schuchardt > --- >

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

2024-04-26 Thread Ilias Apalodimas
t; */ > - dp = efi_get_dp_from_boot(efi_lf2_initrd_guid); > + dp = efi_get_dp_from_boot(_lf2_initrd_guid); > if (!dp) > return EFI_INVALID_PARAMETER; > > -- > 2.43.0 > Reviewed-by: Ilias Apalodimas

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

2024-04-26 Thread Ilias Apalodimas
Hi Heinrich On Fri, 26 Apr 2024 at 17:53, Heinrich Schuchardt wrote: > > 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 t

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

2024-04-26 Thread Ilias Apalodimas
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 | 3 +++ >

Re: [PATCH] efi_loader: fix description efi_dp_shorten

2024-04-26 Thread Ilias Apalodimas
for "short-form device path". > * > * @dp:original device-path > - * @Return:shortened device-path or NULL > + * Return: shortened device-path or NULL > */ > struct efi_device_path *efi_dp_shorten(struct efi_device_path *dp) > { > -- > 2.43.0 > Reviewed-by: Ilias Apalodimas

Pull request for optee-master-26042024

2024-04-26 Thread Ilias Apalodimas
Hi Tom The following changes since commit d097f9e1299a3bdb7de468f0d9bbc63932f461cd: Merge tag 'fsl-qoriq-2024-4-24' of https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq (2024-04-23 17:53:06 -0600) are available in the Git repository at:

Re: Capsule GUIDs and LVFS

2024-04-26 Thread Ilias Apalodimas
On Thu, Apr 25, 2024 at 09:18:31AM +0200, Michal Simek wrote: > Hi, > > On 4/25/24 08:19, Ilias Apalodimas wrote: > > Hi, > > > > Richard maintains LVFS & fwupd, commonly used for firmware upgrades. > > We recently discussed the U-Boot status and supported dev

Re: Capsule GUIDs and LVFS

2024-04-25 Thread Ilias Apalodimas
On Thu, Apr 25, 2024 at 05:16:12PM +0200, Caleb Connolly wrote: > Hi all, > > On 25/04/2024 15:46, Ilias Apalodimas wrote: > > Hi Richard, > > > > On Thu, 25 Apr 2024 at 15:28, Richard Hughes wrote: > > > > > > Hi all! > > > > > &g

Re: [PATCH v1] tee: sandbox: check for buffer size

2024-04-25 Thread Ilias Apalodimas
ata) + 1; > + if (value_sz < tmp_sz) > + return TEE_ERROR_SHORT_BUFFER; > + > + memcpy(value, ep->data, tmp_sz); > + params[1].u.memref.size = tmp_sz; > > return TEE_SUCCESS; > case TA_AVB_CMD_WRITE_PERSIST_VALUE: > -- > 2.34.1 > Reviewed-by: Ilias Apalodimas

Re: Capsule GUIDs and LVFS

2024-04-25 Thread Ilias Apalodimas
Hi Richard, On Thu, 25 Apr 2024 at 15:28, Richard Hughes wrote: > > Hi all! > > > Any ODM/OEM creating a board > > based on the original device must use his own > > GUIID to avoid confusion. If not we would end up with different > > devices reusing the same GUIDs and upgrading their firmware

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

2024-04-25 Thread Ilias Apalodimas
Hi Heinrich, On Thu, 25 Apr 2024 at 11:32, Heinrich Schuchardt wrote: > > 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 runti

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

2024-04-25 Thread Ilias Apalodimas
Hi Heinrich, On Thu, 25 Apr 2024 at 11:06, Heinrich Schuchardt wrote: > > 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: >

Capsule GUIDs and LVFS

2024-04-25 Thread Ilias Apalodimas
Hi, Richard maintains LVFS & fwupd, commonly used for firmware upgrades. We recently discussed the U-Boot status and supported devices since fwupd supports capsule updates. In order to be able to support capsule updates via LVFS manufacturers should bind their GUIDs to their devices. Any ODM/OEM

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

2024-04-24 Thread Ilias Apalodimas
Signed-off-by: Ilias Apalodimas --- Changes since v1: - Pass the attributers as well in efi_st_query_variable_common() and check for runtime/boottime include/efi_selftest.h| 11 +++ lib/efi_selftest/Makefile | 1 + .../efi_selftest_variables_common.c

[PATCH v2 3/3] efi_selftest: add tests for QueryVariableInfo at boottime

2024-04-24 Thread Ilias Apalodimas
EFI_SUCCESS - Test null pointers for the function arguments - Test invalid combination of attributes Signed-off-by: Ilias Apalodimas --- Changes since v1: - efi_st_query_variable_common() called with EFI_VARIABLE_BOOTSERVICE_ACCESS only lib/efi_selftest/efi_selftest_variables.c| 13

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

2024-04-24 Thread Ilias Apalodimas
cks around. It's worth noting that pointer checks for maxmimum and remaining variable storage aren't when we store variables on the RPMB, since the Secure World backend is already performing them. Signed-off-by: Ilias Apalodimas --- Changes since v1: - require EFI_VARIABLE_RUNTIME_ACCESS to be set

Re: [PATCH v3 01/19] doc: uefi: capsules: Start Capsule Update porting section

2024-04-24 Thread Ilias Apalodimas
ifferent boards, they should have different > GUIDs. > +Therefore it is important when creating support for a new board, new GUIDs > are > +defined in the board's header file. *DO NOT* reuse capsule GUIDs. > + > Executing the boot manager > ~~ > > -- > 2.34.1 > Reviewed-by: Ilias Apalodimas

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

2024-04-24 Thread Ilias Apalodimas
Hi Heinrich, On Wed, 24 Apr 2024 at 10:25, Heinrich Schuchardt wrote: > > 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 separat

[PATCH 3/3] efi_selftest: add tests for QueryVariableInfo at boottime

2024-04-23 Thread Ilias Apalodimas
EFI_SUCCESS - Test null pointers for the function arguments - Test invalid combination of attributes Signed-off-by: Ilias Apalodimas --- lib/efi_selftest/efi_selftest_variables.c| 11 --- lib/efi_selftest/efi_selftest_variables_common.c | 3 +++ 2 files changed, 7 insertions(+), 7

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

2024-04-23 Thread Ilias Apalodimas
Signed-off-by: Ilias Apalodimas --- include/efi_selftest.h| 9 ++ lib/efi_selftest/Makefile | 1 + .../efi_selftest_variables_common.c | 102 ++ .../efi_selftest_variables_runtime.c | 10 +- 4 files changed, 118

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

2024-04-23 Thread Ilias Apalodimas
cks around. It's worth noting that pointer checks for maxmimum and remaining variable storage aren't when we store variables on the RPMB, since the Secure World backend is already performing them. Signed-off-by: Ilias Apalodimas --- lib/efi_loader/efi_runtime.c | 4 lib/

Re: New Defects reported by Coverity Scan for Das U-Boot

2024-04-23 Thread Ilias Apalodimas
Hi Tom, Thanks! Already sent a fix for UEFI On Tue, 23 Apr 2024 at 00:48, Tom Rini wrote: > > Here's the latest report. > > -- Forwarded message - > From: > Date: Mon, Apr 22, 2024 at 3:23 PM > Subject: New Defects reported by Coverity Scan for Das U-Boot > To: > > > Hi, > >

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

2024-04-22 Thread Ilias Apalodimas
The check of the return code is already done a few lines above. Although it doesn't cause any functional issues, remove the superfluous checks Addresses-Coverity-ID: 492766 Control flow issues (DEADCODE) Signed-off-by: Ilias Apalodimas --- lib/efi_loader/efi_var_mem.c | 2 -- 1 file changed, 2

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

2024-04-22 Thread Ilias Apalodimas
t; log_notice("EFI boot manager: Cannot load any image\n"); > return ret; > } > > + ret = efi_install_fdt(fdt); > + if (ret != EFI_SUCCESS) > + return ret; > + > return do_bootefi_exec(handle, load_options); > } > -- > 2.43.0 > Reviewed-by: Ilias Apalodimas

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

2024-04-20 Thread Ilias Apalodimas
> @@ -42,7 +42,7 @@ class TestEfiUnsignedImage(object): > output = u_boot_console.run_command_list([ > 'efidebug boot order 1', > 'efidebug test bootmgr']) > -assert 'efi_start_image() returned: 26' in ''.join(output) > +assert 'efi_bootmgr_load() returned: 26' in ''.join(output) > assert 'Hello, world!' not in ''.join(output) > > def test_efi_unsigned_image_auth2(self, u_boot_console, efi_boot_env): > @@ -95,7 +95,7 @@ class TestEfiUnsignedImage(object): > output = u_boot_console.run_command_list([ > 'efidebug boot order 1', > 'efidebug test bootmgr']) > -assert 'efi_start_image() returned: 26' in ''.join(output) > +assert 'efi_bootmgr_load() returned: 26' in ''.join(output) > assert 'Hello, world!' not in ''.join(output) > > with u_boot_console.log.section('Test Case 3b'): > @@ -113,5 +113,5 @@ class TestEfiUnsignedImage(object): > output = u_boot_console.run_command_list([ > 'efidebug boot order 1', > 'efidebug test bootmgr']) > -assert 'efi_start_image() returned: 26' in ''.join(output) > +assert 'efi_bootmgr_load() returned: 26' in ''.join(output) > assert 'Hello, world!' not in ''.join(output) > -- > 2.43.0 > Please adjust the commit message either in a v2 or while merging. Other than that Reviewed-by: Ilias Apalodimas

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

2024-04-20 Thread Ilias Apalodimas
oad(, _options); > printf("efi_bootmgr_load() returned: %ld\n", ret & ~EFI_ERROR_MASK); > + if (ret != EFI_SUCCESS) > + return CMD_RET_SUCCESS; > > /* We call efi_start_image() even if error for test purpose. */ > ret = EFI_C

Re: [PATCH v3 0/4]

2024-04-20 Thread Ilias Apalodimas
On Sat, 20 Apr 2024 at 10:20, Heinrich Schuchardt wrote: > > 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

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

2024-04-20 Thread Ilias Apalodimas
Hi Heinrich, I was about to fix and send a v4, but I see you fixed them up on the PR. Thanks! On Sat, 20 Apr 2024 at 10:23, Heinrich Schuchardt wrote: > > On 4/18/24 14:54, Ilias Apalodimas wrote: > > Since we support SetVariableRT now add the relevant tests >

Re: [PATCH v3] tpm-v2: allow algoirthm name to be configured for pcr_read and pcr_extend

2024-04-19 Thread Ilias Apalodimas
On Fri, 19 Apr 2024 at 20:52, Tim Harvey wrote: > > On Fri, Apr 19, 2024 at 10:37 AM Ilias Apalodimas > wrote: > > > > Also quickly looking at this, you need a new function for > > tpm2_algorithm_to_mask() (look below) > > > > On Fri, 19 Apr 202

Re: [PATCH v3] tpm-v2: allow algoirthm name to be configured for pcr_read and pcr_extend

2024-04-19 Thread Ilias Apalodimas
Also quickly looking at this, you need a new function for tpm2_algorithm_to_mask() (look below) On Fri, 19 Apr 2024 at 20:20, Ilias Apalodimas wrote: > > Hi Tim, > > On Fri, 19 Apr 2024 at 20:13, Tim Harvey wrote: > > > > On Sat, Apr 6, 2024 at 9:33 AM Ili

Re: [PATCH v3] tpm-v2: allow algoirthm name to be configured for pcr_read and pcr_extend

2024-04-19 Thread Ilias Apalodimas
Hi Tim, On Fri, 19 Apr 2024 at 20:13, Tim Harvey wrote: > > On Sat, Apr 6, 2024 at 9:33 AM Ilias Apalodimas > wrote: > > > > Hi Tim, > > > > Thanks for the patch > > > > I'll be away next week, I'll try to find time and take a closer look. > &g

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

2024-04-19 Thread Ilias Apalodimas
e 100644 > --- a/lib/efi_loader/efi_helper.c > +++ b/lib/efi_loader/efi_helper.c > @@ -544,8 +544,6 @@ efi_status_t do_bootefi_exec(efi_handle_t handle, void > *load_options) > } > } > > - efi_restore_gd(); > - > out: > free(load_options); > > -- > 2.43.0 > Reviewed-by: Ilias Apalodimas

Re: [PATCH] efi_loader: use event callback for initrd deregistration

2024-04-19 Thread Ilias Apalodimas
:38:17PM +0200, Ilias Apalodimas wrote: > Thanks for cleaning this up! > > On Mon, 4 Dec 2023 at 06:31, Masahisa Kojima > wrote: > > > > Currently efi_initrd_deregister() is called in bootefi.c > > when the image started from boot

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

2024-04-19 Thread Ilias Apalodimas
Heinrich Please ignore this, I missed that we already report that in efi_set_blk_dev_to_system_partition() Apologies for the noise /Ilias On Fri, Apr 19, 2024 at 12:45:45PM +0300, Ilias Apalodimas wrote: > When we try to store EFI variables on a file, we need to use an ESP. > if

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

2024-04-19 Thread Ilias Apalodimas
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 Signed-off-by: Ilias Apalodimas --- Changes

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

2024-04-19 Thread Ilias Apalodimas
Hi Heinrich On Fri, 19 Apr 2024 at 10:51, Heinrich Schuchardt wrote: > > 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

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

2024-04-19 Thread Ilias Apalodimas
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 Signed-off-by: Ilias Apalodimas --- lib

Pull request for tpm-master-18042024

2024-04-18 Thread Ilias Apalodimas
OP-TEE fixes only on this PR, no TPM related ones. The following changes since commit 2c3fa4b8add3cb6a440184ab67debc6867d383c0: sandbox: don't call os_close with invalid file descriptor (2024-04-17 17:06:16 -0600) are available in the Git repository at:

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

2024-04-18 Thread Ilias Apalodimas
On Thu, 18 Apr 2024 at 19:15, Heinrich Schuchardt wrote: > > 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, > &g

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

2024-04-18 Thread Ilias Apalodimas
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 > >>>

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

2024-04-18 Thread Ilias Apalodimas
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, > > > > > Previous patches enabled SetVariableRT using a RAM backend. > > Although EBBR [0] defines a va

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

2024-04-18 Thread Ilias Apalodimas
b/.mailmap > index 932bd4d9a97..8049856d41c 100644 > --- a/.mailmap > +++ b/.mailmap > @@ -15,6 +15,7 @@ > # Proper Name > # Proper Name Commit Name > > +AKASHI Takahiro > Alexander Graf > Allen Martin > Amanda Baze > -- > 2.43.0 > Acked-by: Ilias Apalodimas

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

2024-04-18 Thread Ilias Apalodimas
updated correclty - Append to the variable and check VarToFile changes - Try to delete VarToFile which is write protected - Try to add/delete runtime variables - Verify VarToFile contains a valid file format Signed-off-by: Ilias Apalodimas --- .../efi_selftest_variables_runtime.c | 197

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

2024-04-18 Thread Ilias Apalodimas
es 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 +- lib/efi_loader/efi_runtime.c

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

2024-04-18 Thread Ilias Apalodimas
6 61 72 00 |ubootefi.var. | Reviewed-by: Heinrich Schuchardt Signed-off-by: Ilias Apalodimas --- include/efi_loader.h | 4 lib/efi_loader/efi_runtime.c | 19 --- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/include/efi_loader.h

[PATCH v3 1/4] efi_loader: conditionally enable SetvariableRT

2024-04-18 Thread Ilias Apalodimas
t-chapter5-variable-storage Reviewed-by: Heinrich Schuchardt Signed-off-by: Ilias Apalodimas --- lib/efi_loader/Kconfig| 16 +++ lib/efi_loader/efi_runtime.c | 4 + lib/efi_loader/efi_variable.c

[PATCH v3 0/4]

2024-04-18 Thread Ilias Apalodimas
ses of its own so I'll send it once we finalize this one. [0] https://lore.kernel.org/u-boot/20240417101928.119115-1-ilias.apalodi...@linaro.org/T/ [1] https://source.denx.de/u-boot/custodians/u-boot-tpm/-/commit/ce35270aaeb93686d7e013f3b028808e8af88cc0 Regards /Ilias Ilias Apalodimas

Re: [PATCH v2 1/1] efi_loader: typo mstching

2024-04-17 Thread Ilias Apalodimas
u16 *name, const efi_guid_t > *vendor, efi_uintn_t *size) > } > > /** > - * efi_var_collect() - Copy EFI variables mstching attributes mask > + * efi_var_collect() - Copy EFI variables matching attributes mask > * > * @bufp: buffer containing variable collection > * @lenp: buffer length > -- > 2.43.0 > Reviewed-by: Ilias Apalodimas

Re: [PATCH v2] tpm: display warning if using gpio reset with TPM

2024-04-17 Thread Ilias Apalodimas
Hi Tim! > > > > > > > > > > The current logic expects a reset gpio and bails out if it cannot get > > > > > it with a (questionable) goto statement. > > > > > > > > > > You want to invert that logic, and expect no gpio, but only if there > > > > > is > > > > > one you want to warn. > > > > > > >

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

2024-04-17 Thread Ilias Apalodimas
Hi Heinrich, [...] > > { > > int ret = 0; > > > > diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c > > index c8f7a88ba8db..99ad1f35d8f1 100644 > > --- a/lib/efi_loader/efi_runtime.c > > +++ b/lib/efi_loader/efi_runtime.c > > @@ -130,6 +130,8 @@ efi_status_t

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

2024-04-17 Thread Ilias Apalodimas
On Wed, 17 Apr 2024 at 15:28, Heinrich Schuchardt wrote: > > On 17.04.24 12:19, Ilias Apalodimas wrote: > > When we store EFI variables on file we don't allow SetVariable at runtime, > > since the OS doesn't know how to access or write that file. At the same > > time ke

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

2024-04-17 Thread Ilias Apalodimas
Hi Heinrich, [...] > > > > + memset(v2, 0x1, sizeof(v2)); > > ret = runtime->query_variable_info(EFI_VARIABLE_BOOTSERVICE_ACCESS, > > _storage, _storage, > > _size); > > @@ -63,10 +69,107 @@ static int

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

2024-04-17 Thread Ilias Apalodimas
updated correclty - Append to the variable and check VarToFile changes - Try to delete VarToFile which is write protected Signed-off-by: Ilias Apalodimas --- .../efi_selftest_variables_runtime.c | 103 ++ 1 file changed, 103 insertions(+) diff --git a/lib/efi_selftest

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

2024-04-17 Thread Ilias Apalodimas
y: Heinrich Schuchardt Signed-off-by: Ilias Apalodimas --- include/efi_variable.h| 14 ++- lib/charset.c | 2 +- lib/efi_loader/efi_runtime.c | 19 lib/efi_loader/efi_var_common.c | 6 +- lib/efi_loader/efi_var_mem.c | 146

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

2024-04-17 Thread Ilias Apalodimas
6 61 72 00 |ubootefi.var. | Signed-off-by: Ilias Apalodimas --- include/efi_loader.h | 4 lib/efi_loader/efi_runtime.c | 19 --- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/include/efi_loader.h b/include/efi_loader.h index bb51c0281774..69

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

2024-04-17 Thread Ilias Apalodimas
ttps://arm-software.github.io/ebbr/index.html#document-chapter5-variable-storage Signed-off-by: Ilias Apalodimas --- lib/efi_loader/Kconfig| 16 +++ lib/efi_loader/efi_runtime.c | 4 + lib/efi_loader/efi_variable.c

[PATCH v2 0/4] Enable SetVariable at runtime

2024-04-17 Thread Ilias Apalodimas
tps://lore.kernel.org/u-boot/20240406140203.248211-1-ilias.apalodi...@linaro.org/ Ilias Apalodimas (4): efi_loader: conditionally enable SetvariableRT efi_loader: Add OS notifications for SetVariable at runtime efi_loader: add an EFI variable with the file contents efi_selftest: add te

Re: [PATCH v2] tpm: display warning if using gpio reset with TPM

2024-04-17 Thread Ilias Apalodimas
On Wed, 17 Apr 2024 at 09:48, Miquel Raynal wrote: > > Hi Ilias, > > ilias.apalodi...@linaro.org wrote on Wed, 17 Apr 2024 08:40:14 +0300: > > > Hi Miquel > > > > On Mon, 8 Apr 2024 at 10:23, Miquel Raynal > > wrote: > > > > > > Hello, > > > > > > ilias.apalodi...@linaro.org wrote on Thu, 28

Re: [PATCH v2] tpm: display warning if using gpio reset with TPM

2024-04-16 Thread Ilias Apalodimas
Hi Miquel On Mon, 8 Apr 2024 at 10:23, Miquel Raynal wrote: > > Hello, > > ilias.apalodi...@linaro.org wrote on Thu, 28 Mar 2024 09:08:37 +0200: > > > Thanks Tim > > > > On Thu, 28 Mar 2024 at 00:12, Tim Harvey wrote: > > > > > > Instead of displaying what looks like an error message if a > > >

Re: [PATCH] Kconfig: Remove all default n options

2024-04-16 Thread Ilias Apalodimas
depends on CMD_ELF > select LIB_LIBFDT > select LMB > @@ -2573,7 +2572,6 @@ config CMD_CROS_EC > config CMD_SCMI > bool "Enable scmi command" > depends on SCMI_FIRMWARE > - default n > help > This command provides user interfaces to several SCMI (System > Control and Management Interface) protocols available on Arm > -- > 2.44.0 > Reviewed-by: Ilias Apalodimas

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

2024-04-16 Thread Ilias Apalodimas
.var > + default "ubootefi.var" > help > File with initial values of non-volatile UEFI variables. The file > must > be in the same format as the storage in the EFI system partition. > The > -- > 2.44.0 > Reviewed-by: Ilias Apalodimas

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

2024-04-12 Thread Ilias Apalodimas
Hi Tom >From a capsule update POV the patch looks correct Acked-by: Ilias Apalodimas On Wed, 10 Apr 2024 at 02:44, Tom Rini wrote: > > On Tue, Apr 09, 2024 at 06:31:02AM +0200, Heinrich Schuchardt wrote: > > On 4/9/24 00:31, Jonathan Humphreys wrote: > [snip] > > The

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

2024-04-12 Thread Ilias Apalodimas
Hi Jon, On Wed, 10 Apr 2024 at 20:35, Jon Humphreys wrote: > > Ilias Apalodimas writes: > > > On Tue, 9 Apr 2024 at 23:14, Andrew Davis wrote: > >> > >> On 4/9/24 2:26 PM, Heinrich Schuchardt wrote: > >> > On 4/9/24 14:14, Andrew Davis wrote: &g

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

2024-04-11 Thread Ilias Apalodimas
_maybe_unused fat2rtc(u16 date, u16 time, struct rtc_time *tm) > { > tm->tm_mday = date & 0x1f; > - tm->tm_mon = (date & 0x1e0) >> 4; > + tm->tm_mon = (date & 0x1e0) >> 5; > tm->tm_year = (date >> 9) + 1980; > > tm->tm_sec = (time & 0x1f) << 1; > -- > 2.43.0 > Reviewed-by: Ilias Apalodimas

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

2024-04-11 Thread Ilias Apalodimas
VIOLATION. Thanks. > > Reviewed-by: Heinrich Schuchardt > > > goto err; > > } > > > Reviewed-by: Ilias Apalodimas

Re: [PATCH 1/1] efi_loader: sanitize efi_tcg2_final_events_table definition

2024-04-11 Thread Ilias Apalodimas
+ u16 unicode_name[]; > + // u8 variable_data[]; > }; > > /** > -- > 2.43.0 > Reviewed-by: Ilias Apalodimas

Re: [PATCH v1 0/4] Enable SetvariableRT

2024-04-10 Thread Ilias Apalodimas
Hi Mark , I am on a conference, not checking emails too much On Mon, 8 Apr 2024 at 16:16, Mark Kettenis wrote: > > > From: Ilias Apalodimas > > Date: Sat, 6 Apr 2024 17:01:51 +0300 > > > > Hi all, > > Hi Ilias, > > > This is an updated version of

Re: [PATCH 2/2] disk: expose partition type flags

2024-04-10 Thread Ilias Apalodimas
gt; charuuid[UUID_STR_LEN + 1]; /* filesystem UUID as string, if > exists */ > #endif > #ifdef CONFIG_PARTITION_TYPE_GUID > > -- > 2.44.0 > I think this would make more sense to be sent along with the capsule update patches In any case Reviewed-by: Ilias Apalodimas

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

2024-04-10 Thread Ilias Apalodimas
On Tue, 9 Apr 2024 at 23:14, Andrew Davis wrote: > > On 4/9/24 2:26 PM, Heinrich Schuchardt wrote: > > 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. > >>> >

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

2024-04-10 Thread Ilias Apalodimas
Hi both On Wed, 10 Apr 2024 at 10:36, Heinrich Schuchardt wrote: > > 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,

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

2024-04-10 Thread Ilias Apalodimas
anything broken, so can you get rid of this during the merge? Other than that Reviewed-by: Ilias Apalodimas > Signed-off-by: Heinrich Schuchardt > --- > lib/efi_loader/efi_acpi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/efi_loader/efi_a

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

2024-04-08 Thread Ilias Apalodimas
On Mon, 8 Apr 2024 at 11:29, Heinrich Schuchardt wrote: > > On 4/8/24 10:12, Ilias Apalodimas wrote: > > Hi Heinrich > > > > On Mon, 8 Apr 2024 at 09:41, Heinrich Schuchardt wrote: > >> > >> On 4/6/24 16:01, Ilias Apalodimas wrote: > >>> Prev

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

2024-04-08 Thread Ilias Apalodimas
Hi Heinrich On Mon, 8 Apr 2024 at 09:41, Heinrich Schuchardt wrote: > > On 4/6/24 16:01, Ilias Apalodimas wrote: > > Previous patches enabled SetVariableRT using a RAM backend. > > Although EBBR [0] defines a variable format we can teach userspace tools > > and write the

Re: [PATCH v1 2/4] efi_loader: Add OS notifications for SetVariableRT in RAM

2024-04-08 Thread Ilias Apalodimas
Hi Heinrich, > > + > > > > /* Use internal device tree when starting UEFI application */ > > #define EFI_FDT_USE_INTERNAL NULL > > diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c > > index 8ebbea7e5c69..d898ba6c268f 100644 > > --- a/lib/efi_loader/efi_runtime.c > >

Re: [PATCH v1 0/4] Enable SetvariableRT

2024-04-07 Thread Ilias Apalodimas
Hi Mark On Mon, 8 Apr 2024 at 00:53, Mark Kettenis wrote: > > > From: Ilias Apalodimas > > > > Hi all, > > > > This is an updated version of [0]. > > > > When EFI variables are stored on file we don't allow SetVariableRT, > > since t

Re: [PATCH v3] tpm-v2: allow algoirthm name to be configured for pcr_read and pcr_extend

2024-04-06 Thread Ilias Apalodimas
Hi Tim, Thanks for the patch I'll be away next week, I'll try to find time and take a closer look. The pipeline [0] shows some TPM related failures [0] https://source.denx.de/u-boot/custodians/u-boot-tpm/-/commit/9b4be64e41454e17269a968397933eeff300c380 Cheers /Ilias On Fri, 5 Apr 2024 at

[PATCH v1 4/4] efi_selftest: add tests for setvariableRT

2024-04-06 Thread Ilias Apalodimas
updated correclty - Append to the variable and check VarToFile changes - Try to delete VarToFile which is write protected Signed-off-by: Ilias Apalodimas --- .../efi_selftest_variables_runtime.c | 103 ++ 1 file changed, 103 insertions(+) diff --git a/lib/efi_selftest

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

2024-04-06 Thread Ilias Apalodimas
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 Suggested-by:Ard Biesheuvel # dumping all variables to a variable Signed-off-

[PATCH v1 2/4] efi_loader: Add OS notifications for SetVariableRT in RAM

2024-04-06 Thread Ilias Apalodimas
6 61 72 00 |ubootefi.var. | Signed-off-by: Ilias Apalodimas --- include/efi_loader.h | 4 lib/efi_loader/efi_runtime.c | 4 lib/efi_loader/efi_variable.c | 20 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/include/efi_loader.h

[PATCH v1 1/4] efi_loader: conditionally enable SetvariableRT

2024-04-06 Thread Ilias Apalodimas
ub.io/ebbr/index.html#document-chapter5-variable-storage Signed-off-by: Ilias Apalodimas --- lib/efi_loader/Kconfig| 16 +++ lib/efi_loader/efi_runtime.c | 5 + lib/efi_loader/efi_variable.c

[PATCH v1 0/4] Enable SetvariableRT

2024-04-06 Thread Ilias Apalodimas
_PROTECTED checks for BS, RT *only* variables - Add 2 EFI variables and allow userspace to write the file - Add selftests Ilias Apalodimas (4): efi_loader: conditionally enable SetvariableRT efi_loader: Add OS notifications for SetVariableRT in RAM efi_loader: add an EFI variable with the var

[PATCH v1 4/4] efi_selftest: add tests for setvariableRT

2024-04-06 Thread Ilias Apalodimas
updated correclty - Append to the variable and check VarToFile changes - Try to delete VarToFile which is write protected Signed-off-by: Ilias Apalodimas --- .../efi_selftest_variables_runtime.c | 103 ++ 1 file changed, 103 insertions(+) diff --git a/lib/efi_selftest

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

2024-04-06 Thread Ilias Apalodimas
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 Suggested-by:Ard Biesheuvel # dumping all variables to a variable Signed-off-

[PATCH v1 2/4] efi_loader: Add OS notifications for SetVariableRT in RAM

2024-04-06 Thread Ilias Apalodimas
6 61 72 00 |ubootefi.var. | Signed-off-by: Ilias Apalodimas --- include/efi_loader.h | 4 lib/efi_loader/efi_runtime.c | 4 lib/efi_loader/efi_variable.c | 20 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/include/efi_loader.h

[PATCH v1 1/4] efi_loader: conditionally enable SetvariableRT

2024-04-06 Thread Ilias Apalodimas
ub.io/ebbr/index.html#document-chapter5-variable-storage Signed-off-by: Ilias Apalodimas --- lib/efi_loader/Kconfig| 16 +++ lib/efi_loader/efi_runtime.c | 5 + lib/efi_loader/efi_variable.c

[PATCH v1 0/4] Enable SetvariableRT

2024-04-06 Thread Ilias Apalodimas
_PROTECTED checks for BS, RT *only* variables - Add 2 EFI variables and allow userspace to write the file - Add selftests Ilias Apalodimas (4): efi_loader: conditionally enable SetvariableRT efi_loader: Add OS notifications for SetVariableRT in RAM efi_loader: add an EFI variable with the var

Re: [PATCH] efi_loader: access __efi_runtime_start/stop without

2024-04-05 Thread Ilias Apalodimas
On Fri, 5 Apr 2024 at 10:12, Heinrich Schuchardt wrote: > > On 4/4/24 08:35, Ilias Apalodimas wrote: > > A symbol defined in a linker script (e.g. __efi_runtime_start = .;) is > > only a symbol, not a variable and should not be dereferenced. > > The common p

Re: [PATCH 1/1] efi_loader: eliminate duplicate runtime section definitions

2024-04-05 Thread Ilias Apalodimas
100644 > --- a/lib/efi_loader/efi_memory.c > +++ b/lib/efi_loader/efi_memory.c > @@ -15,6 +15,7 @@ > #include > #include > #include > +#include > #include > #include > > -- > 2.43.0 > Reviewed-by: Ilias Apalodimas

[PATCH v2] efi_loader: move efi_var_collect to common functions

2024-04-05 Thread Ilias Apalodimas
From: Ilias Apalodimas efi_var_collect() was initially placed in efi_var_file.c, since back then we only supported efi variables stored in a file. Since then we support variables stored in an RPMB as well and use that function to collect variables that should be present at runtime. So let's

Re: [PATCH] efi_loader: move efi_var_collect to common functions

2024-04-05 Thread Ilias Apalodimas
On Fri, 5 Apr 2024 at 09:33, Heinrich Schuchardt wrote: > > On 4/4/24 09:48, Ilias Apalodimas wrote: > > From: Ilias Apalodimas > > > > efi_var_collect() was initially placed in efi_var_file.c, since back > > then we only supported efi variables stored in a f

Re: [PATCH v2 4/4] boot: correct finding the default EFI binary

2024-04-04 Thread Ilias Apalodimas
tline(" 4 extlinux ready mmc 1 > mmc1.bootdev.part_1 /extlinux/extlinux.conf"); > - ut_assert_nextline(" 5 efi fs mmc 1 > mmc1.bootdev.part_1 efi/boot/bootsbox.efi"); > + ut_assert_nextline(" 5 efi fs mmc 1 > mmc1.bootdev.part_1 /EFI/BOOT/" > + BOOTEFI_NAME); > > ut_assert_skip_to_line("Scanning bootdev 'mmc0.bootdev':"); > ut_assert_skip_to_line( > -- > 2.43.0 > Reviewed-by: Ilias Apalodimas Tested-by: Ilias Apalodimas

Re: [PATCH v2 3/4] efi_loader: move HOST_ARCH to version_autogenerated.h

2024-04-04 Thread Ilias Apalodimas
lusion implicitly depends on it > > -asflags-y += -DHOST_ARCH="$(HOST_ARCH)" -I. > -ccflags-y += -DHOST_ARCH="$(HOST_ARCH)" > +asflags-y += -I. > > CFLAGS_efi_boottime.o += \ >-DFW_VERSION="0x$(VERSION)" \ > -- > 2.43.0 > Acked-by: Ilias Apalodimas

Re: [PATCH v2 2/4] boot: enable booting via EFI boot manager by default

2024-04-04 Thread Ilias Apalodimas
gt; bool "UEFI Boot Manager" > default y > - select BOOTMETH_GLOBAL if BOOTSTD > help > Select this option if you want to select the UEFI binary to be > booted > via UEFI variables Boot, BootOrder, and BootNext. You should > also > -- > 2.43.0 > Reviewed-by: Ilias Apalodimas

Re: [PATCH v2 1/4] boot: correct the default sequence of boot methods

2024-04-04 Thread Ilias Apalodimas
t_test_state *uts) > if (!IS_ENABLED(CONFIG_EFI_BOOTMGR)) > return -EAGAIN; > ut_assertok(uclass_first_device_err(UCLASS_BOOTSTD, )); > - ut_assertok(device_bind(bootstd, DM_DRIVER_GET(bootmeth_efi_mgr), > + ut_assertok(device_bind(bootstd, DM_DRIVER_GET(bootmeth_3efi_mgr), > "efi_mgr", 0, ofnode_null(), )); > ut_assertok(device_probe(dev)); > sandbox_set_fake_efi_mgr_dev(dev, true); > -- > 2.43.0 > Reviewed-by: Ilias Apalodimas

Re: [PATCH v4 2/5] cmd: optee_rpmb: close tee session

2024-04-04 Thread Ilias Apalodimas
Hi Igor, On Thu, 4 Apr 2024 at 14:40, Igor Opaniuk wrote: > > Ilias, > > On Thu, Apr 4, 2024 at 1:00 PM Ilias Apalodimas > wrote: >> >> Hi Igor, >> >> On Thu, 4 Apr 2024 at 13:18, Igor Opaniuk wrote: >> > >> > Hi Ilias, >> >

Re: [PATCH v1] MAINTAINERS: add entries for tee-related orphaned files

2024-04-04 Thread Ilias Apalodimas
drivers/firmware/scmi/optee_agent.c > F: drivers/tee/ > +F: include/sandboxtee.h > F: include/tee.h > F: include/tee/ > +F: include/test/optee.h > +F: test/dm/tee.c > +F: test/optee/ > +F: test/py/tests/test_optee_rpmb.py > > TEE-lib > M: Bryan O'Donoghue > -- > 2.34.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH v4 2/5] cmd: optee_rpmb: close tee session

2024-04-04 Thread Ilias Apalodimas
Hi Igor, On Thu, 4 Apr 2024 at 13:18, Igor Opaniuk wrote: > > Hi Ilias, > > On Thu, Apr 4, 2024 at 10:54 AM Ilias Apalodimas > wrote: >> >> Hi Igor, >> >> On Thu, 4 Apr 2024 at 11:40, Ilias Apalodimas >> wrote: >> > >> > Hi Igor,

Re: [PATCH v4 2/5] cmd: optee_rpmb: close tee session

2024-04-04 Thread Ilias Apalodimas
Hi Igor, On Thu, 4 Apr 2024 at 11:40, Ilias Apalodimas wrote: > > Hi Igor, > > I was about to apply the series, but noticed neither me or Jens were cc'ed > on this. Adding Jens to the party > > On Thu, Apr 04, 2024 at 10:13:49AM +0200, Igor Opaniuk wrote: > > Add ca

  1   2   3   4   5   6   7   8   9   10   >