Re: [PATCH v2 1/1] efi_loader: simplify efi_uninstall_protocol()

2023-06-18 Thread Ilias Apalodimas
Hi Heinrich On Sun, Jun 18, 2023 at 12:25:47PM +0200, Heinrich Schuchardt wrote: > The call to efi_search_obj() is redundant as the function is called in > efi_search_protocol() too. > > Signed-off-by: Heinrich Schuchardt > --- > v2: > Use handle instead of efiobj to invoke

[PATCH] doc: qemu: switch swtpm instruction to 'tpm autostart'

2023-06-16 Thread Ilias Apalodimas
We don't have a documentation page for our TPM subsystem. I plan on sending one in the future, but in the meantime document the new 'tpm autostart' command in the QEMU instructions while using a SWTPM Signed-off-by: Ilias Apalodimas --- doc/board/emulation/qemu-arm.rst | 2 +- 1 file changed

Re: [v1] disable NFS support by default

2023-06-16 Thread Ilias Apalodimas
git a/configs/tec_defconfig b/configs/tec_defconfig > index 461c46c725d..8a5d959a5c0 100644 > --- a/configs/tec_defconfig > +++ b/configs/tec_defconfig > @@ -31,7 +31,6 @@ CONFIG_CMD_GPIO=y > CONFIG_CMD_MMC=y > CONFIG_CMD_USB=y > # CONFIG_CMD_SETEXPR is not set > -# CONFIG_CMD_NFS is not set > CONFIG_CMD_PMIC=y > CONFIG_CMD_REGULATOR=y > CONFIG_CMD_EXT4_WRITE=y > diff --git a/configs/theadorable-x86-conga-qa3-e3845-pcie-x4_defconfig > b/configs/theadorable-x86-conga-qa3-e3845-pcie-x4_defconfig > index 43dab09316e..69499e17f4c 100644 > --- a/configs/theadorable-x86-conga-qa3-e3845-pcie-x4_defconfig > +++ b/configs/theadorable-x86-conga-qa3-e3845-pcie-x4_defconfig > @@ -38,7 +38,6 @@ CONFIG_CMD_SPI=y > CONFIG_CMD_USB=y > CONFIG_CMD_DHCP=y > CONFIG_BOOTP_BOOTFILESIZE=y > -# CONFIG_CMD_NFS is not set > CONFIG_CMD_PING=y > CONFIG_CMD_BMP=y > CONFIG_CMD_TIME=y > diff --git a/configs/theadorable-x86-conga-qa3-e3845_defconfig > b/configs/theadorable-x86-conga-qa3-e3845_defconfig > index 5aec52733e6..e2e64b74349 100644 > --- a/configs/theadorable-x86-conga-qa3-e3845_defconfig > +++ b/configs/theadorable-x86-conga-qa3-e3845_defconfig > @@ -37,7 +37,6 @@ CONFIG_CMD_SPI=y > CONFIG_CMD_USB=y > CONFIG_CMD_DHCP=y > CONFIG_BOOTP_BOOTFILESIZE=y > -# CONFIG_CMD_NFS is not set > CONFIG_CMD_PING=y > CONFIG_CMD_BMP=y > CONFIG_CMD_TIME=y > diff --git a/configs/theadorable-x86-dfi-bt700_defconfig > b/configs/theadorable-x86-dfi-bt700_defconfig > index d5a28a2df4b..751ae3497ec 100644 > --- a/configs/theadorable-x86-dfi-bt700_defconfig > +++ b/configs/theadorable-x86-dfi-bt700_defconfig > @@ -35,7 +35,6 @@ CONFIG_CMD_SPI=y > CONFIG_CMD_USB=y > CONFIG_CMD_DHCP=y > CONFIG_BOOTP_BOOTFILESIZE=y > -# CONFIG_CMD_NFS is not set > CONFIG_CMD_PING=y > CONFIG_CMD_BMP=y > CONFIG_CMD_TIME=y > diff --git a/configs/trimslice_defconfig b/configs/trimslice_defconfig > index d94a0b408b5..9ec08bda883 100644 > --- a/configs/trimslice_defconfig > +++ b/configs/trimslice_defconfig > @@ -35,7 +35,6 @@ CONFIG_CMD_PCI=y > CONFIG_CMD_SPI=y > CONFIG_CMD_USB=y > # CONFIG_CMD_SETEXPR is not set > -# CONFIG_CMD_NFS is not set > CONFIG_CMD_EXT4_WRITE=y > # CONFIG_SPL_DOS_PARTITION is not set > # CONFIG_SPL_EFI_PARTITION is not set > diff --git a/configs/venice2_defconfig b/configs/venice2_defconfig > index fd538da3ac5..ebd1754fc8b 100644 > --- a/configs/venice2_defconfig > +++ b/configs/venice2_defconfig > @@ -36,7 +36,6 @@ CONFIG_CMD_SPI=y > CONFIG_CMD_USB=y > CONFIG_CMD_USB_MASS_STORAGE=y > # CONFIG_CMD_SETEXPR is not set > -# CONFIG_CMD_NFS is not set > CONFIG_CMD_EXT4_WRITE=y > # CONFIG_SPL_DOS_PARTITION is not set > # CONFIG_SPL_EFI_PARTITION is not set > diff --git a/configs/ventana_defconfig b/configs/ventana_defconfig > index 5e2ff877ca8..2da8ba94d62 100644 > --- a/configs/ventana_defconfig > +++ b/configs/ventana_defconfig > @@ -29,7 +29,6 @@ CONFIG_CMD_GPIO=y > CONFIG_CMD_MMC=y > CONFIG_CMD_USB=y > # CONFIG_CMD_SETEXPR is not set > -# CONFIG_CMD_NFS is not set > CONFIG_CMD_PMIC=y > CONFIG_CMD_REGULATOR=y > CONFIG_CMD_EXT4_WRITE=y > diff --git a/configs/vexpress_ca9x4_defconfig > b/configs/vexpress_ca9x4_defconfig > index 4ee64c332b3..5cacecc7cbc 100644 > --- a/configs/vexpress_ca9x4_defconfig > +++ b/configs/vexpress_ca9x4_defconfig > @@ -30,7 +30,6 @@ CONFIG_CMD_MMC=y > # CONFIG_CMD_ITEST is not set > # CONFIG_CMD_SETEXPR is not set > CONFIG_BOOTP_BOOTFILESIZE=y > -# CONFIG_CMD_NFS is not set > # CONFIG_CMD_SLEEP is not set > CONFIG_CMD_UBI=y > CONFIG_OF_CONTROL=y > -- > 2.41.0 > Reviewed-by: Ilias Apalodimas

[PATCH 5/5] efi_selftests: add extra testcases on controller handling

2023-06-15 Thread Ilias Apalodimas
fails - add tests to make sure EFI_NOT_FOUND is returned if a non existent interface is being removed Signed-off-by: Ilias Apalodimas --- lib/efi_selftest/efi_selftest_controllers.c | 221 ++-- 1 file changed, 198 insertions(+), 23 deletions(-) diff --git a/lib/efi_selftest

[PATCH 2/5] efi_loader: reconnect drivers on failure

2023-06-15 Thread Ilias Apalodimas
efi_disconnect_controller() doesn't reconnect drivers in case of failure. Reconnect the disconnected drivers properly Signed-off-by: Ilias Apalodimas --- lib/efi_loader/efi_boottime.c | 31 ++- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/lib

[PATCH 3/5] efi_loader: disconnect all controllers when uninstalling a protocol

2023-06-15 Thread Ilias Apalodimas
efi_disconnect_all_drivers() with a handle instead of the efiobj Signed-off-by: Ilias Apalodimas --- lib/efi_loader/efi_boottime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index df675d0ad488..b148824c7ec5 100644

[PATCH 4/5] efi_loader: fix the return codes of UninstallProtocol

2023-06-15 Thread Ilias Apalodimas
is not allowed to unbind -- e.g returning EFI_DEVICE_ERROR, we will end up returning that error instead of EFI_NOT_FOUND. Add an extra check on the top of the function to make sure the protocol interface exists before trying to disconnect any drivers Signed-off-by: Ilias Apalodimas --- lib

[PATCH 1/5] efi_loader: check the status of disconnected drivers

2023-06-15 Thread Ilias Apalodimas
efi_uninstall_protocol() calls efi_disconnect_all_drivers() but never checks the return value. Honor that and return an appropriate error if the associated controllers failed to disconnect Signed-off-by: Ilias Apalodimas --- lib/efi_loader/efi_boottime.c | 6 +- 1 file changed, 5

[PATCH 2/2] efi_loader: make efi_remove_protocol() static

2023-06-15 Thread Ilias Apalodimas
convert all these to efi_install_multiple_protocol_interfaces() and treat efi_add_protocol() in a similar manner Signed-off-by: Ilias Apalodimas --- include/efi_loader.h | 4 lib/efi_loader/efi_boottime.c | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git

[PATCH 1/2] efi_loader: use efi_install_multiple_protocol_interfaces()

2023-06-15 Thread Ilias Apalodimas
The tcg protocol currently adds and removes protocols with efi_(add/remove)_protocol(). Although this works fine protocol interfaces should be installed using the EFI API functions instead of the internal API ones Signed-off-by: Ilias Apalodimas --- lib/efi_loader/efi_tcg2.c | 8 1

[PATCH v2] efi_selftests: fix controllers repeated selftesting

2023-06-14 Thread Ilias Apalodimas
ten check when uninstalling protocols from the handle_controller and make sure the number of child controllers is 0 Signed-off-by: Ilias Apalodimas --- Changes since v1: - Move the binding protocol removal to .teardown() - return EFI_ST_FAILURE if the last count_child_controllers() fails li

Re: [PATCH] efi_selftests: fix controllers repeated selftesting

2023-06-13 Thread Ilias Apalodimas
Hi Heinrich, On Tue, 13 Jun 2023 at 18:00, Heinrich Schuchardt wrote: > > On 6/13/23 15:23, Ilias Apalodimas wrote: > > Running the controller selftest more than one times fails with > > > > => setenv efi_selftest 'controllers' && bootefi selftest > > Te

[PATCH] efi_selftests: fix protocol repeated selftesting

2023-06-13 Thread Ilias Apalodimas
d freeing them. As a result the subsequent protocol installation will try to use an existing handle which we just removed that from our object list. Signed-off-by: Ilias Apalodimas --- lib/efi_selftest/efi_selftest_manageprotocols.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/li

[PATCH] efi_selftests: fix controllers repeated selftesting

2023-06-13 Thread Ilias Apalodimas
ten check when uninstalling protocols from the handle_controller and make sure the number of child controllers is 0 Signed-off-by: Ilias Apalodimas --- lib/efi_selftest/efi_selftest_controllers.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/li

Pull request for tpm-for_tom-13062023

2023-06-13 Thread Ilias Apalodimas
a command line for that function and simplify our CLI. Ilias Apalodimas (3): tpm: Add 'tpm autostart' shell command test/py: replace 'tpm2 init, startup, selftest' sequences test/py: Account PCR updates properly during

Re: [PATCH 3/3 v2] test/py: Account PCR updates properly during testing

2023-06-12 Thread Ilias Apalodimas
On Mon, Jun 12, 2023 at 10:17:28PM +0100, Simon Glass wrote: > Hi Ilias, > > On Wed, 7 Jun 2023 at 10:18, Ilias Apalodimas > wrote: > > > > Currently we only read the pcr updates once on test_tpm2_pcr_read(). > > It turns out that the tpm init sequence

[PATCH] efi_loader: fix sphinx conformance for efi_disk_remove()

2023-06-12 Thread Ilias Apalodimas
The function does not to conform to the Sphinx style documentation. Add the missing bits Signed-off-by: Ilias Apalodimas --- Heinrich, this only applies on top of my rework for the function lib/efi_loader/efi_disk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib

[PATCH v2] efi_loader: simplify efi_disk_remove

2023-06-12 Thread Ilias Apalodimas
efi_disk_delete_raw/blk calls. Signed-off-by: Ilias Apalodimas --- - Fix CI issues. dev_tag_get_ptr() is called for UCLASS_BLK or UCLASS_PARTITION only lib/efi_loader/efi_disk.c | 80 ++- 1 file changed, 19 insertions(+), 61 deletions(-) diff --git a/lib

Re: [PATCH] efi_loader: simplify efi_disk_remove

2023-06-12 Thread Ilias Apalodimas
Heinrich, Ignore this version, I've found one problem, I'll send a v2 shortly. Thanks /Ilias On Mon, 12 Jun 2023 at 13:07, Ilias Apalodimas wrote: > > Instead of discovering the ID of the device and call two different > functions for a block device or a partition, we ca

[PATCH] efi_loader: simplify efi_disk_remove

2023-06-12 Thread Ilias Apalodimas
-0.01% Signed-off-by: Ilias Apalodimas --- lib/efi_loader/efi_disk.c | 82 +++ 1 file changed, 22 insertions(+), 60 deletions(-) diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index d2256713a8e7..8ab476b02445 100644 --- a/lib/efi_loader

Re: [PATCH v6 1/7] dt/bindings: fwu-mdata-mtd: drop changes outside FWU

2023-06-09 Thread Ilias Apalodimas
ventually before we hand over the dtb into linux, but that's a different story. In any case as long as the DT comes from u-boot I don't think we will have a risk of introducing compatibility issues if we ever upstream this and go back to the old format. Acked-by: Ilias Apalodimas > There ex

Re: [lwip-devel] [RFC PATCH 0/5] LWIP stack integration

2023-06-08 Thread Ilias Apalodimas
--328 > ping_receive 332 --332 > pxe_get 376 --376 > nfs_read_reply 396 --396 > wget_send_stored 444 --444 &g

Re: [PATCH v9 10/10] test/py: efi_capsule: test for FMP versioning

2023-06-07 Thread Ilias Apalodimas
quot; > +disk_img = efi_capsule_data > +capsule_files = ['Test113'] > +with u_boot_console.log.section('Test Case 5-a, before reboot'): > +setup(u_boot_console, disk_img, '0x0004') > +init_content(u_boot_console, '10', 'u-boot.bin.old', 'Old') > +place_capsule_file(u_boot_console, capsule_files) > + > +do_reboot_dtb_specified(u_boot_config, u_boot_console, > 'test_ver.dtb') > + > +capsule_early = u_boot_config.buildconfig.get( > +'config_efi_capsule_on_disk_early') > +with u_boot_console.log.section('Test Case 5-b, after reboot'): > +if not capsule_early: > +exec_manual_update(u_boot_console, disk_img, capsule_files) > + > +check_file_removed(u_boot_console, disk_img, capsule_files) > + > +verify_content(u_boot_console, '10', 'u-boot:Old') > diff --git a/test/py/tests/test_efi_capsule/version.dts > b/test/py/tests/test_efi_capsule/version.dts > new file mode 100644 > index 00..07850cc606 > --- /dev/null > +++ b/test/py/tests/test_efi_capsule/version.dts > @@ -0,0 +1,24 @@ > +// SPDX-License-Identifier: GPL-2.0+ > + > +/dts-v1/; > +/plugin/; > + > +&{/} { > + firmware-version { > + image1 { > + lowest-supported-version = <3>; > + image-index = <1>; > + image-type-id = > "09D7CF52-0720-4710-91D1-08469B7FE9C8"; > + }; > + image2 { > + lowest-supported-version = <7>; > + image-index = <2>; > + image-type-id = > "5A7021F5-FEF2-48B4-AABA-832E777418C0"; > + }; > + image3 { > + lowest-supported-version = <3>; > + image-index = <1>; > + image-type-id = > "3673B45D-6A7C-46F3-9E60-ADABB03F7937"; > + }; > + }; > +}; > -- > 2.34.1 > Acked-by: Ilias Apalodimas

Re: [PATCH v9 09/10] test: efi_capsule: refactor efi_capsule test

2023-06-07 Thread Ilias Apalodimas
On Wed, 7 Jun 2023 at 08:43, Masahisa Kojima wrote: > > Current efi capsule python tests have much code duplication. > This commit creates the common function > in test/py/tests/test_efi_capsule/capsule_common.py, > aim to reduce the code size and improve maintainability. > > Reviewed-by: Simon

Re: [lwip-devel] [RFC PATCH 0/5] LWIP stack integration

2023-06-07 Thread Ilias Apalodimas
23, Tom Rini wrote: >> > >> >> On Mon, May 22, 2023 at 12:40:49PM -0400, Maxim Uvarov wrote: >> >>> On Mon, 22 May 2023 at 10:20, Tom Rini wrote: >> >>> >> >>>> On Mon, May 22, 2023 at 04:33:57PM +0300, Ilias Apalodimas w

[PATCH 3/3 v2] test/py: Account PCR updates properly during testing

2023-06-07 Thread Ilias Apalodimas
on the initial value, reread the 'known updates' just before updating the PCR to ensure we read the correct values before testing Signed-off-by: Ilias Apalodimas --- Changes since v1: - new patch to fix the python testing failures test/py/tests/test_tpm2.py | 6 ++ 1 file changed, 6 inse

[PATCH 2/3 v2] test/py: replace 'tpm2 init, startup, selftest' sequences

2023-06-07 Thread Ilias Apalodimas
Instead of copy pasting the commands needed to start a TPM consisting of: - tpm init - tpm startup TPM2_SU_CLEAR - tpm2 self_test full use the newly added 'autostart' which does the same thing and simplify our python scripts Signed-off-by: Ilias Apalodimas Reviewed-by: Simon Glass --- Changes

[PATCH 1/3 v2] tpm: Add 'tpm autostart' shell command

2023-06-07 Thread Ilias Apalodimas
nit() only, doesn't allow a someone to use the TPM since the startup sequence is mandatory. We always repeat the pattern of calling - tpm_init() - tpm_startup() - tpm_self_test_full() or tpm_continue_self_test() Signed-off-by: Ilias Apalodimas Reviewed-by: Simon Glass --- - Changes since v1: None

[PATCH 0/3 v2] tpm: add 'tpm autostart command'

2023-06-07 Thread Ilias Apalodimas
-ilias.apalodi...@linaro.org/ Ilias Apalodimas (3): tpm: Add 'tpm autostart' shell command test/py: replace 'tpm2 init, startup, selftest' sequences test/py: Account PCR updates properly during testing cmd/tpm-common.c | 16 cmd/tpm-user-utils.h | 1 + cmd/tpm-v1.c

Re: [PATCH v8 3/4] Boot var automatic management for removable medias

2023-06-07 Thread Ilias Apalodimas
On Wed, 7 Jun 2023 at 10:27, AKASHI Takahiro wrote: > > On Wed, Jun 07, 2023 at 10:00:37AM +0300, Ilias Apalodimas wrote: > > On Wed, 7 Jun 2023 at 09:52, AKASHI Takahiro > > wrote: > > > > > > On Wed, Jun 07, 2023 at 09:38:30AM +0300, Ilias Apalodimas wrote:

Re: [PATCH v8 3/4] Boot var automatic management for removable medias

2023-06-07 Thread Ilias Apalodimas
On Wed, 7 Jun 2023 at 09:52, AKASHI Takahiro wrote: > > On Wed, Jun 07, 2023 at 09:38:30AM +0300, Ilias Apalodimas wrote: > > On Wed, 7 Jun 2023 at 03:41, AKASHI Takahiro > > wrote: > > > > > > On Tue, Jun 06, 2023 at 09:37:20AM -0700, Raymond Mao wrote:

Re: [PATCH v8 3/4] Boot var automatic management for removable medias

2023-06-07 Thread Ilias Apalodimas
Won't exiting u-boot to jump to the OS call all the _remove() functions? Thanks /Ilias > > -Takahiro Akashi > > > Signed-off-by: Raymond Mao > > Reviewed-by: Heinrich Schuchardt > > Reviewed-by: Ilias Apalodimas > > --- > > Changes i

Re: [PATCH v8 1/4] Move bootorder and bootoption apis to lib

2023-06-06 Thread Ilias Apalodimas
ut; > + > + /* enumerate all devices supporting EFI_SIMPLE_FILE_SYSTEM_PROTOCOL */ > + ret = efi_bootmgr_enumerate_boot_option(opt, volume_handles, count); > + if (ret != EFI_SUCCESS) > + goto out; > + > + /* > + * System hardware configuration may vary depending on the user setup. > + * The boot option is automatically added by the bootmenu. > + * If the device is not attached to the system, the boot option needs > + * to be deleted. > + */ > + ret = efi_bootmgr_delete_invalid_boot_option(opt, count); > + if (ret != EFI_SUCCESS) > + goto out; > + > + /* add non-existent boot option */ > + for (i = 0; i < count; i++) { > + u32 boot_index; > + u16 var_name[9]; > + > + if (!opt[i].exist) { > + ret = efi_bootmgr_get_unused_bootoption(var_name, > sizeof(var_name), > + _index); > + if (ret != EFI_SUCCESS) > + goto out; > + > + ret = efi_set_variable_int(var_name, > _global_variable_guid, > +EFI_VARIABLE_NON_VOLATILE | > + > EFI_VARIABLE_BOOTSERVICE_ACCESS | > +EFI_VARIABLE_RUNTIME_ACCESS, > +opt[i].size, opt[i].lo, > false); > + if (ret != EFI_SUCCESS) > + goto out; > + > + ret = efi_bootmgr_append_bootorder(boot_index); > + if (ret != EFI_SUCCESS) { > + efi_set_variable_int(var_name, > _global_variable_guid, > + 0, 0, NULL, false); > + goto out; > + } > + } > + } > + > +out: > + if (opt) { > + for (i = 0; i < count; i++) > + free(opt[i].lo); > + } > + free(opt); > + efi_free_pool(volume_handles); > + > + return ret; > +} > diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c > index 1f4ab2b419..cdfd16ea77 100644 > --- a/lib/efi_loader/efi_helper.c > +++ b/lib/efi_loader/efi_helper.c > @@ -257,3 +257,28 @@ efi_status_t efi_next_variable_name(efi_uintn_t *size, > u16 **buf, efi_guid_t *gu > > return ret; > } > + > +/** > + * efi_search_bootorder() - search the boot option index in BootOrder > + * > + * @bootorder: pointer to the BootOrder variable > + * @num: number of BootOrder entry > + * @target: target boot option index to search > + * @index: pointer to store the index of BootOrder variable > + * Return: true if exists, false otherwise > + */ > +bool efi_search_bootorder(u16 *bootorder, efi_uintn_t num, u32 target, u32 > *index) > +{ > + u32 i; > + > + for (i = 0; i < num; i++) { > + if (target == bootorder[i]) { > + if (index) > + *index = i; > + > + return true; > + } > + } > + > + return false; > +} > -- > 2.25.1 > One nitpick when moving around efi_bootmgr_get_unused_bootoption(). The unused boot option number has nothing to do with the boot manager. I think moving it to lib/efi_loader/efi_helper.c is a better option. In any case we can do it in a future patch since this one is moves code around from eficonfig to the efibootmgr. Reviewed-by: Ilias Apalodimas

Re: [PATCH v8 2/4] Fix incorrect return code of boot option update

2023-06-06 Thread Ilias Apalodimas
ffer_int() will return EFI_NOT_FOUND. > > And if we don't convert it to EFI_SUCCESS here, > > efi_bootmgr_update_media_device_boot_option() > > will return EFI_NOT_FOUND and then efi_init_obj_list() fails. > > This leads to the efi init failure and it will just prompt 'Error: > >

Re: [PATCH v8 2/4] Fix incorrect return code of boot option update

2023-06-06 Thread Ilias Apalodimas
On Tue, 6 Jun 2023 at 22:23, Ilias Apalodimas wrote: > > Hi Raymond > > On Tue, 6 Jun 2023 at 19:37, Raymond Mao wrote: > > > > Correct the return code for out-of-memory and no boot option found > > > > Signed-off-by: Raymond Mao > > Reviewed-by: I

Re: [PATCH v8 2/4] Fix incorrect return code of boot option update

2023-06-06 Thread Ilias Apalodimas
Hi Raymond On Tue, 6 Jun 2023 at 19:37, Raymond Mao wrote: > > Correct the return code for out-of-memory and no boot option found > > Signed-off-by: Raymond Mao > Reviewed-by: Ilias Apalodimas > --- > Changes in v7 > - new patch file created > > cmd/bootmenu

Re: [PATCH v7 1/4] Move bootorder and bootoption apis to lib

2023-06-06 Thread Ilias Apalodimas
handle_t **)_handles); > + if (ret != EFI_SUCCESS) > + return ret; > + > + opt = calloc(count, sizeof(struct eficonfig_media_boot_option)); > + if (!opt) > + goto out; > + > + /* enumerate all devices supporting EFI_SIMPLE_FILE_SYSTEM_PROTOCOL */ > + ret = efi_bootmgr_enumerate_boot_option(opt, volume_handles, count); > + if (ret != EFI_SUCCESS) > + goto out; > + > + /* > + * System hardware configuration may vary depending on the user setup. > + * The boot option is automatically added by the bootmenu. > + * If the device is not attached to the system, the boot option needs > + * to be deleted. > + */ > + ret = efi_bootmgr_delete_invalid_boot_option(opt, count); > + if (ret != EFI_SUCCESS) > + goto out; > + > + /* add non-existent boot option */ > + for (i = 0; i < count; i++) { > + u32 boot_index; > + u16 var_name[9]; > + > + if (!opt[i].exist) { > + ret = efi_bootmgr_get_unused_bootoption(var_name, > sizeof(var_name), > + _index); > + if (ret != EFI_SUCCESS) > + goto out; > + > + ret = efi_set_variable_int(var_name, > _global_variable_guid, > +EFI_VARIABLE_NON_VOLATILE | > + > EFI_VARIABLE_BOOTSERVICE_ACCESS | > +EFI_VARIABLE_RUNTIME_ACCESS, > +opt[i].size, opt[i].lo, > false); > + if (ret != EFI_SUCCESS) > + goto out; > + > + ret = efi_bootmgr_append_bootorder(boot_index); > + if (ret != EFI_SUCCESS) { > + efi_set_variable_int(var_name, > _global_variable_guid, > + 0, 0, NULL, false); > + goto out; > + } > + } > + } > + > +out: > + if (opt) { > + for (i = 0; i < count; i++) > + free(opt[i].lo); > + } > + free(opt); > + efi_free_pool(volume_handles); > + > + return ret; > +} > diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c > index 1f4ab2b419..cdfd16ea77 100644 > --- a/lib/efi_loader/efi_helper.c > +++ b/lib/efi_loader/efi_helper.c > @@ -257,3 +257,28 @@ efi_status_t efi_next_variable_name(efi_uintn_t *size, > u16 **buf, efi_guid_t *gu > > return ret; > } > + > +/** > + * efi_search_bootorder() - search the boot option index in BootOrder > + * > + * @bootorder: pointer to the BootOrder variable > + * @num: number of BootOrder entry > + * @target: target boot option index to search > + * @index: pointer to store the index of BootOrder variable > + * Return: true if exists, false otherwise > + */ > +bool efi_search_bootorder(u16 *bootorder, efi_uintn_t num, u32 target, u32 > *index) > +{ > + u32 i; > + > + for (i = 0; i < num; i++) { > + if (target == bootorder[i]) { > + if (index) > + *index = i; > + > + return true; > + } > + } > + > + return false; > +} > -- > 2.25.1 > Acked-by: Ilias Apalodimas

Re: [PATCH v7 2/4] Fix incorrect return code of boot option update

2023-06-06 Thread Ilias Apalodimas
vices supporting EFI_SIMPLE_FILE_SYSTEM_PROTOCOL */ > ret = efi_bootmgr_enumerate_boot_option(opt, volume_handles, count); > @@ -720,5 +722,7 @@ out: > free(opt); > efi_free_pool(volume_handles); > > + if (ret == EFI_NOT_FOUND) > + return EFI_SUCCESS; > return ret; > } > -- > 2.25.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH v7 3/4] Boot var automatic management for removable medias

2023-06-06 Thread Ilias Apalodimas
W mention the fact that the _remove() callback is always called when we are exiting U-Boot trying to boot and OS, so running the same function in remove doesn't currently make sense. With that addition Reviewed-by: Ilias Apalodimas > Signed-off-by: Raymond Mao > --- > Changes in v3 > - Split the

Re: [PATCH 1/1] Makefile: clean lib/efi_loader/helloworld_efi.S

2023-06-06 Thread Ilias Apalodimas
gt; > --- > > Makefile | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > Reviewed-by: Simon Glass Reviewed-by: Ilias Apalodimas

Re: [PATCH 2/2] test/py: replace 'tpm2 init, startup, selftest' sequences

2023-06-02 Thread Ilias Apalodimas
On Fri, 2 Jun 2023 at 00:51, Simon Glass wrote: > > On Thu, 1 Jun 2023 at 00:21, Ilias Apalodimas > wrote: > > > > Instead of copy pasting the commands needed to start a TPM consisting > > of: > > - tpm init > > - tpm startup TPM2_SU_CLEAR > >

Re: [PATCH 1/2] tpm: Add 'tpm autostart' shell command

2023-06-02 Thread Ilias Apalodimas
On Fri, 2 Jun 2023 at 00:51, Simon Glass wrote: > > Hi Ilias, > > On Thu, 1 Jun 2023 at 00:21, Ilias Apalodimas > wrote: > > > > For a TPM device to be operational we need to initialize it and > > perform its startup sequence. The 'tpm init' command currently c

Re: [PATCH] test: fix comment indentation on tpm tests

2023-06-02 Thread Ilias Apalodimas
Thanks Simon On Fri, 2 Jun 2023 at 00:51, Simon Glass wrote: > > On Thu, 1 Jun 2023 at 00:18, Ilias Apalodimas > wrote: > > > > One out comments is off by one, adjust it > > > > Signed-off-by: Ilias Apalodimas > > --- > > test/dm/tpm.c | 9

Re: [PATCH 1/2] efi_loader: delete handle from events when a protocol is uninstalled

2023-06-01 Thread Ilias Apalodimas
[...] > > > > +/** > > + * efi_handle_cleanup() - Clean the deleted handle from the various lists > > + * @handle: handle to remove > > + * @force: force removal even if protocols are still installed on the > > handle > > + * > > + * Return: status code > > + */ > > +static void

Re: [PATCH 2/2] efi_selftest: check for deleted handles in the event notification list

2023-06-01 Thread Ilias Apalodimas
Hi Heinrich, [...] > > + * @event notified event > > + * @contextpointer to the notification count > > + */ > > +static void EFIAPI test_uninstall_notify(struct efi_event *event, void > > *context) > > +{ > > + return; > > +} > > + > > /* > >* Setup unit test. > >* > > @@

Re: [PATCH 1/2] efi_loader: delete handle from events when a protocol is uninstalled

2023-06-01 Thread Ilias Apalodimas
Heinrich [...] > > diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c > index d5065f296aee..450524ddca2f 100644 > --- a/lib/efi_loader/efi_boottime.c > +++ b/lib/efi_loader/efi_boottime.c > @@ -197,6 +197,35 @@ static bool efi_event_is_queued(struct efi_event *event) >

[PATCH 2/2] efi_selftest: check for deleted handles in the event notification list

2023-06-01 Thread Ilias Apalodimas
(ByRegisterNotify) The last call should return EFI_NOT_FOUND Signed-off-by: Ilias Apalodimas --- Heinrich this is not rebased on top of https://lore.kernel.org/u-boot/20230601070609.14977-1-heinrich.schucha...@canonical.com/ .../efi_selftest_register_notify.c| 61 ++- 1 file

[PATCH 1/2] efi_loader: delete handle from events when a protocol is uninstalled

2023-06-01 Thread Ilias Apalodimas
add the cleanup in that function only, however efi_reinstall_protocol_interface() expects the handle not to be removed. Signed-off-by: Ilias Apalodimas --- lib/efi_loader/efi_boottime.c | 45 +-- 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/lib

Re: [PATCH] configs: synquacer: increase SYS_MALLOC_F_LEN

2023-06-01 Thread Ilias Apalodimas
YNQUACER=y > CONFIG_TEXT_BASE=0x0820 > CONFIG_SYS_MALLOC_LEN=0x100 > -CONFIG_SYS_MALLOC_F_LEN=0x400 > +CONFIG_SYS_MALLOC_F_LEN=0x4000 > CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y > CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xe000 > CONFIG_SF_DEFAULT_SPEED=3125 > -- > 2.34.1 > Acked-by: Ilias Apalodimas

Re: [PATCH v7 4/4] Load option with short device path for boot vars

2023-06-01 Thread Ilias Apalodimas
gt; + /* prefer to short form device path */ > + short_dp = efi_dp_shorten(device_path); > + if (short_dp) > + device_path = short_dp; > + > lo.label = dev_name; > lo.attributes = LOAD_OPTION_ACTIVE; > lo.file_path = device_path; > -- > 2.25.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH 1/1] efi_selftest: LocateHandleBuffer return code

2023-06-01 Thread Ilias Apalodimas
error("LocateHandle did not return EFI_NOT_FOUND\n"); > + return EFI_ST_FAILURE; > + } > ret = boottime->free_pool(context.handles); > if (ret != EFI_SUCCESS) { > efi_st_error("FreePool failed\n"); > -- > 2.39.2 > Reviewed-by: Ilias Apalodimas

[PATCH 2/2] test/py: replace 'tpm2 init, startup, selftest' sequences

2023-06-01 Thread Ilias Apalodimas
Instead of copy pasting the commands needed to start a TPM consisting of: - tpm init - tpm startup TPM2_SU_CLEAR - tpm2 self_test full use the newly added 'autostart' which does the same thing and simplify our python scripts Signed-off-by: Ilias Apalodimas --- test/py/tests/test_tpm2.py | 13

[PATCH 1/2] tpm: Add 'tpm autostart' shell command

2023-06-01 Thread Ilias Apalodimas
nly, doesn't allow a someone to use the TPM since the startup sequence is mandatory. We always repeat the pattern of calling - tpm_init() - tpm_startup() - tpm_self_test_full() or tpm_continue_self_test() Signed-off-by: Ilias Apalodimas --- cmd/tpm-common.c | 16 cmd/tpm-u

[PATCH] test: fix comment indentation on tpm tests

2023-06-01 Thread Ilias Apalodimas
One out comments is off by one, adjust it Signed-off-by: Ilias Apalodimas --- test/dm/tpm.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/dm/tpm.c b/test/dm/tpm.c index 3defb3c3da1f..cde933ab2848 100644 --- a/test/dm/tpm.c +++ b/test/dm/tpm.c @@ -98,10 +98,11

Re: [PATCH] tpm: Make 'tpm init' to call tpm_auto_start()

2023-05-31 Thread Ilias Apalodimas
Hi Simon, On Wed, May 31, 2023 at 09:28:04PM -0600, Simon Glass wrote: > Hi Ilias, > > On Tue, 30 May 2023 at 00:18, Ilias Apalodimas > wrote: > > > > For a TPM device to be operational we need to initialize it and > > perform its startup sequence. The 'tpm

Re: [PATCH] efi_loader: explicitly return EFI_UNSUPPORTED for TCG 1.0 compatibility

2023-05-31 Thread Ilias Apalodimas
Hi Stuart, [...] > >> EFI_TCG2_EVENT_ALGORITHM_BITMAP ActivePcrBanks > >> }; > >> > >> The intent in the TCG spec is for the caller to be able to > >> determine the size of the struct by passing in a small > >> buffer (e.g. 1 byte buffer), and then the firmware > >> should return

Re: [PATCH] efi_loader: explicitly return EFI_UNSUPPORTED for TCG 1.0 compatibility

2023-05-31 Thread Ilias Apalodimas
Hi Stuart, On Wed, 31 May 2023 at 00:20, Stuart Yoder wrote: > > > > On 5/30/23 1:39 AM, Ilias Apalodimas wrote: > > In the EFI TCG spec EFI_TCG2_BOOT_SERVICE_CAPABILITY struct is > > versioned -- there are 1.0 and 1.1 versions of that struct. > > The sp

[PATCH] efi_loader: explicitly return EFI_UNSUPPORTED for TCG 1.0 compatibility

2023-05-30 Thread Ilias Apalodimas
cification-rev13-160330final.pdf [1] https://github.com/stuyod01/edk2-test/blob/master/uefi-sct/Doc/UEFI-SCT-Case-Spec/30_Protocols_TCG2_Test.md Signed-off-by: Ilias Apalodimas --- Heinrich, Stuart is investigating the chance of the spec getting updated adding EFI_UNSUPPORTED. In any ca

[PATCH] tpm: Make 'tpm init' to call tpm_auto_start()

2023-05-30 Thread Ilias Apalodimas
oot delays with the current change. While at it fix the identation of test_tpm_autostart() comments as well. Signed-off-by: Ilias Apalodimas --- This is a split and resend of https://lore.kernel.org/u-boot/20230510074359.2837818-9-ilias.apalodi...@linaro.org/ Since Simon some had concern

Re: [PATCH 1/6] fwu_metadata: make sure structures are packed

2023-05-29 Thread Ilias Apalodimas
Hi, On Mon, 29 May 2023 at 16:12, Rui Miguel Silva wrote: > > Hi Heinrich, > thanks for the review, > Heinrich Schuchardt writes: > > > On 5/3/23 10:06, Ilias Apalodimas wrote: > >> On Tue, 2 May 2023 at 16:12, Rui Miguel Silva wrote: > >> &g

Re: [PATCH v4 3/3] Load option with short device path for boot vars

2023-05-26 Thread Ilias Apalodimas
On Fri, 26 May 2023 at 09:30, Heinrich Schuchardt wrote: > > On 5/25/23 09:12, Ilias Apalodimas wrote: > > Hi Raymond, > > > > On Tue, May 23, 2023 at 12:18:22PM -0700, Raymond Mao wrote: > >> The boot variables automatically generated for removable medias > &g

Re: [PATCH v4 2/3] Boot var automatic management for removable medias

2023-05-25 Thread Ilias Apalodimas
On Thu, 25 May 2023 at 19:42, Raymond Mao wrote: > > > > On Thu, 25 May 2023 at 09:55, Ilias Apalodimas > wrote: >> >> On Tue, May 23, 2023 at 12:18:20PM -0700, Raymond Mao wrote: >> > Changes for complying to EFI spec §3.5.1.1 >> > 'Removable

Re: [PATCH v4 2/3] Boot var automatic management for removable medias

2023-05-25 Thread Ilias Apalodimas
On Tue, May 23, 2023 at 12:18:20PM -0700, Raymond Mao wrote: > Changes for complying to EFI spec §3.5.1.1 > 'Removable Media Boot Behavior'. > Boot variables can be automatically generated during a removable > media is probed. At the same time, unused boot variables will be > detected and removed.

Re: [PATCH v4 3/3] Load option with short device path for boot vars

2023-05-25 Thread Ilias Apalodimas
Hi Raymond, On Tue, May 23, 2023 at 12:18:22PM -0700, Raymond Mao wrote: > The boot variables automatically generated for removable medias > should be with short form of device path without device nodes. > This is a requirement for the case that a removable media is > plugged into a different

Re: [PATCH] spi: synquacer: remove SPI_TX_BYTE handling

2023-05-24 Thread Ilias Apalodimas
- log_warning("SPI mode not configured, setting to byte > mode\n"); > + bus_width = 1; /* default is single bit mode */ > > div = DIV_ROUND_UP(12500, priv->speed); > > -- > 2.34.1 > Reviewed-by: Ilias Apalodimas

Re: [RFC PATCH 10/10] arm: migrate away from sections.c

2023-05-23 Thread Ilias Apalodimas
On Sat, May 20, 2023 at 02:55:47PM -0600, Sam Edwards wrote: > This patch effectively reverts 3ebd1cbc49f0005092d69cf0d9a6e64d7a1c300b. Also 47bd65ef057fb71b02b32741d5cfcaf03e2f0918 ? > > The approach taken in that commit was to have the section-marking > symbols generated into empty sections by

Re: [RFC PATCH 00/10] Improve ARM target's support for LLVM toolchain

2023-05-23 Thread Ilias Apalodimas
On Mon, May 22, 2023 at 01:37:26PM -0600, Sam Edwards wrote: > Hi Ilias, > > On 5/22/23 00:52, Ilias Apalodimas wrote: > > I can help clean up the arm architecture even further. I was toying > > with the idea of having page-aligned sections and eventually map > > u-b

Re: [PATCH v3 2/3] Boot var automatic management for removable medias

2023-05-23 Thread Ilias Apalodimas
On Tue, May 16, 2023 at 10:17:14AM -0400, Raymond Mao wrote: > Hi Ilias, > > On Tue, 16 May 2023 at 01:59, Ilias Apalodimas > wrote: > > > On Tue, May 02, 2023 at 12:12:19PM -0700, Raymond Mao wrote: > > > Changes for complying to EFI spec §3.5.1.1 > &

Re: [PATCH v6 5/8] efi_loader: check lowest supported version

2023-05-22 Thread Ilias Apalodimas
On Fri, May 19, 2023 at 07:32:11PM +0900, Masahisa Kojima wrote: > The FMP Payload Header which EDK II capsule generation scripts > insert has a firmware version. > This commit reads the lowest supported version stored in the > device tree, then check if the firmware version in FMP payload header

Re: [PATCH v6 4/8] efi_loader: get lowest supported version from device tree

2023-05-22 Thread Ilias Apalodimas
; > > + efi_firmware_get_lsv_from_dtb(fw_array->image_index, > + _array->image_type_id, > + > _info->lowest_supported_image_version); > + > image_info->version_name = NULL; /* not supported */ > - image_info->lowest_supported_image_version = 0; > image_info->last_attempt_version = 0; > image_info->last_attempt_status = LAST_ATTEMPT_STATUS_SUCCESS; > } > -- > 2.17.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH v6 6/8] mkeficapsule: add FMP Payload Header

2023-05-22 Thread Ilias Apalodimas
; > > guid = NULL; > index = 0; > @@ -679,6 +704,10 @@ int main(int argc, char **argv) > case 'I': > instance = strtoul(optarg, NULL, 0); > break; > + case 'v': > + fmp_ph_params.fw_version = strtoul(optarg, NULL, 0); > + fmp_ph_params.have_header = true; > + break; > case 'p': > if (privkey_file) { > fprintf(stderr, > @@ -751,7 +780,7 @@ int main(int argc, char **argv) > exit(EXIT_FAILURE); > } > } else if (create_fwbin(argv[argc - 1], argv[argc - 2], guid, > - index, instance, mcount, privkey_file, > + index, instance, _ph_params, mcount, > privkey_file, >cert_file, (uint16_t)oemflags) < 0) { > fprintf(stderr, "Creating firmware capsule failed\n"); > exit(EXIT_FAILURE); > -- > 2.17.1 > Acked-by: Ilias Apalodimas

Re: [PATCH v6 3/8] efi_loader: versioning support in GetImageInfo

2023-05-22 Thread Ilias Apalodimas
D; > > - image_info[i].lowest_supported_image_version = 0; > - image_info[i].last_attempt_version = 0; > - image_info[i].last_attempt_status = LAST_ATTEMPT_STATUS_SUCCESS; > image_info[i].hardware_instance = 1; > image_info[i].dependencies = NULL; > } > -- > 2.17.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH v6 2/8] efi_loader: store firmware version into FmpState variable

2023-05-22 Thread Ilias Apalodimas
Hi Kojima-san, On Fri, May 19, 2023 at 07:32:08PM +0900, Masahisa Kojima wrote: > Firmware version management is not implemented in the current > FMP protocol. > EDK II reference implementation capsule generation script inserts > the FMP Payload Header right before the payload, FMP Payload Header

Re: [PATCH v6 1/8] efi_loader: add the number of image entries in efi_capsule_update_info

2023-05-22 Thread Ilias Apalodimas
ersion_name = NULL; /* not supported */ > > - for (i = 0; i < num_image_type_guids; i++) { > + for (i = 0; i < update_info.num_images; i++) { > image_info[i].image_index = fw_array[i].image_index; > image_info[i].image_type_id = fw_array[i].image_type_id; > image_info[i].image_id = fw_array[i].image_index; > diff --git a/lib/fwu_updates/fwu.c b/lib/fwu_updates/fwu.c > index 5313d07302..3b1785e7b1 100644 > --- a/lib/fwu_updates/fwu.c > +++ b/lib/fwu_updates/fwu.c > @@ -151,7 +151,7 @@ static int fwu_get_image_type_id(u8 *image_index, > efi_guid_t *image_type_id) > > index = *image_index; > image = update_info.images; > - for (i = 0; i < num_image_type_guids; i++) { > + for (i = 0; i < update_info.num_images; i++) { > if (index == image[i].image_index) { > guidcpy(image_type_id, [i].image_type_id); > return 0; > -- > 2.17.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH 0/8] Cleanup unaligned access macros

2023-05-22 Thread Ilias Apalodimas
le unified version of > the access macros to be used across all archs. This work is inspired by > similar changes in this Linux kernel by Arnd Bergman, > https://lore.kernel.org/lkml/20210514100106.3404011-1-a...@kernel.org/ > > Thanks, > Jens Thanks for the cleanup. For the series Reviewe

Re: [RFC PATCH 07/10] arm: efi_loader: discard hash, unwind information

2023-05-22 Thread Ilias Apalodimas
Hi Sam, On Mon, 22 May 2023 at 22:25, Sam Edwards wrote: > > Hi Ilias, > > On 5/22/23 01:00, Ilias Apalodimas wrote: > > The reason we end up with both hash and gnu.hash is because the hash > > style is set to 'both'. Should we perhaps use (and strip) only one of > &g

Re: [RFC PATCH 0/5] LWIP stack integration

2023-05-22 Thread Ilias Apalodimas
ionality from LWIP with those extra bytes of code. Thanks /Ilias > BR, > Maxim. > > On Fri, 19 May 2023 at 09:52, Tom Rini wrote: >> >> On Fri, May 19, 2023 at 04:17:06PM +0300, Ilias Apalodimas wrote: >> > Hi Tom, >> > >> > Apologies for being late t

Re: [PATCH v6 1/8] efi_loader: add the number of image entries in efi_capsule_update_info

2023-05-22 Thread Ilias Apalodimas
ersion_name = NULL; /* not supported */ > > - for (i = 0; i < num_image_type_guids; i++) { > + for (i = 0; i < update_info.num_images; i++) { > image_info[i].image_index = fw_array[i].image_index; > image_info[i].image_type_id = fw_array[i].image_type_id; > image_info[i].image_id = fw_array[i].image_index; > diff --git a/lib/fwu_updates/fwu.c b/lib/fwu_updates/fwu.c > index 5313d07302..3b1785e7b1 100644 > --- a/lib/fwu_updates/fwu.c > +++ b/lib/fwu_updates/fwu.c > @@ -151,7 +151,7 @@ static int fwu_get_image_type_id(u8 *image_index, > efi_guid_t *image_type_id) > > index = *image_index; > image = update_info.images; > - for (i = 0; i < num_image_type_guids; i++) { > + for (i = 0; i < update_info.num_images; i++) { > if (index == image[i].image_index) { > guidcpy(image_type_id, [i].image_type_id); > return 0; > -- > 2.17.1 > Reviewed-by: Ilias Apalodimas

Re: [RFC PATCH 08/10] arm: efi_loader: move .dynamic out of .text in EFI

2023-05-22 Thread Ilias Apalodimas
Hi Sam, On Sat, 20 May 2023 at 23:56, Sam Edwards wrote: > > This is not proper: A .text section is SHT_PROGBITS, > while the .dynamic section is SHT_DYNAMIC. Attempting to > combine them like this creates a section type mismatch. > > It does seem that GNU ld does not complain, but LLVM's lld >

Re: [RFC PATCH 07/10] arm: efi_loader: discard hash, unwind information

2023-05-22 Thread Ilias Apalodimas
Hi Sam On Sat, 20 May 2023 at 23:56, Sam Edwards wrote: > > LLD tends to put these at the very beginning of the file, only > for the .text 0x0 directive to end up going backward and > overlapping them, creating an error. > > Since they don't appear to be used at runtime, just discard them. > >

Re: [RFC PATCH 00/10] Improve ARM target's support for LLVM toolchain

2023-05-22 Thread Ilias Apalodimas
Hi Sam, On Sun, 21 May 2023 at 07:59, Sam Edwards wrote: > > On 5/20/23 22:26, Heinrich Schuchardt wrote: > > Hello Sam, > > Hi Heinrich! Good to hear from you. > > > I guess the documentation and the CI testing would also have to be adjusted. > > Ah, yeah, those are going to be big things for

Re: [PATCH v12 09/10] arm_ffa: efi: introduce FF-A MM communication

2023-05-19 Thread Ilias Apalodimas
On Fri, May 19, 2023 at 02:36:55PM +0100, Abdellatif El Khlifi wrote: > Hi Ilias, > > > Hi Abdellatif > > > > I still have some concerns on this > > > > In the past [0] I asking why this needs to be a Kconfig option. Since FF-A > > is a mechanism we can use to discover SPs, in theory we dont

Re: [RFC PATCH 0/5] LWIP stack integration

2023-05-19 Thread Ilias Apalodimas
Hi Tom, Apologies for being late to the party > On Thu, May 11, 2023 at 09:52:04AM -0400, Tom Rini wrote: > On Fri, May 05, 2023 at 10:25:24AM +, Maxim Uvarov wrote: > > > Greetings, > > > > This RFC patchset is an attempt to try to use an already existing IP > > network stack inside

Re: [PATCH v12 01/10] arm64: smccc: add support for SMCCCv1.2 x0-x17 registers

2023-05-19 Thread Ilias Apalodimas
lass > Cc: Tom Rini > Cc: Simon Glass > Cc: Ilias Apalodimas > > --- > > Changelog: > === > > v9: > > * update the copyright string > > v7: > > * improve indentation of ARM_SMCCC_1_2_REGS_Xn_OFFS > > v4: > > * rena

Re: [PATCH v12 09/10] arm_ffa: efi: introduce FF-A MM communication

2023-05-19 Thread Ilias Apalodimas
Hi Abdellatif I still have some concerns on this In the past [0] I asking why this needs to be a Kconfig option. Since FF-A is a mechanism we can use to discover SPs, in theory we dont need the ifdefery. We might need something if the code difference grows too much but I think we are fine for

Re: [PATCH v4 1/6] FWU: Add FWU metadata access driver for MTD storage regions

2023-05-19 Thread Ilias Apalodimas
HI Jassi, Michal Based on the discussion we had on the dt bindings, I am personally ok with the notion of having those defined internally until we can prove it makes sense for the to be sent to the dt-schema. In the future we need to strip those from U-Boot, before we hand over the DR to the OS,

Re: [PATCH] global: Use proper project name U-Boot

2023-05-17 Thread Ilias Apalodimas
On Wed, 17 May 2023 at 10:18, Michal Simek wrote: > > Use proper project name in comments, Kconfig, readmes. > > Signed-off-by: Michal Simek > --- > > I am ignoring these for now because they can break automated scripts or > user setting that's why they should be fixed separately. > >

Re: [PATCH v3 2/3] Boot var automatic management for removable medias

2023-05-15 Thread Ilias Apalodimas
On Tue, May 02, 2023 at 12:12:19PM -0700, Raymond Mao wrote: > Changes for complying to EFI spec §3.5.1.1 > 'Removable Media Boot Behavior'. > Boot variables can be automatically generated during a removable > media is probed. At the same time, unused boot variables will be > detected and removed.

Re: [PATCH v3 1/3] Move bootorder and bootoption apis to lib

2023-05-15 Thread Ilias Apalodimas
Hi Raymond, Heinrichm you had some concerns on the previous version of this patchset wrt to the current code. Do you think the rework should take place here? Or are you ok in cleaning it up in a follow up series? Thanks /Ilias On Tue, May 02, 2023 at 12:12:17PM -0700, Raymond Mao wrote: >

Re: [PATCH v3 3/3] Load option with short device path for boot vars

2023-05-15 Thread Ilias Apalodimas
Hi Raymond, On Tue, May 02, 2023 at 12:12:21PM -0700, Raymond Mao wrote: > The boot variables automatically generated for removable medias > should be with short form of device path without device nodes. > This is a requirement for the case that a removable media is > plugged into a different

Re: [PATCH 3/6] efi_loader: clean up efi_dp_from_file

2023-05-15 Thread Ilias Apalodimas
fp->dp.length = (u16)fpsize; > path_to_uefi(fp->str, path); > - buf += fpsize; > + pos += fpsize; > } > > - *((struct efi_device_path *)buf) = END; > + memcpy(pos, , sizeof(END)); > > - return start; > + return buf; > } > > struct efi_device_path *efi_dp_from_uart(void) > -- > 2.39.2 > Reviewed-by: Ilias Apalodimas

Re: [PATCH 5/6] efi_loader: simplify efi_dp_from_name()

2023-05-15 Thread Ilias Apalodimas
1); > if (part < 0 || !desc) > return EFI_INVALID_PARAMETER; > > - if (device) > - *device = efi_dp_from_part(desc, part); > + dp = efi_dp_from_part(desc, part); > } > + if (device) > + *device = dp; > > if (!path) > return EFI_SUCCESS; > -- > 2.39.2 > Reviewed-by: Ilias Apalodimas

Re: [PATCH 1/6] efi_loader: avoid #ifdef in efi_dp_from_name()

2023-05-15 Thread Ilias Apalodimas
Hi Heinrich On Mon, 15 May 2023 at 10:54, Heinrich Schuchardt wrote: > > On 5/15/23 09:37, Ilias Apalodimas wrote: > > Hi Heinrich, > > > > Looking at this function can we clean it up since you are touching it > > already? > > > > I think it would

Re: [PATCH 4/6] efi_loader: error code efi_dp_from_name()

2023-05-15 Thread Ilias Apalodimas
dev, const > char *devnr, > *file = efi_dp_from_file(desc, part, path); > > if (!*file) > - return EFI_INVALID_PARAMETER; > + return EFI_OUT_OF_RESOURCES; > > return EFI_SUCCESS; > } > -- > 2.39.2 > Reviewed-by: Ilias Apalodimas

Re: [PATCH 2/6] efi_loader: duplicate code in efi_dp_from_name

2023-05-15 Thread Ilias Apalodimas
name); > - free(filename); > + *file = efi_dp_from_file(desc, part, path); > > if (!*file) > return EFI_INVALID_PARAMETER; > -- > 2.39.2 > Reviewed-by: Ilias Apalodimas

Re: [PATCH 1/6] efi_loader: avoid #ifdef in efi_dp_from_name()

2023-05-15 Thread Ilias Apalodimas
Hi Heinrich, Looking at this function can we clean it up since you are touching it already? I think it would look nicer if you defined a local variable of struct efi_device_path * and always assign it in the if cases. Then at the bottom of the function, we could store the ptr value if that

Re: [PATCH 1/1] efi_loader: print file path w/o boot device

2023-05-15 Thread Ilias Apalodimas
;file_path, device_path_to_text); > - if (ret != EFI_SUCCESS) > - goto out; > > out: > boottime->exit(handle, ret, 0, NULL); > -- > 2.39.2 > Reviewed-by: Ilias Apalodimas

Re: [PATCH 1/1] efi_loader: support booting semihosting file

2023-05-15 Thread Ilias Apalodimas
g */ > efi_get_image_parameters(_addr, _size); > > if (device) > -- > 2.39.2 > Reviewed-by: Ilias Apalodimas

Re: [PATCH v2] efi_loader: Fix warnings for unaligned accesses

2023-05-11 Thread Ilias Apalodimas
Akashi-san, On Fri, May 12, 2023 at 09:05:05AM +0900, AKASHI Takahiro wrote: > Hi Ilias, > > On Thu, May 11, 2023 at 08:00:32PM +0300, Ilias Apalodimas wrote: > > Hi Heinrich, > > > > On Thu, 11 May 2023 at 19:56, Heinrich Schuchardt > > wrote: > > >

Re: [PATCH v2] efi_loader: Fix warnings for unaligned accesses

2023-05-11 Thread Ilias Apalodimas
Hi Heinrich, On Thu, 11 May 2023 at 19:56, Heinrich Schuchardt wrote: > > On 5/11/23 18:40, Ilias Apalodimas wrote: > > Tom reports that when building with clang we see this warning: > > field guid within 'struct efi_hii_keyboard_layout' is less aligned than > > 'efi_gu

<    3   4   5   6   7   8   9   10   11   12   >