Re: [PATCH] efi: use 32-bit alignment for efi_guid_t

2023-01-27 Thread Masahisa Kojima
Hi Ilias, On Fri, 27 Jan 2023 at 23:18, Ilias Apalodimas wrote: > > Hi Kojima-san > > On Fri, Jan 27, 2023 at 08:51:28PM +0900, Masahisa Kojima wrote: > > Current U-Boot implements 64-bit boundary for efi_guid_t structure. > > It follows the UEFI specification, page 21 o

[PATCH] efi: use 32-bit alignment for efi_guid_t

2023-01-27 Thread Masahisa Kojima
it is not used in the current U-Boot code. [1] https://lore.kernel.org/all/20190202094119.13230-5-ard.biesheu...@linaro.org/ Cc: Ilias Apalodimas Signed-off-by: Masahisa Kojima --- include/efi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/efi.h b/include/e

[PATCH] efi_loader: leave attribute check to StMM variable service

2023-01-25 Thread Masahisa Kojima
/efi_variable.c. Signed-off-by: Masahisa Kojima --- lib/efi_loader/efi_var_common.c | 10 +- lib/efi_loader/efi_variable.c | 10 ++ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/efi_loader/efi_var_common.c b/lib/efi_loader/efi_var_common.c index eb83702781

Re: [PATCH v5 3/4] eficonfig: add vertical scroll support

2023-01-24 Thread Masahisa Kojima
Hi Heinrich, On Wed, 25 Jan 2023 at 00:32, Heinrich Schuchardt wrote: > > On 1/24/23 07:56, Masahisa Kojima wrote: > > The current eficonfig menu does not support vertical scroll, > > so it can not display the menu entries greater than > > the console row size. >

[PATCH v5 2/4] eficonfig: refactor change boot order implementation

2023-01-23 Thread Masahisa Kojima
function as other menus. Signed-off-by: Masahisa Kojima Acked-by: Ilias Apalodimas Reviewed-by: Ilias Apalodimas --- No update since v3 Changes in v3: - modify "reverse" local variable type to bool Changes in v2: - add comment when the user key press is not valid - add const qu

[PATCH v5 3/4] eficonfig: add vertical scroll support

2023-01-23 Thread Masahisa Kojima
nction only draws the menu entry between "start" and "end". This commit also fixes the issue that "Save" and "Quit" entries can be moved by BKEY_PLUS in change boot order menu. Signed-off-by: Masahisa Kojima --- Changes in v5: - create common function to upd

[PATCH v5 4/4] eficonfig: increase the number of menu entries

2023-01-23 Thread Masahisa Kojima
Current eficonfig has the maximum number of menu entries and it is 99. If there are more EFI load options and files in the system, eficonfig can not handle it. This commit increases this maximum number of menu entries to INT_MAX. Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas

[PATCH v5 1/4] eficonfig: refactor eficonfig_process_common function

2023-01-23 Thread Masahisa Kojima
to remove the change boot order specific implementation. The menu functions (display_statusline, item_data_print and item_choice) are added as argument of eficonfig_process_common(). The menu description string displayed at the bottom of the menu is also added as argument. Signed-off-by: Masahisa

[PATCH v5 0/4] eficonfig: add vertical scroll support and refactoring

2023-01-23 Thread Masahisa Kojima
menu framework itself if we support other menus. Masahisa Kojima (4): eficonfig: refactor eficonfig_process_common function eficonfig: refactor change boot order implementation eficonfig: add vertical scroll support eficonfig: increase the number of menu entries cmd/eficonfig.c | 399

Re: [PATCH v4 3/4] eficonfig: add vertical scroll support

2023-01-23 Thread Masahisa Kojima
Hi Ilias, On Tue, 24 Jan 2023 at 00:07, Ilias Apalodimas wrote: > > On Fri, Jan 20, 2023 at 05:43:57PM +0900, Masahisa Kojima wrote: > > The current eficonfig menu does not support vertical scroll, > > so it can not display the menu entries greater than > > the consol

[PATCH v4 4/4] eficonfig: increase the number of menu entries

2023-01-20 Thread Masahisa Kojima
Current eficonfig has the maximum number of menu entries and it is 99. If there are more EFI load options and files in the system, eficonfig can not handle it. This commit increases this maximum number of menu entries to INT_MAX. Signed-off-by: Masahisa Kojima --- Newly created in v4 include

[PATCH v4 3/4] eficonfig: add vertical scroll support

2023-01-20 Thread Masahisa Kojima
nction only draws the menu entry between "start" and "end". Signed-off-by: Masahisa Kojima --- No update since v3 Changes in v3: - modify "reverse" local variable type to bool Changes in v2: - add comment when the user key press is not valid - add const qua

[PATCH v4 2/4] eficonfig: refactor change boot order implementation

2023-01-20 Thread Masahisa Kojima
function as other menus. Signed-off-by: Masahisa Kojima Acked-by: Ilias Apalodimas --- No update since v3 Changes in v3: - modify "reverse" local variable type to bool Changes in v2: - add comment when the user key press is not valid - add const qualifier to eficonfig_change_boot_

[PATCH v4 1/4] eficonfig: refactor eficonfig_process_common function

2023-01-20 Thread Masahisa Kojima
to remove the change boot order specific implementation. The menu functions (display_statusline, item_data_print and item_choice) are added as argument of eficonfig_process_common(). The menu description string displayed at the bottom of the menu is also added as argument. Signed-off-by: Masahisa

[PATCH v4 0/4] eficonfig: add vertical scroll support and refactoring

2023-01-20 Thread Masahisa Kojima
menu framework itself if we support other menus. [Major update] - rebased to U-Boot master as of 20th Jan. 2023 Masahisa Kojima (4): eficonfig: refactor eficonfig_process_common function eficonfig: refactor change boot order implementation eficonfig: add vertical scroll support eficonfig

Re: [PATCH v3 0/3] eficonfig: add vertical scroll support and refactoring

2023-01-17 Thread Masahisa Kojima
Hi Heinrich, On Wed, 18 Jan 2023 at 07:03, Heinrich Schuchardt wrote: > > On 1/5/23 03:58, Masahisa Kojima wrote: > > This series aims to add the vertical scroll for the eficonfig menu. > > Before adding scroll support, this series does the refactoring > > of change b

Re: [PATCH v3 3/3] eficonfig: add vertical scroll support

2023-01-15 Thread Masahisa Kojima
On Sat, 14 Jan 2023 at 19:26, Heinrich Schuchardt wrote: > > On 1/14/23 11:06, Heinrich Schuchardt wrote: > > On 1/5/23 03:58, Masahisa Kojima wrote: > >> The current eficonfig menu does not support vertical scroll, > >> so it can not display the menu entries gre

[PATCH v3 3/3] eficonfig: add vertical scroll support

2023-01-04 Thread Masahisa Kojima
nction only draws the menu entry between "start" and "end". Signed-off-by: Masahisa Kojima --- No update since v1 cmd/eficonfig.c | 79 include/efi_config.h | 4 +++ include/efi_loader.h | 1 + 3 files changed, 70 insert

[PATCH v3 2/3] eficonfig: refactor change boot order implementation

2023-01-04 Thread Masahisa Kojima
function as other menus. Signed-off-by: Masahisa Kojima Acked-by: Ilias Apalodimas --- Changes in v3: - modify "reverse" local variable type to bool Changes in v2: - add comment when the user key press is not valid - add const qualifier to eficonfig_change_boot_order_desc cmd/eficonf

[PATCH v3 1/3] eficonfig: refactor eficonfig_process_common function

2023-01-04 Thread Masahisa Kojima
to remove the change boot order specific implementation. The menu functions (display_statusline, item_data_print and item_choice) are added as argument of eficonfig_process_common(). The menu description string displayed at the bottom of the menu is also added as argument. Signed-off-by: Masahisa

[PATCH v3 0/3] eficonfig: add vertical scroll support and refactoring

2023-01-04 Thread Masahisa Kojima
menu framework itself if we support other menus. Masahisa Kojima (3): eficonfig: refactor eficonfig_process_common function eficonfig: refactor change boot order implementation eficonfig: add vertical scroll support cmd/eficonfig.c | 385 +- cmd

Re: [PATCH v2 2/3] eficonfig: refactor change boot order implementation

2023-01-03 Thread Masahisa Kojima
On Wed, 28 Dec 2022 at 00:05, Ilias Apalodimas wrote: > > On Sat, Dec 24, 2022 at 07:57:43AM +0900, Masahisa Kojima wrote: > > This commit removes the change boot order specific > > menu implementation. The change boot order implementation > > calls eficonfig_process_comm

Re: [PATCH v2 3/3] eficonfig: add vertical scroll support

2023-01-03 Thread Masahisa Kojima
On Tue, 27 Dec 2022 at 23:55, Ilias Apalodimas wrote: > > > This looks correct to me. > Heinrich can you check if that solves your scrolling issues? > > On Sat, Dec 24, 2022 at 07:57:44AM +0900, Masahisa Kojima wrote: > > The current eficonfig menu does not support vertic

Re: [PATCH v2 1/3] eficonfig: refactor eficonfig_process_common function

2023-01-03 Thread Masahisa Kojima
Hi Ilias, On Tue, 27 Dec 2022 at 23:41, Ilias Apalodimas wrote: > > Hi Kojima-san > > > Overall I think the cleanup is nice and easier to maintain in the long > run. > > On Sat, Dec 24, 2022 at 07:57:42AM +0900, Masahisa Kojima wrote: > > Current change boot orde

[PATCH v2 3/3] eficonfig: add vertical scroll support

2022-12-23 Thread Masahisa Kojima
nction only draws the menu entry between "start" and "end". Signed-off-by: Masahisa Kojima --- No update since v1 cmd/eficonfig.c | 79 include/efi_config.h | 4 +++ include/efi_loader.h | 1 + 3 files changed, 70 insert

[PATCH v2 2/3] eficonfig: refactor change boot order implementation

2022-12-23 Thread Masahisa Kojima
function as other menus. Signed-off-by: Masahisa Kojima --- Changes in v2: - add comment when the user key press is not valid - add const qualifier to eficonfig_change_boot_order_desc cmd/eficonfig.c | 245 +--- 1 file changed, 150 insertions(+), 95

[PATCH v2 1/3] eficonfig: refactor eficonfig_process_common function

2022-12-23 Thread Masahisa Kojima
to remove the change boot order specific implementation. The menu functions (display_statusline, item_data_print and item_choice) are added as argument of eficonfig_process_common(). The menu description string displayed at the bottom of the menu is also added as argument. Signed-off-by: Masahisa

[PATCH v2 0/3] eficonfig: add vertical scroll support

2022-12-23 Thread Masahisa Kojima
menu framework itself if we support other menus. Masahisa Kojima (3): eficonfig: refactor eficonfig_process_common function eficonfig: refactor change boot order implementation eficonfig: add vertical scroll support cmd/eficonfig.c | 383 +- cmd

Re: [PATCH 2/3] eficonfig: refactor change boot order implementation

2022-12-22 Thread Masahisa Kojima
On Thu, 22 Dec 2022 at 20:54, Ilias Apalodimas wrote: > > On Wed, Dec 21, 2022 at 10:50:37PM +0900, Masahisa Kojima wrote: > > This commit removes the change boot order specific > > menu implementation. The change boot order implementation > > calls eficonfig_process_comm

Re: [PATCH 1/3] eficonfig: refactor eficonfig_process_common function

2022-12-22 Thread Masahisa Kojima
Hi Ilias, On Thu, 22 Dec 2022 at 18:59, Ilias Apalodimas wrote: > > Hi Kojima-san > > > On Wed, Dec 21, 2022 at 10:50:36PM +0900, Masahisa Kojima wrote: > > Current change boot order implementation does not call > > eficonfig_process_common() and call

[PATCH 3/3] eficonfig: add vertical scroll support

2022-12-21 Thread Masahisa Kojima
nction only draws the menu entry between "start" and "end". Signed-off-by: Masahisa Kojima --- cmd/eficonfig.c | 79 include/efi_config.h | 4 +++ include/efi_loader.h | 1 + 3 files changed, 70 insertions(+), 14 deletions(-) dif

[PATCH 2/3] eficonfig: refactor change boot order implementation

2022-12-21 Thread Masahisa Kojima
function as other menus. Signed-off-by: Masahisa Kojima --- cmd/eficonfig.c | 236 +--- 1 file changed, 143 insertions(+), 93 deletions(-) diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c index 39ee766a7b..c2c6c01c3b 100644 --- a/cmd/eficonfig.c +++ b

[PATCH 1/3] eficonfig: refactor eficonfig_process_common function

2022-12-21 Thread Masahisa Kojima
to remove the change boot order specific implementation. The menu functions (display_statusline, item_data_print and item_choice) are added as argument of eficonfig_process_common(). The menu description string displayed at the bottom of the menu is also added as argument. Signed-off-by: Masahisa

[PATCH 0/3] eficonfig: add vertical scroll support

2022-12-21 Thread Masahisa Kojima
menu framework itself if we support other menus. Masahisa Kojima (3): eficonfig: refactor eficonfig_process_common function eficonfig: refactor change boot order implementation eficonfig: add vertical scroll support cmd/eficonfig.c | 374 +- cmd

[PATCH v2] eficonfig: EFI_VARIABLE_APPEND_WRITE is not set for null key

2022-12-20 Thread Masahisa Kojima
EFI_VARIABLE_APPEND_WRITE attritube is set. This commit checks the selected file is null key, then EFI_VARIABLE_APPEND_WRITE attibute will not be used for the null key. Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas --- Changes in v2: - s/size == 0/!size/ cmd/eficonfig_sbkey.c | 40

Re: [PATCH] eficonfig: EFI_VARIABLE_APPEND_WRITE is not set for null key

2022-12-20 Thread Masahisa Kojima
Hi Ilias, On Tue, 20 Dec 2022 at 15:56, Ilias Apalodimas wrote: > > On Tue, Dec 20, 2022 at 12:12:56AM +0900, Masahisa Kojima wrote: > > The signed null key with authenticated header is used to clear > > the PK, KEK, db and dbx. When CONFIG_EFI_MM_COMM_TEE is enabled > >

[PATCH] eficonfig: EFI_VARIABLE_APPEND_WRITE is not set for null key

2022-12-19 Thread Masahisa Kojima
EFI_VARIABLE_APPEND_WRITE attritube is set. This commit checks the selected file is null key, then EFI_VARIABLE_APPEND_WRITE attibute will not be used for the null key. Signed-off-by: Masahisa Kojima --- cmd/eficonfig_sbkey.c | 40 ++-- 1 file changed, 38 insertions(+), 2

[PATCH v2 2/2] eficonfig: avoid SetVariable between GetNextVariableName calls

2022-12-18 Thread Masahisa Kojima
returned from efi_get_next_variable_name_int() indicates we retrieved all EFI variables, it should be treated as EFI_SUCEESS. To address the checkpatch warning of too many leading tabs, combine two if statement into one. Signed-off-by: Masahisa Kojima --- Changes in v2: - fix typos - use '!gu

[PATCH v2 1/2] eficonfig: carve out efi_get_next_variable_name_int calls

2022-12-18 Thread Masahisa Kojima
a common function. This commit also fixes the missing free() of var_name16 in eficonfig_delete_invalid_boot_option(). Signed-off-by: Masahisa Kojima --- Changes in v2: - fix typo in the commit message - rename efi_get_variable_name to efi_next_variable_name cmd/eficonfig.c

[PATCH v2 0/2] fix eficonfig GetNextVariableName calls handling

2022-12-18 Thread Masahisa Kojima
ment alloc -> efi_get_next_variable_name_int -> realloc -> efi_get_next_variable_name_int sequence. Masahisa Kojima (2): eficonfig: carve out efi_get_next_variable_name_int calls eficonfig: avoid SetVariable between GetNextVariableName calls cmd/eficonfig.

Re: [PATCH 2/2] eficonfig: avoid SetVariable between GetNextVariableName calls

2022-12-15 Thread Masahisa Kojima
On Fri, 16 Dec 2022 at 10:58, Heinrich Schuchardt wrote: > > On 12/8/22 05:40, Masahisa Kojima wrote: > > The current code calls efi_set_variable_int() to delete the > > invalid boot option between calls to efi_get_next_variable_name_int(), > > it may produce unpredictab

Re: [PATCH 1/2] eficonfig: curve out efi_get_next_variable_name_int calls

2022-12-15 Thread Masahisa Kojima
On Fri, 16 Dec 2022 at 10:51, Heinrich Schuchardt wrote: > > %s/curve/carve/ Thank you for pointing out the typo. > > On 12/8/22 05:40, Masahisa Kojima wrote: > > To retrieve the EFI variable name by efi_get_next_variable_name_int(), > > the sequence of alloc -> efi

Re: [PATCH 2/2] dts: synquacer: Drop unused and undocumented GPIO 'base' property

2022-12-08 Thread Masahisa Kojima
> gpio-controller; > #gpio-cells = <2>; > clocks = <&clk_apb>; > -base = <0>; Reviewed-by: Masahisa Kojima Regards, Masahisa Kojima > }; > > exiu: interrupt-controller@510c { > -- > 2.35.1 >

Re: [PATCH 1/2] dts: synquacer: Drop unused and undocumented SPI properties

2022-12-08 Thread Masahisa Kojima
; --- a/arch/arm/dts/synquacer-sc2a11-developerbox-u-boot.dtsi > +++ b/arch/arm/dts/synquacer-sc2a11-developerbox-u-boot.dtsi > @@ -20,8 +20,6 @@ > #address-cells = <1>; > #size-cells = <0>; > status = "okay"; > -

[PATCH 0/2] fix eficonfig GetNextVariableName calls handling

2022-12-08 Thread Masahisa Kojima
ment alloc -> efi_get_next_variable_name_int -> realloc -> efi_get_next_variable_name_int sequence. Masahisa Kojima (2): eficonfig: curve out efi_get_next_variable_name_int calls eficonfig: avoid SetVariable between GetNextVariableName calls cmd/eficonfig.

[PATCH 2/2] eficonfig: avoid SetVariable between GetNextVariableName calls

2022-12-08 Thread Masahisa Kojima
returned from efi_get_next_variable_name_int() indicates we retrieve all EFI variables, it should be treated as EFI_SUCEESS. To address the checkpatch warning of too many leading tabs, combine two if statement into one. Signed-off-by: Masahisa Kojima --- cmd/eficonfig.c | 59

[PATCH 1/2] eficonfig: curve out efi_get_next_variable_name_int calls

2022-12-08 Thread Masahisa Kojima
a common function. This commit also fixes the missing free() of var_name16 in eficonfig_delete_invalid_boot_option(). Signed-off-by: Masahisa Kojima --- cmd/eficonfig.c | 62 + include/efi_loader.h| 2 ++ lib/efi_loader/efi_help

Re: [PATCH] efi_loader: Measure the loaded DTB

2022-12-08 Thread Masahisa Kojima
addresses, boot-hart ID, kaslr seed but should include applied overlays. So > just measuring the dtb passed into bootefi or the fallback dtb. > > Why do we measure SMBIOS multiple times? SMBIOS is measured only once, there is a flag "tcg2_efi_app_invoked "to avoid multiple measurements.

Re: [PATCH 0/4] Synquacer DT schema fixes

2022-12-07 Thread Masahisa Kojima
ou as well? I have checked and tested this series and everything is fine. Thank you for the modification. Regards, Masahisa Kojima > > Regards > /Ilias > > > > Signed-off-by: Rob Herring > > > > --- > > Rob Herring (4): > > dts: synquacer: Drop CPU &

Re: [PATCH v3 4/5] eficonfig: use efi_get_next_variable_name_int()

2022-12-06 Thread Masahisa Kojima
On Tue, 6 Dec 2022 at 23:12, Ilias Apalodimas wrote: > > On Sat, Dec 03, 2022 at 09:56:20AM +0900, Masahisa Kojima wrote: > > On Fri, 2 Dec 2022 at 16:36, Ilias Apalodimas > > wrote: > > > > > > On Fri, Dec 02, 2022 at 01:59:36PM +0900, Masahisa Kojima wrote:

Re: [PATCH v3 4/5] eficonfig: use efi_get_next_variable_name_int()

2022-12-02 Thread Masahisa Kojima
On Fri, 2 Dec 2022 at 16:36, Ilias Apalodimas wrote: > > On Fri, Dec 02, 2022 at 01:59:36PM +0900, Masahisa Kojima wrote: > > eficonfig command reads all possible UEFI load options > > from 0x to 0x to construct the menu. This takes too much > > time in some envi

Re: [PATCH v3 5/5] doc:eficonfig: add description for UEFI Secure Boot Configuration

2022-12-02 Thread Masahisa Kojima
Hi Ilias, On Fri, 2 Dec 2022 at 16:17, Ilias Apalodimas wrote: > > On Fri, Dec 02, 2022 at 01:59:37PM +0900, Masahisa Kojima wrote: > > This commits add the description for the UEFI Secure Boot > > Configuration through the eficonfig menu. > > > > Signed-off-by: M

[PATCH v3 5/5] doc:eficonfig: add description for UEFI Secure Boot Configuration

2022-12-01 Thread Masahisa Kojima
This commits add the description for the UEFI Secure Boot Configuration through the eficonfig menu. Signed-off-by: Masahisa Kojima --- No update since v2 Newly created in v2 doc/usage/cmd/eficonfig.rst | 22 ++ 1 file changed, 22 insertions(+) diff --git a/doc/usage/cmd

[PATCH v3 4/5] eficonfig: use efi_get_next_variable_name_int()

2022-12-01 Thread Masahisa Kojima
. Signed-off-by: Masahisa Kojima --- No update since v2 v1->v2: - totaly change the implemention, remove new Kconfig introduced in v1. - use efi_get_next_variable_name_int() to read the all existing UEFI variables, then enumerate the "Boot" variables - this commit does not provi

[PATCH v3 3/5] efi_loader: utility function to check the variable name is "Boot####"

2022-12-01 Thread Masahisa Kojima
Some commands need to enumerate the existing UEFI load option variable("Boot"). This commit transfers some code from cmd/efidebug.c to lib/efi_loder/, then exposes efi_varname_is_load_option() function to check whether the UEFI variable name is "Boot". Signed-off

[PATCH v3 2/5] eficonfig: use u16_strsize() to get u16 string buffer size

2022-12-01 Thread Masahisa Kojima
Use u16_strsize() to simplify the u16 string buffer size calculation. Signed-off-by: Masahisa Kojima Reviewed-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- No update since v1. cmd/eficonfig.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/eficonfig.c b

[PATCH v3 1/5] eficonfig: fix going one directory up issue

2022-12-01 Thread Masahisa Kojima
The directory name in eficonfig menu entry contains the '\' separator. strcmp() argument ".." is wrong and one directory up handling does not work correctly. strcmp() argument must include '\' separator. Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas

[PATCH v3 0/5] miscellaneous fixes of eficonfig

2022-12-01 Thread Masahisa Kojima
This series includes bugfix, refactoring and documentation updates. Masahisa Kojima (5): eficonfig: fix going one directory up issue eficonfig: use u16_strsize() to get u16 string buffer size efi_loader: utility function to check the variable name is "Boot" efic

Re: [PATCH v2 3/5] efi_loader: utility function to check the variable name is "Boot####"

2022-11-29 Thread Masahisa Kojima
Hi Ilias, On Tue, 29 Nov 2022 at 16:33, Ilias Apalodimas wrote: > > On Mon, Nov 28, 2022 at 09:45:07PM +0900, Masahisa Kojima wrote: > > Some commands need to enumerate the existing UEFI load > > option variable("Boot"). This commit transfers some code &g

[PATCH v2 5/5] doc:eficonfig: add description for UEFI Secure Boot Configuration

2022-11-28 Thread Masahisa Kojima
This commits add the description for the UEFI Secure Boot Configuration through the eficonfig menu. Signed-off-by: Masahisa Kojima --- Newly created in v2 doc/usage/cmd/eficonfig.rst | 22 ++ 1 file changed, 22 insertions(+) diff --git a/doc/usage/cmd/eficonfig.rst b/doc

[PATCH v2 4/5] eficonfig: use efi_get_next_variable_name_int()

2022-11-28 Thread Masahisa Kojima
. Signed-off-by: Masahisa Kojima --- v1->v2: - totaly change the implemention, remove new Kconfig introduced in v1. - use efi_get_next_variable_name_int() to read the all existing UEFI variables, then enumerate the "Boot" variables - this commit does not provide the common function

[PATCH v2 3/5] efi_loader: utility function to check the variable name is "Boot####"

2022-11-28 Thread Masahisa Kojima
uot;. Signed-off-by: Masahisa Kojima --- Newly created in v2 cmd/efidebug.c | 23 +-- include/efi_loader.h| 2 ++ lib/efi_loader/efi_helper.c | 33 + 3 files changed, 36 insertions(+), 22 deletions(-) diff --git a/cmd/efidebu

[PATCH v2 2/5] eficonfig: use u16_strsize() to get u16 string buffer size

2022-11-28 Thread Masahisa Kojima
Use u16_strsize() to simplify the u16 string buffer size calculation. Signed-off-by: Masahisa Kojima Reviewed-by: Heinrich Schuchardt --- No update since v1. cmd/eficonfig.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c index

[PATCH v2 1/5] eficonfig: fix going one directory up issue

2022-11-28 Thread Masahisa Kojima
The directory name in eficonfig menu entry contains the '\' separator. strcmp() argument ".." is wrong and one directory up handling does not work correctly. strcmp() argument must include '\' separator. Signed-off-by: Masahisa Kojima --- No change since v1

[PATCH v2 0/5] miscellaneous fixes of eficonfig

2022-11-28 Thread Masahisa Kojima
This series includes bugfix, refactoring and documentation updates. Masahisa Kojima (5): eficonfig: fix going one directory up issue eficonfig: use u16_strsize() to get u16 string buffer size efi_loader: utility function to check the variable name is "Boot" efic

Re: [PATCH 2/3] cmd: add maximum boot option index Kconfig option

2022-11-23 Thread Masahisa Kojima
Hi Jerome, On Wed, 23 Nov 2022 at 19:57, Jerome Forissier wrote: > > Hi, > > On 11/23/22 08:17, Masahisa Kojima wrote: > > eficonfig command reads the all possible UEFI boot options > > from 0x to 0x to construct the menu. This takes too much > > time in so

Re: [PATCH 2/3] cmd: add maximum boot option index Kconfig option

2022-11-23 Thread Masahisa Kojima
Hi Heinrich, On Wed, 23 Nov 2022 at 16:26, Heinrich Schuchardt wrote: > > On 11/23/22 08:17, Masahisa Kojima wrote: > > eficonfig command reads the all possible UEFI boot options > > from 0x to 0x to construct the menu. This takes too much > > time in some environ

[PATCH 3/3] eficonfig: use u16_strsize() to get u16 string buffer size

2022-11-22 Thread Masahisa Kojima
Use u16_strsize() to simplify the u16 string buffer size calculation. Signed-off-by: Masahisa Kojima --- cmd/eficonfig.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c index 20b9a29d3a..282b5d2cf2 100644 --- a/cmd/eficonfig.c +++ b/cmd

[PATCH 2/3] cmd: add maximum boot option index Kconfig option

2022-11-22 Thread Masahisa Kojima
draw the boot option menu. To reduce the time to draw the menu, this patch introduces the maximum UEFI boot option index that eficonfig can manage. Signed-off-by: Masahisa Kojima --- cmd/Kconfig | 12 cmd/eficonfig.c | 10 +- 2 files changed, 17 insertions(+), 5 deletions

[PATCH 1/3] eficonfig: fix going one directory up issue

2022-11-22 Thread Masahisa Kojima
The directory name in eficonfig menu entry contains the '\' separator. strcmp() argument ".." is wrong and one directory up handling does not work correctly. strcmp() argument must include '\' separator. Signed-off-by: Masahisa Kojima --- cmd/eficonfig.c | 2 +

[PATCH 0/3] miscellaneous fixes of eficonfig

2022-11-22 Thread Masahisa Kojima
This series includes bugfix, new Kconfig option to add the limit of boot option index, and refactoring. Masahisa Kojima (3): eficonfig: fix going one directory up issue cmd: add maximum boot option index Kconfig option eficonfig: use u16_strsize() to get u16 string buffer size cmd/Kconfig

Re: [PATCH v10 4/7] eficonfig: expose eficonfig_create_device_path()

2022-11-22 Thread Masahisa Kojima
Hi Heinrich, On Sun, 20 Nov 2022 at 20:47, Heinrich Schuchardt wrote: > > On 11/20/22 01:21, Masahisa Kojima wrote: > > Following commits are adding support for UEFI variable management > > via the eficonfig menu. Those functions needs to use > > eficonfig_create_device

[PATCH v10 7/7] eficonfig: add "Show Signature Database" menu entry

2022-11-19 Thread Masahisa Kojima
This commit adds the menu-driven interface to show the signature list content. Signed-off-by: Masahisa Kojima Acked-by: Ilias Apalodimas --- Changes in v10: - change buffer size to appropriate value(37) - use strdup() No update since v7 Changes in v7: - remove delete signature list feature

[PATCH v10 6/7] eficonfig: add UEFI Secure Boot Key enrollment interface

2022-11-19 Thread Masahisa Kojima
enroll the null key signed by PK or KEK. Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas --- Changes in v10: - use protocol interface - use efi_file_from_path() - use malloc instead of calloc Changes in v9: - move file size check, set ret = EFI_INVALID_PARAMETER Changes in v8: - f

[PATCH v10 5/7] eficonfig: use protocol interface for file selection

2022-11-19 Thread Masahisa Kojima
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL is not always provided by U-Boot. Use protocol interface functions instead of U-Boot internal functions. Signed-off-by: Masahisa Kojima --- Newly created in v10 cmd/eficonfig.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/cmd

[PATCH v10 4/7] eficonfig: expose eficonfig_create_device_path()

2022-11-19 Thread Masahisa Kojima
: Masahisa Kojima --- Newly created in v10 cmd/eficonfig.c | 20 +++- include/efi_config.h | 2 ++ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c index 12babb76c2..58a685 100644 --- a/cmd/eficonfig.c +++ b/cmd/eficonfig.c

[PATCH v10 3/7] eficonfig: refactor change boot order implementation

2022-11-19 Thread Masahisa Kojima
so simplifies the data->active handling when KEY_SPACE is pressed, and sizeof() parameter. Signed-off-by: Masahisa Kojima Acked-by: Ilias Apalodimas --- No update since v7 Changes in v7: - simplify the data->active handling - update sizeof() parameter - update commit message Changes in v

[PATCH v10 2/7] eficonfig: expose append entry function

2022-11-19 Thread Masahisa Kojima
Following commits are adding support for UEFI variable management via the eficonfig menu. Those functions needs to use append_entry() and append_quit_entry() to construct the menu, so move them out of their static declarations. Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas --- no

[PATCH v10 1/7] eficonfig: refactor file selection handling

2022-11-19 Thread Masahisa Kojima
le_option() Finally, test_eficonfig.py need to be updated to get aligned with the above modification. Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas --- No update since v7 Changes in v7: - rename functio name to avoid confusion - remove unused function - update commit message newly crea

[PATCH v10 0/7] eficonfig: add UEFI Secure Boot key maintenance interface

2022-11-19 Thread Masahisa Kojima
-rc1 Masahisa Kojima (7): eficonfig: refactor file selection handling eficonfig: expose append entry function eficonfig: refactor change boot order implementation eficonfig: expose eficonfig_create_device_path() eficonfig: use protocol interface for file selection eficonfig: add UEFI

Re: [PATCH v9 4/5] eficonfig: add UEFI Secure Boot Key enrollment interface

2022-11-19 Thread Masahisa Kojima
On Sat, 19 Nov 2022 at 02:30, Heinrich Schuchardt wrote: > > On 11/18/22 10:37, Masahisa Kojima wrote: > > Hi Heinrhch, > > > > On Fri, 18 Nov 2022 at 08:07, Heinrich Schuchardt > > wrote: > >> > >> On 11/16/22 11:28, Masahisa Kojima wrote: &g

Re: [PATCH v9 4/5] eficonfig: add UEFI Secure Boot Key enrollment interface

2022-11-18 Thread Masahisa Kojima
Hi Heinrhch, On Fri, 18 Nov 2022 at 08:07, Heinrich Schuchardt wrote: > > On 11/16/22 11:28, Masahisa Kojima wrote: > > This commit adds the menu-driven UEFI Secure Boot Key > > enrollment interface. User can enroll PK, KEK, db > > and dbx by selecting file. > >

Re: [PATCH v9 5/5] eficonfig: add "Show Signature Database" menu entry

2022-11-17 Thread Masahisa Kojima
On Fri, 18 Nov 2022 at 11:18, Masahisa Kojima wrote: > > Hi Ilias, Heinrich, > > On Fri, 18 Nov 2022 at 07:06, Heinrich Schuchardt wrote: > > > > On 11/17/22 22:49, Ilias Apalodimas wrote: > > > Hi Kojima-san > > > > > >> +/** > > >

Re: [PATCH v9 5/5] eficonfig: add "Show Signature Database" menu entry

2022-11-17 Thread Masahisa Kojima
ret = EFI_OUT_OF_RESOURCES; > >> +goto out; > >> +} > >> + > >> +sg = calloc(1, sizeof(struct eficonfig_sig_data)); > >> +if (!sg) { > >> +

[PATCH v9 5/5] eficonfig: add "Show Signature Database" menu entry

2022-11-16 Thread Masahisa Kojima
This commit adds the menu-driven interface to show the signature list content. Signed-off-by: Masahisa Kojima --- No update since v7 Changes in v7: - remove delete signature list feature user can clear the signature database with signed null key - rename function name to avoid confusion

[PATCH v9 4/5] eficonfig: add UEFI Secure Boot Key enrollment interface

2022-11-16 Thread Masahisa Kojima
enroll the null key signed by PK or KEK. Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas --- Changes in v9: - move file size check, set ret = EFI_INVALID_PARAMETER Changes in v8: - fix missing efi_file_close_int() call Changes in v7: - only accept .auth file. - remove creating

[PATCH v9 3/5] eficonfig: refactor change boot order implementation

2022-11-16 Thread Masahisa Kojima
so simplifies the data->active handling when KEY_SPACE is pressed, and sizeof() parameter. Signed-off-by: Masahisa Kojima Acked-by: Ilias Apalodimas --- No update since v7 Changes in v7: - simplify the data->active handling - update sizeof() parameter - update commit message Changes in v

[PATCH v9 2/5] eficonfig: expose append entry function

2022-11-16 Thread Masahisa Kojima
Following commits are adding support for UEFI variable management via the eficonfig menu. Those functions needs to use append_entry() and append_quit_entry() to construct the menu, so move them out of their static declarations. Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas --- No

[PATCH v9 1/5] eficonfig: refactor file selection handling

2022-11-16 Thread Masahisa Kojima
le_option() Finally, test_eficonfig.py need to be updated to get aligned with the above modification. Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas --- No update since v7 Changes in v7: - rename functio name to avoid confusion - remove unused function - update commit message newly crea

[PATCH v9 0/5] eficonfig: add UEFI Secure Boot key maintenance interface

2022-11-16 Thread Masahisa Kojima
This series adds the UEFI Secure Boot key maintenance interface to the eficonfig command. User can enroll PK, KEK, db and dbx. Source code can be cloned with: $ git clone https://git.linaro.org/people/masahisa.kojima/u-boot.git -b kojima/eficonfig_sbkey_v9 Masahisa Kojima (5): eficonfig

[PATCH] eficonfig: fix missing variable initialization

2022-11-14 Thread Masahisa Kojima
The 'ret' variable must be initialized before use in eficonfig_delete_invalid_boot_option(). Fixes: c416f1c0bc ("bootmenu: add removable media entries") Addresses-Coverity: 376207 ("Uninitialized variables") Signed-off-by: Masahisa Kojima --- cmd/eficonfig.c | 2 +

Re: [PATCH v8 5/5] eficonfig: add "Show Signature Database" menu entry

2022-11-13 Thread Masahisa Kojima
oy(). But shouldn't we call that on > failures as well instead of just freeing the last instance? Title is freed by eficonfig_destroy(), and entry->data is freed by the caller because it depends on the caller's decision whether entry->data must be freed or not. eficonfig_d

Re: [PATCH v8 4/5] eficonfig: add UEFI Secure Boot Key enrollment interface

2022-11-13 Thread Masahisa Kojima
is return value change is tricky. In eficonfig menu handling, EFI_ABORTED means "exit from the current menu", it usually happens by selecting "Quit" entry or pressing ESC key. eficonfig menu implements a multi-layer menu, if the child menu returns with EFI_ABORTED, the parent menu also exit with EFI_ABORTED. This is why EFI_ABORTED is changed to EFI_NOT_READY. EFI_NOT_READY means that we stay in the current menu. > > > + > > + return ret; > > +} > > + > > +static struct eficonfig_item key_config_menu_items[] = { > > + {"Enroll New Key", eficonfig_process_enroll_key}, > > + {"Quit", eficonfig_process_quit}, > > +}; > > + > > with the size changes > Reviewed-by: Ilias Apalodimas Thanks, Masahisa Kojima >

[PATCH v8 5/5] eficonfig: add "Show Signature Database" menu entry

2022-11-10 Thread Masahisa Kojima
This commit adds the menu-driven interface to show the signature list content. Signed-off-by: Masahisa Kojima --- No update since v7 Changes in v7: - remove delete signature list feature user can clear the signature database with signed null key - rename function name to avoid confusion

[PATCH v8 4/5] eficonfig: add UEFI Secure Boot Key enrollment interface

2022-11-10 Thread Masahisa Kojima
enroll the null key signed by PK or KEK. Signed-off-by: Masahisa Kojima --- Changes in v8: - fix missing efi_file_close_int() call Changes in v7: - only accept .auth file. - remove creating time based authenticated variable - update commit message - use efi_file_size() Changes in

[PATCH v8 3/5] eficonfig: refactor change boot order implementation

2022-11-10 Thread Masahisa Kojima
so simplifies the data->active handling when KEY_SPACE is pressed, and sizeof() parameter. Signed-off-by: Masahisa Kojima Acked-by: Ilias Apalodimas --- No update since v7 Changes in v7: - simplify the data->active handling - update sizeof() parameter - update commit message Changes in v5

[PATCH v8 2/5] eficonfig: expose append entry function

2022-11-10 Thread Masahisa Kojima
Following commits are adding support for UEFI variable management via the eficonfig menu. Those functions needs to use append_entry() and append_quit_entry() to construct the menu, so move them out of their static declarations. Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas --- No

[PATCH v8 1/5] eficonfig: refactor file selection handling

2022-11-10 Thread Masahisa Kojima
le_option() Finally, test_eficonfig.py need to be updated to get aligned with the above modification. Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas --- No update since v7 Changes in v7: - rename functio name to avoid confusion - remove unused function - update commit message newly crea

[PATCH v8 0/5] eficonfig: add UEFI Secure Boot key maintenance interface

2022-11-10 Thread Masahisa Kojima
This series adds the UEFI Secure Boot key maintenance interface to the eficonfig command. User can enroll PK, KEK, db and dbx. Source code can be cloned with: $ git clone https://git.linaro.org/people/masahisa.kojima/u-boot.git -b kojima/eficonfig_sbkey_v8 Masahisa Kojima (5): eficonfig

Re: [PATCH v7 4/5] eficonfig: add UEFI Secure Boot Key enrollment interface

2022-11-09 Thread Masahisa Kojima
I don't understand what is improved when we replace current code > > with efi_file_from_path(). > > I just prefer using common functions to open a file, rather than open > coding open_volume + file_open. OTOH efi_file_from_path() just > converts that DP into a filepath and reads the file. So on a second > thought leave this as is, we don't need a comment. Thank you for the confirmation. Regards, Masahisa Kojima > > [...] > > Regards > /Ilias

<    1   2   3   4   5   6   7   8   9   10   >