Re: [PATCH v11] Boot var automatic management for removable medias

2023-09-26 Thread Masahisa Kojima
Hi Ilias, On Wed, 27 Sept 2023 at 03:52, Ilias Apalodimas wrote: > > On Wed, 20 Sept 2023 at 11:41, Masahisa Kojima > wrote: > > > > From: Raymond Mao > > > > Changes for complying to EFI spec ยง3.5.1.1 > > 'Removable Media Boot Behavior'. > >

Re: [PATCH v4 5/8] efi_loader: set EFI HTTP Boot download buffer as reserved

2023-09-25 Thread Masahisa Kojima
tionality in > eficonfig. Isn't there a better place to handle the memory reservation? I think eficonfig will only provide add/edit/delete URI boot option, efibootmgr is responsible for handling the URI device path and reserving the memory. So there will not be code duplication. Thanks, Masahisa Kojima > > [...] > > Thanks > /Ilias >

Re: [PATCH v4 7/8] doc: uefi: add HTTP Boot support

2023-09-25 Thread Masahisa Kojima
On Mon, 25 Sept 2023 at 21:12, Ilias Apalodimas wrote: > > On Fri, Sep 22, 2023 at 04:11:18PM +0900, Masahisa Kojima wrote: > > This adds the description about HTTP Boot. > > > > Signed-off-by: Masahisa Kojima > > --- > > doc/develop/uefi/uefi.rst | 30 ++

Re: [PATCH v4 4/8] efi_loader: support boot from URI device path

2023-09-25 Thread Masahisa Kojima
Hi Ilias, On Mon, 25 Sept 2023 at 21:37, Ilias Apalodimas wrote: > > On Fri, Sep 22, 2023 at 04:11:15PM +0900, Masahisa Kojima wrote: > > This supports to boot from the URI device path. > > When user selects the URI device path, bootmgr downloads > > the file usi

[PATCH v4 8/8] efi_loader: create BlockIo device boot option

2023-09-22 Thread Masahisa Kojima
with the default file on the fly, this commit creates the boot options only for the BlockIo devices exluding the logical partition. Signed-off-by: Masahisa Kojima --- include/efi_loader.h | 1 + lib/efi_loader/efi_bootmgr.c | 47 +--- lib/efi_loader

[PATCH v4 7/8] doc: uefi: add HTTP Boot support

2023-09-22 Thread Masahisa Kojima
This adds the description about HTTP Boot. Signed-off-by: Masahisa Kojima --- doc/develop/uefi/uefi.rst | 30 ++ 1 file changed, 30 insertions(+) diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst index a7a41f2fac..65eea89265 100644 --- a/doc/develop

[PATCH v4 6/8] cmd: efidebug: add uri device path

2023-09-22 Thread Masahisa Kojima
This adds the URI device path option for 'boot add' subcommand. User can add the URI load option for downloading ISO image file or EFI application through network. Currently HTTP is only supported. Signed-off-by: Masahisa Kojima --- cmd/efidebug.c | 50

[PATCH v4 5/8] efi_loader: set EFI HTTP Boot download buffer as reserved

2023-09-22 Thread Masahisa Kojima
The buffer used to download the ISO image file must be reserved to avoid the unintended access to the image. For PE-COFF file case, this memory reservation is done in LoadImage Boot Service. Signed-off-by: Masahisa Kojima --- include/efi_loader.h | 2 ++ lib/efi_loader/efi_bootmgr.c

[PATCH v4 4/8] efi_loader: support boot from URI device path

2023-09-22 Thread Masahisa Kojima
/BOOTAA64.EFI). If the file is .efi file, load and start the downloaded file. Signed-off-by: Masahisa Kojima --- lib/efi_loader/efi_bootmgr.c | 189 +++ 1 file changed, 189 insertions(+) diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c index

[PATCH v4 3/8] blk: blkmap: add ramdisk creation utility function

2023-09-22 Thread Masahisa Kojima
User needs to call several functions to create the ramdisk with blkmap. This adds the utility function to create blkmap device and mount the ramdisk. Signed-off-by: Masahisa Kojima Reviewed-by: Simon Glass --- drivers/block/Makefile| 1 + drivers/block/blkmap.c| 15

[PATCH v4 2/8] net: wget: add wget with dns utility function

2023-09-22 Thread Masahisa Kojima
Current wget takes the target uri in this format: ":" e.g.) 192.168.1.1:/bar The http server ip address must be resolved before calling wget. This commit adds the utility function runs wget with dhs. User can call wget with the uri like "http://foo/bar;. Signed-off-by:

[PATCH v4 1/8] net: wget: prevent overwriting reserved memory

2023-09-22 Thread Masahisa Kojima
This introduces the valid range check to store the received blocks using lmb. The same logic is implemented in tftp. Signed-off-by: Masahisa Kojima Reviewed-by: Simon Glass --- net/wget.c | 80 +- 1 file changed, 73 insertions(+), 7 deletions

[PATCH v4 0/8] Add EFI HTTP boot support

2023-09-22 Thread Masahisa Kojima
on code under drivers/block/blkmap_helper.c - wget supports the valid range check to store the received blocks using lmb - support when the downloaded image have no partiton table but a file system - not start the .efi file in try_load_entry() - call efi_check_pe() for .efi file to check the file

Re: [PATCH v3 2/7] net: wget: add wget with dns utility function

2023-09-22 Thread Masahisa Kojima
On Thu, 21 Sept 2023 at 10:02, Simon Glass wrote: > > Hi Masahisa, > > On Fri, 15 Sept 2023 at 04:17, Masahisa Kojima > wrote: > > > > Current wget takes the target uri in this format: > > ":" e.g.) 192.168.1.1:/bar > > The http server ip

[PATCH v11] Boot var automatic management for removable medias

2023-09-20 Thread Masahisa Kojima
with unexpected failure. The efi_secboot tests need to be modified to clear the BootOrder EFI variable at the beginning of each test. Signed-off-by: Raymond Mao Signed-off-by: Masahisa Kojima Reviewed-by: Heinrich Schuchardt --- lib/efi_loader/efi_disk.c | 18

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

2023-09-20 Thread Masahisa Kojima
ng from BootNext failed, falling back to BootOrder Loading Boot 'mmc 1:1' failed Loading Boot0001 'host 0:1' failed efi_bootmgr_load() returned: 14 efi_start_image() returned: 2 === I think we need to clear the BootOrder variable at the beginning of tests. I will resend this patch with efi_se

[PATCH v3 7/7] doc: uefi: add HTTP Boot support

2023-09-15 Thread Masahisa Kojima
This adds the description about HTTP Boot. Signed-off-by: Masahisa Kojima --- doc/develop/uefi/uefi.rst | 30 ++ 1 file changed, 30 insertions(+) diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst index a7a41f2fac..65eea89265 100644 --- a/doc/develop

[PATCH v3 6/7] cmd: efidebug: add uri device path

2023-09-15 Thread Masahisa Kojima
This adds the URI device path option for 'boot add' subcommand. User can add the URI load option for downloading ISO image file or EFI application through network. Currently HTTP is only supported. Signed-off-by: Masahisa Kojima --- cmd/efidebug.c | 50

[PATCH v3 5/7] efi_loader: set EFI HTTP Boot download buffer as reserved

2023-09-15 Thread Masahisa Kojima
The buffer used to download the ISO image file must be reserved to avoid the unintended access to the image. For PE-COFF file case, this memory reservation is done in LoadImage Boot Service. Signed-off-by: Masahisa Kojima --- include/efi_loader.h | 2 ++ lib/efi_loader/efi_bootmgr.c

[PATCH v3 4/7] efi_loader: support boot from URI device path

2023-09-15 Thread Masahisa Kojima
/BOOTAA64.EFI). If the file is .efi file, load and start the downloaded file. Signed-off-by: Masahisa Kojima --- lib/efi_loader/efi_bootmgr.c | 189 +++ 1 file changed, 189 insertions(+) diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c index

[PATCH v3 3/7] blk: blkmap: add ramdisk creation utility function

2023-09-15 Thread Masahisa Kojima
User needs to call several functions to create the ramdisk with blkmap. This adds the utility function to create blkmap device and mount the ramdisk. Signed-off-by: Masahisa Kojima Reviewed-by: Simon Glass --- drivers/block/Makefile| 1 + drivers/block/blkmap.c| 15

[PATCH v3 2/7] net: wget: add wget with dns utility function

2023-09-15 Thread Masahisa Kojima
Current wget takes the target uri in this format: ":" e.g.) 192.168.1.1:/bar The http server ip address must be resolved before calling wget. This commit adds the utility function runs wget with dhs. User can call wget with the uri like "http://foo/bar;. Signed-off-by:

[PATCH v3 1/7] net: wget: prevent overwriting reserved memory

2023-09-15 Thread Masahisa Kojima
This introduces the valid range check to store the received blocks using lmb. The same logic is implemented in tftp. Signed-off-by: Masahisa Kojima --- net/wget.c | 80 +- 1 file changed, 73 insertions(+), 7 deletions(-) diff --git a/net

[PATCH v3 0/7] Add EFI HTTP boot support

2023-09-15 Thread Masahisa Kojima
ed blocks using lmb - support when the downloaded image have no partiton table but a file system - not start the .efi file in try_load_entry() - call efi_check_pe() for .efi file to check the file is PE-COFF image - add documentation for EFI HTTP Boot Masahisa Kojima (7): net: wget: prevent ove

Re: [PATCH v2 4/6] efi_loader: support boot from URI device path

2023-09-15 Thread Masahisa Kojima
cted to boot. Now come to think of it, we add the one load option for each disk when the disk is detected, then try to boot with the default file by scanning the default boot file in the selected disk. In current implementation, the following load options are automatically created. Boot:

Re: [PATCH v2 4/6] efi_loader: support boot from URI device path

2023-09-14 Thread Masahisa Kojima
Hi Heinrich, On Thu, 14 Sept 2023 at 23:55, Heinrich Schuchardt wrote: > > On 01.09.23 12:25, Masahisa Kojima wrote: > > This supports to boot from the URI device path. > > When user selects the URI device path, bootmgr downloads > > the file using wget into the addre

Re: [PATCH v2 4/6] efi_loader: support boot from URI device path

2023-09-14 Thread Masahisa Kojima
Hi Ilias, On Thu, 14 Sept 2023 at 22:56, Ilias Apalodimas wrote: > > Kojima-san > > On Fri, Sep 01, 2023 at 07:25:40PM +0900, Masahisa Kojima wrote: > > This supports to boot from the URI device path. > > When user selects the URI device path, bootmgr downloads

Re: [PATCH v2 6/6] doc: uefi: add HTTP Boot support

2023-09-14 Thread Masahisa Kojima
On Thu, 14 Sept 2023 at 22:57, Ilias Apalodimas wrote: > > On Fri, Sep 01, 2023 at 07:25:42PM +0900, Masahisa Kojima wrote: > > This adds the description about HTTP Boot. > > > > Signed-off-by: Masahisa Kojima > > --- > > doc/develop/uefi/uefi.rst | 21 +

Re: [PATCH v2 2/6] net: wget: add wget with dns utility function

2023-09-14 Thread Masahisa Kojima
; > + } > > + > > + strlcpy(net_boot_file_name, s, 1024); > > sizeof(net_boot_file_name) here please OK. > > > + strlcat(net_boot_file_name, ":/", 1024); /* append '/' which is > > removed by strsep() */ > > + strlcat(net_boot_fil

Re: [PATCH v2 1/6] net: wget: prevent overwriting reserved memory

2023-09-05 Thread Masahisa Kojima
Hi Simon, On Sat, 2 Sept 2023 at 09:09, Simon Glass wrote: > > Hi Masahisa, > > On Fri, 1 Sept 2023 at 04:26, Masahisa Kojima > wrote: > > > > This introduces the valid range check to store the received > > blocks using lmb. The same logic is implemented in tftp

[PATCH v2 6/6] doc: uefi: add HTTP Boot support

2023-09-01 Thread Masahisa Kojima
This adds the description about HTTP Boot. Signed-off-by: Masahisa Kojima --- doc/develop/uefi/uefi.rst | 21 + 1 file changed, 21 insertions(+) diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst index a7a41f2fac..fd87bb1edb 100644 --- a/doc/develop/uefi

[PATCH v2 5/6] cmd: efidebug: add uri device path

2023-09-01 Thread Masahisa Kojima
This adds the URI device path option for 'boot add' subcommand. User can add the URI load option for downloading ISO image file or EFI application through network. Currently HTTP is only supported. Signed-off-by: Masahisa Kojima --- cmd/efidebug.c | 50

[PATCH v2 4/6] efi_loader: support boot from URI device path

2023-09-01 Thread Masahisa Kojima
/BOOTAA64.EFI). If the file is .efi file, load and start the downloaded file. Signed-off-by: Masahisa Kojima --- lib/efi_loader/efi_bootmgr.c | 197 +++ 1 file changed, 197 insertions(+) diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c index

[PATCH v2 3/6] blk: blkmap: add ramdisk creation utility function

2023-09-01 Thread Masahisa Kojima
User needs to call several functions to create the ramdisk with blkmap. This adds the utility function to create blkmap device and mount the ramdisk. Signed-off-by: Masahisa Kojima --- drivers/block/Makefile| 1 + drivers/block/blkmap.c| 15 -- drivers/block

[PATCH v2 2/6] net: wget: add wget with dns utility function

2023-09-01 Thread Masahisa Kojima
Current wget takes the target uri in this format: ":" e.g.) 192.168.1.1:/bar The http server ip address must be resolved before calling wget. This commit adds the utility function runs wget with dhs. User can call wget with the uri like "http://foo/bar;. Signed-off-by:

[PATCH v2 1/6] net: wget: prevent overwriting reserved memory

2023-09-01 Thread Masahisa Kojima
This introduces the valid range check to store the received blocks using lmb. The same logic is implemented in tftp. Signed-off-by: Masahisa Kojima --- net/wget.c | 76 +- 1 file changed, 69 insertions(+), 7 deletions(-) diff --git a/net

[PATCH v2 0/6] Add EFI HTTP boot support

2023-09-01 Thread Masahisa Kojima
t a file system - not start the .efi file in try_load_entry() - call efi_check_pe() for .efi file to check the file is PE-COFF image - add documentation for EFI HTTP Boot Masahisa Kojima (6): net: wget: prevent overwriting reserved memory net: wget: add wget with dns utility function blk: blkmap:

Re: [PATCH 1/2] cmd: efidebug: add uri device path

2023-08-28 Thread Masahisa Kojima
Hi Heinrich, On Sat, 26 Aug 2023 at 11:20, Heinrich Schuchardt wrote: > > On 8/25/23 07:57, Masahisa Kojima wrote: > > On Thu, 24 Aug 2023 at 09:11, AKASHI Takahiro > > wrote: > >> > >> Hi Kojima-san, > >> > >> On Wed, Aug 23, 2023 at 05

Re: [PATCH 2/2] efi_loader: support boot from URI device path

2023-08-25 Thread Masahisa Kojima
On Thu, 24 Aug 2023 at 15:57, Heinrich Schuchardt wrote: > > On 8/23/23 10:37, Masahisa Kojima wrote: > > This supports to boot from the URI device path. > > When user selects the URI device path, bootmgr downloads > > the file using wget into the address specified by l

Re: [PATCH 2/2] efi_loader: support boot from URI device path

2023-08-25 Thread Masahisa Kojima
On Thu, 24 Aug 2023 at 11:24, AKASHI Takahiro wrote: > > Kojima-san, > > On Wed, Aug 23, 2023 at 05:37:20PM +0900, Masahisa Kojima wrote: > > This supports to boot from the URI device path. > > When user selects the URI device path, bootmgr downloads > > the fi

Re: [PATCH 2/2] efi_loader: support boot from URI device path

2023-08-25 Thread Masahisa Kojima
On Thu, 24 Aug 2023 at 08:59, Simon Glass wrote: > > Hi Masahisa, > > On Wed, 23 Aug 2023 at 02:38, Masahisa Kojima > wrote: > > > > This supports to boot from the URI device path. > > When user selects the URI device path, bootmgr downloads > > the fil

Re: [PATCH 1/2] cmd: efidebug: add uri device path

2023-08-24 Thread Masahisa Kojima
On Thu, 24 Aug 2023 at 14:37, Heinrich Schuchardt wrote: > > On 8/23/23 10:37, Masahisa Kojima wrote: > > This adds the URI device path option for 'boot add' subcommand. > > User can add the URI load option for downloading ISO image file > > or EFI application t

Re: [PATCH 1/2] cmd: efidebug: add uri device path

2023-08-24 Thread Masahisa Kojima
On Thu, 24 Aug 2023 at 09:11, AKASHI Takahiro wrote: > > Hi Kojima-san, > > On Wed, Aug 23, 2023 at 05:37:19PM +0900, Masahisa Kojima wrote: > > This adds the URI device path option for 'boot add' subcommand. > > User can add the URI load option for downloading I

[PATCH 2/2] efi_loader: support boot from URI device path

2023-08-23 Thread Masahisa Kojima
/BOOTAA64.EFI). If the file is .efi file, load and start the downloaded file. Signed-off-by: Masahisa Kojima --- lib/efi_loader/efi_bootmgr.c | 213 +++ 1 file changed, 213 insertions(+) diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c index

[PATCH 1/2] cmd: efidebug: add uri device path

2023-08-23 Thread Masahisa Kojima
This adds the URI device path option for 'boot add' subcommand. User can add the URI load option for downloading ISO image file or EFI application through network(e.g. HTTP). Signed-off-by: Masahisa Kojima --- cmd/efidebug.c | 39 +++ 1 file changed, 39

[PATCH 0/2] Add EFI HTTP boot support

2023-08-23 Thread Masahisa Kojima
.1.0-arm64-netinst.iso => efidebug boot order 3 => bootefi bootmgr Masahisa Kojima (2): cmd: efidebug: add uri device path efi_loader: support boot from URI device path cmd/efidebug.c | 39 +++ lib/efi_loader/efi_bootmgr.c | 213

Re: [PATCH 1/1] net: sni_netsec: Add workaround for timeout error

2023-08-06 Thread Masahisa Kojima
would work as a workaround. > > Signed-off-by: Ryosuke Saito > --- > drivers/net/sni_netsec.c | 50 ---- > 1 file changed, 41 insertions(+), 9 deletions(-) Tested-By: Masahisa Kojima Overnight testing of 'dhcp->ping->reset' sequence works f

[PATCH] efi_loader: check uuid_str_to_bin return value

2023-07-31 Thread Masahisa Kojima
Check the uuid_str_to_bin return value, skip the node if the image-type-id property is wrong format. Addresses-Coverity-ID: 463145 ("Error handling issues") Signed-off-by: Masahisa Kojima --- lib/efi_loader/efi_firmware.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-)

Re: [PATCH v2 2/6] ramdisk: add ramdisk uclass and driver

2023-07-19 Thread Masahisa Kojima
Hi Simon, On Thu, 20 Jul 2023 at 04:11, Simon Glass wrote: > > Hi Masahisa, > > On Thu, 13 Jul 2023 at 23:47, Masahisa Kojima > wrote: > > > > This introcudes the ramdisk uclass and driver. > > > > Signed-off-by: Masahisa Kojima > > --- &g

Re: [PATCH v2 2/6] ramdisk: add ramdisk uclass and driver

2023-07-19 Thread Masahisa Kojima
Hi Heinrich, On Thu, 20 Jul 2023 at 00:10, Heinrich Schuchardt wrote: > > On 14.07.23 07:44, Masahisa Kojima wrote: > > This introcudes the ramdisk uclass and driver. > > > > Signed-off-by: Masahisa Kojima > > --- > > Newly introcuded in v2 > > &g

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

2023-07-18 Thread Masahisa Kojima
ses and takes time. './test/py/test.py --bd sandbox --build -k efi_secboot' will run only the efi_secboot test and it will be useful for debugging purposes. Thanks, Masahisa Kojima > > Regards, > Raymond > > On Sat, 15 Jul 2023 at 05:19, Heinrich Schuchardt wrote: >> >>

Re: [PATCH v2 1/6] efi_loader: add RAM disk device path

2023-07-18 Thread Masahisa Kojima
On Tue, 18 Jul 2023 at 14:57, Heinrich Schuchardt wrote: > > > > Am 18. Juli 2023 03:31:30 MESZ schrieb Masahisa Kojima > : > >Hi Heinrich, > > > >On Fri, 14 Jul 2023 at 22:44, Heinrich Schuchardt wrote: > >> > >> On 14.07.23 07:44, Masahis

Re: [PATCH v2 0/6] introduce EFI_RAM_DISK_PROTOCOL

2023-07-17 Thread Masahisa Kojima
Hi Tobias, On Sat, 15 Jul 2023 at 07:01, Tobias Waldekranz wrote: > > > Hi Masahisa, > > On fre, jul 14, 2023 at 14:44, Masahisa Kojima > wrote: > > This series introduces the EFI_RAM_DISK_PROTOCOL implementation. > > The major purpose of this series is a pr

Re: [PATCH v2 1/6] efi_loader: add RAM disk device path

2023-07-17 Thread Masahisa Kojima
Hi Heinrich, On Fri, 14 Jul 2023 at 22:44, Heinrich Schuchardt wrote: > > On 14.07.23 07:44, Masahisa Kojima wrote: > > This is a preparation to add the EFI_RAM_DISK_PROTOCOL. > > This commit adds the RAM disk device path structure > > and text conversion to Devi

[PATCH v2 6/6] efi_selftest: add EFI_RAM_DISK_PROTOCOL selftest

2023-07-13 Thread Masahisa Kojima
This adds the selftest for the EFI_RAM_DISK_PROTOCOL. Signed-off-by: Masahisa Kojima --- No update since v1 lib/efi_selftest/Makefile| 1 + lib/efi_selftest/efi_selftest_ram_disk.c | 511 +++ 2 files changed, 512 insertions(+) create mode 100644 lib

[PATCH v2 5/6] cmd: efidebug: add RAM disk mount command

2023-07-13 Thread Masahisa Kojima
the number of images. Anyway one image is enough for testing. Signed-off-by: Masahisa Kojima --- Changes in v2: - renamed command load/unload -> mount/umount cmd/efidebug.c | 118 + 1 file changed, 118 insertions(+) diff --git a/cmd/efidebug.c b/

[PATCH v2 4/6] efi_loader: add EFI_RAM_DISK_PROTOCOL implementation

2023-07-13 Thread Masahisa Kojima
-off process for the block device of memory mapped ISO image. Signed-off-by: Masahisa Kojima --- Changes in v2: - implement EFI_RAM_DISK_PROTOCOL based on the ramdisk uclass include/efi_api.h | 13 include/efi_loader.h | 4 + lib/efi_loader/Kconfig| 7

[PATCH v2 3/6] cmd: ramdisk: add ramdisk control command

2023-07-13 Thread Masahisa Kojima
This introcudes the ramdisk command, to control the ramdisk devices. Signed-off-by: Masahisa Kojima --- Newly introcuded in v2 cmd/Kconfig | 7 cmd/Makefile | 1 + cmd/ramdisk.c | 92 +++ 3 files changed, 100 insertions(+) create mode

[PATCH v2 2/6] ramdisk: add ramdisk uclass and driver

2023-07-13 Thread Masahisa Kojima
This introcudes the ramdisk uclass and driver. Signed-off-by: Masahisa Kojima --- Newly introcuded in v2 disk/part.c | 3 + drivers/block/Kconfig| 7 +- drivers/block/Makefile | 2 + drivers/block/blk-uclass.c | 1 + drivers/block

[PATCH v2 1/6] efi_loader: add RAM disk device path

2023-07-13 Thread Masahisa Kojima
This is a preparation to add the EFI_RAM_DISK_PROTOCOL. This commit adds the RAM disk device path structure and text conversion to Device Path to Text Protocol. Signed-off-by: Masahisa Kojima --- No update since v1 include/efi_api.h| 19 +++ lib

[PATCH v2 0/6] introduce EFI_RAM_DISK_PROTOCOL

2023-07-13 Thread Masahisa Kojima
- add ramdisk command documentation - add ramdisk command dm test [1] https://deb.debian.org/debian/dists/bookworm/main/installer-arm64/current/images/netboot/mini.iso [Changelog] v1 -> v2 - implement ramdisk uclass and driver, then EFI_RAM_DISK_PROTOCOL is implemented based on the ramdisk uc

Re: [PATCH 0/4] introduce EFI_RAM_DISK_PROTOCOL

2023-07-11 Thread Masahisa Kojima
On Mon, 10 Jul 2023 at 11:28, AKASHI Takahiro wrote: > > On Mon, Jul 10, 2023 at 11:13:12AM +0900, Masahisa Kojima wrote: > > On Fri, 7 Jul 2023 at 18:12, AKASHI Takahiro > > wrote: > > > > > > On Fri, Jul 07, 2023 at 05:19:33PM +0900, Masahisa

Re: [PATCH 0/4] introduce EFI_RAM_DISK_PROTOCOL

2023-07-09 Thread Masahisa Kojima
On Fri, 7 Jul 2023 at 18:12, AKASHI Takahiro wrote: > > On Fri, Jul 07, 2023 at 05:19:33PM +0900, Masahisa Kojima wrote: > > Hi Akashi-san, > > > > On Fri, 7 Jul 2023 at 16:16, AKASHI Takahiro > > wrote: > > > > > > On Fri, Jul 07, 202

Re: [PATCH 0/4] introduce EFI_RAM_DISK_PROTOCOL

2023-07-07 Thread Masahisa Kojima
Hi Akashi-san, On Fri, 7 Jul 2023 at 16:16, AKASHI Takahiro wrote: > > On Fri, Jul 07, 2023 at 08:29:12AM +0200, Heinrich Schuchardt wrote: > > On 7/7/23 06:00, Masahisa Kojima wrote: > > > This series introduces the EFI_RAM_DISK_PROTOCOL implementation. > > > Th

Re: [PATCH 0/4] introduce EFI_RAM_DISK_PROTOCOL

2023-07-07 Thread Masahisa Kojima
Hi Heinrich, On Fri, 7 Jul 2023 at 15:34, Heinrich Schuchardt wrote: > > On 7/7/23 06:00, Masahisa Kojima wrote: > > This series introduces the EFI_RAM_DISK_PROTOCOL implementation. > > The major purpose of this series is a preparation for EFI HTTP(S) boot. > > >

[PATCH 4/4] efi_selftest: add EFI_RAM_DISK_PROTOCOL selftest

2023-07-06 Thread Masahisa Kojima
This adds the selftest for the EFI_RAM_DISK_PROTOCOL. Signed-off-by: Masahisa Kojima --- lib/efi_selftest/Makefile| 1 + lib/efi_selftest/efi_selftest_ram_disk.c | 511 +++ 2 files changed, 512 insertions(+) create mode 100644 lib/efi_selftest

[PATCH 3/4] cmd: efidebug: add RAM disk mount command

2023-07-06 Thread Masahisa Kojima
the number of images. Anyway one image is enough for testing. Signed-off-by: Masahisa Kojima --- cmd/efidebug.c | 117 + 1 file changed, 117 insertions(+) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index 9622430c47..3466ae7e32 100644 --- a/cmd

[PATCH 2/4] efi_loader: add EFI_RAM_DISK_PROTOCOL implementation

2023-07-06 Thread Masahisa Kojima
-off process for the block device of memory mapped ISO image. Signed-off-by: Masahisa Kojima --- include/efi_api.h | 13 ++ include/efi_loader.h | 4 + lib/efi_driver/efi_uclass.c | 7 +- lib/efi_loader/Kconfig| 6 + lib/efi_loader/Makefile | 1 + lib

[PATCH 1/4] efi_loader: add RAM disk device path

2023-07-06 Thread Masahisa Kojima
This is a preparation to add the EFI_RAM_DISK_PROTOCOL. This commit adds the RAM disk device path structure and text conversion to Device Path to Text Protocol. Signed-off-by: Masahisa Kojima --- include/efi_api.h| 19 +++ lib/efi_loader

[PATCH 0/4] introduce EFI_RAM_DISK_PROTOCOL

2023-07-06 Thread Masahisa Kojima
ces still exist. I plan to add a udevice removal process in ./lib/efi_driver/efi_uclass.c::efi_uc_stop(). In addition, I also plan to add unbind() callback in struct efi_driver_ops. [1] https://deb.debian.org/debian/dists/bookworm/main/installer-arm64/current/images/netboot/mini.iso Mas

Re: [PATCH] efi_driver: fix duplicate efiblk#0 issue

2023-07-03 Thread Masahisa Kojima
Hi Heinrich, On Mon, 3 Jul 2023 at 15:10, Heinrich Schuchardt wrote: > > On 7/3/23 04:47, Masahisa Kojima wrote: > > The devnum value of the blk_desc structure starts from 0, > > current efi_bl_create_block_device() function creates > > two "ef

[PATCH v2] efi_driver: fix duplicate efiblk#0 issue

2023-07-03 Thread Masahisa Kojima
ree_devnum() instead of blk_find_max_devnum(). Signed-off-by: Masahisa Kojima --- Changes in v2: - uses blk_next_free_devnum() instead of blk_find_max_devnum() lib/efi_driver/efi_block_device.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/efi_driver/efi_block_d

Re: [PATCH] efi_driver: fix duplicate efiblk#0 issue

2023-07-02 Thread Masahisa Kojima
Hi Akashi-san, On Mon, 3 Jul 2023 at 13:32, AKASHI Takahiro wrote: > > On Mon, Jul 03, 2023 at 11:47:18AM +0900, Masahisa Kojima wrote: > > The devnum value of the blk_desc structure starts from 0, > > current efi_bl_create_block_device() function creates > > two "ef

[PATCH] efi_driver: fix duplicate efiblk#0 issue

2023-07-02 Thread Masahisa Kojima
he "efiblk" name needs to be incremented. Signed-off-by: Masahisa Kojima --- lib/efi_driver/efi_block_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/efi_driver/efi_block_device.c b/lib/efi_driver/efi_block_device.c index add00eeebb..e37bfe6e80 100644 --- a/lib/efi_drive

[PATCH] cmd: efidebug: add missing efi_free_pool for dh subcommand

2023-06-28 Thread Masahisa Kojima
This adds the missing efi_free_pool call for dh subcommand. Signed-off-by: Masahisa Kojima --- cmd/efidebug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index 9622430c47..0be3af3e76 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -486,6 +486,7

[PATCH v3] doc: uefi: enhance anti-rollback documentation

2023-06-22 Thread Masahisa Kojima
by fdt command. Reviewed-by: Ilias Apalodimas Signed-off-by: Masahisa Kojima --- changes in v3: - fix typo changes in v2: - add recommendation not to enable fdt command doc/develop/uefi/uefi.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/doc/develop/uefi/uefi.rst b/doc/develop

Re: [PATCH v2] doc: uefi: enhance anti-rollback documentation

2023-06-22 Thread Masahisa Kojima
On Thu, 22 Jun 2023 at 16:21, Ilias Apalodimas wrote: > > Hi Kojima-san > > On Thu, 22 Jun 2023 at 08:51, Masahisa Kojima > wrote: > > > > To enforce anti-rollback to any older version, dtb must be > > always update manually. This should be described in the >

[PATCH v2] doc: uefi: enhance anti-rollback documentation

2023-06-21 Thread Masahisa Kojima
by fdt command. Signed-off-by: Masahisa Kojima --- doc/develop/uefi/uefi.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst index ffd13cebe9..7407f178f5 100644 --- a/doc/develop/uefi/uefi.rst +++ b/doc/develop/uefi/uefi.rst

[PATCH] doc: uefi: explicitly describe manual dtb update is required

2023-06-15 Thread Masahisa Kojima
To enforce anti-rollback to any older version, dtb must be always update manually. This should be described in the documentation. Signed-off-by: Masahisa Kojima --- doc/develop/uefi/uefi.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi

Re: [PATCH v9 08/10] doc: uefi: add anti-rollback documentation

2023-06-15 Thread Masahisa Kojima
On Wed, 7 Jun 2023 at 19:22, Takahiro Akashi wrote: > > On Wed, Jun 07, 2023 at 02:41:58PM +0900, Masahisa Kojima wrote: > > This commit describe the procedure to configure lowest supported > > version in the device tree for anti-rollback protection. > > > >

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

2023-06-06 Thread Masahisa Kojima
This test covers the FMP versioning for both raw and FIT image, and both signed and non-signed capsule update. Signed-off-by: Masahisa Kojima --- Changes in v9: - fix pyling warnings Changes in v8: - remove excess semicolons Changes in v7: - use newly introduced common functions of efi_capsule

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

2023-06-06 Thread Masahisa Kojima
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 Glass Signed-off-by: Masahisa Kojima --- Changes in v9: - fix

[PATCH v9 08/10] doc: uefi: add anti-rollback documentation

2023-06-06 Thread Masahisa Kojima
This commit describe the procedure to configure lowest supported version in the device tree for anti-rollback protection. Signed-off-by: Masahisa Kojima --- No update since v7 Changes in v7: - describe the usage Newly created in v6 doc/develop/uefi/uefi.rst | 39

[PATCH v9 07/10] doc: uefi: add firmware versioning documentation

2023-06-06 Thread Masahisa Kojima
This commit describes the procedure to add the firmware version into the capsule file. Signed-off-by: Masahisa Kojima --- No update since v7 Changes in v7: - move documentation into "Creating a capsule file" - cleary describe the --fw-version option Newly created in v6 doc/de

[PATCH v9 06/10] mkeficapsule: add FMP Payload Header

2023-06-06 Thread Masahisa Kojima
in the device tree is used instead. Signed-off-by: Masahisa Kojima Acked-by: Ilias Apalodimas --- No update since v5 Changes in v5: - remove --lsv since we use the lowest_supported_version in the dtb Changes in v3: - remove '-f' option - move some definitions into tools/eficapsule.h - add dependency

[PATCH v9 05/10] efi_loader: check lowest supported version

2023-06-06 Thread Masahisa Kojima
version. If the firmware version is lower than lowest supported version, capsule update will not be performed. Signed-off-by: Masahisa Kojima --- No update since v7 Changes in v7: - return immediately if efi_firmware_capsule_authenticate() fails Changes in v6: - get aligned to the latest

[PATCH v9 04/10] efi_loader: get lowest supported version from device tree

2023-06-06 Thread Masahisa Kojima
This commit gets the lowest supported version from device tree, then fills the lowest supported version in FMP->GetImageInfo(). Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas --- No update since v6 Changed in v6: - fw_version is removed from device tree .../firmware/firmw

[PATCH v9 03/10] efi_loader: versioning support in GetImageInfo

2023-06-06 Thread Masahisa Kojima
MP->GetImageInfo() and ESRT have the meaningful version number. Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas --- No update since v6 Changes in v6: - create function to fill the version information lib/efi_loader/efi_firmware.c | 41 ++- 1 file cha

[PATCH v9 02/10] efi_loader: store firmware version into FmpState variable

2023-06-06 Thread Masahisa Kojima
oad Header. If no FMP Payload Header is found in the capsule file, fw_version, lowest supported version, last attempt version and last attempt status is 0 and this is the same behavior as existing FMP implementation. Signed-off-by: Masahisa Kojima --- No update since v7 Changes in v7:

[PATCH v9 01/10] efi_loader: add the number of image entries in efi_capsule_update_info

2023-06-06 Thread Masahisa Kojima
in the efi_capsule_update_info structure. All board files supporting EFI capsule update are updated. Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas --- No update since v6 Newly created in v6 arch/arm/mach-rockchip/board.c | 4 ++-- board/advantech/imx8mp_rsb3720a1

[PATCH v9 00/10] FMP versioning support

2023-06-06 Thread Masahisa Kojima
Major Changes in v3: - exclude CONFIG_FWU_MULT Masahisa Kojima (10): efi_loader: add the number of image entries in efi_capsule_update_info efi_loader: store firmware version into FmpState variable efi_loader: versioning support in GetImageInfo efi_loader: get lowest supported version from devic

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

2023-06-06 Thread Masahisa Kojima
On Tue, 6 Jun 2023 at 19:00, Heinrich Schuchardt wrote: > > On 6/6/23 11:40, Masahisa Kojima wrote: > > This test covers the FMP versioning for both raw and FIT image, > > and both signed and non-signed capsule update. > > > > Signed-off-by: Masahisa Koji

[PATCH v8 09/10] test: efi_capsule: refactor efi_capsule test

2023-06-06 Thread Masahisa Kojima
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 Glass Signed-off-by: Masahisa Kojima --- Changes in v8: - add

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

2023-06-06 Thread Masahisa Kojima
This test covers the FMP versioning for both raw and FIT image, and both signed and non-signed capsule update. Signed-off-by: Masahisa Kojima --- Changes in v8: - remove excess semicolons Changes in v7: - use newly introduced common functions of efi_capsule test test/py/tests/test_efi_capsule

[PATCH v8 08/10] doc: uefi: add anti-rollback documentation

2023-06-06 Thread Masahisa Kojima
This commit describe the procedure to configure lowest supported version in the device tree for anti-rollback protection. Signed-off-by: Masahisa Kojima --- No update since v7 Changes in v7: - describe the usage Newly created in v6 doc/develop/uefi/uefi.rst | 39

[PATCH v8 06/10] mkeficapsule: add FMP Payload Header

2023-06-06 Thread Masahisa Kojima
in the device tree is used instead. Signed-off-by: Masahisa Kojima Acked-by: Ilias Apalodimas --- No update since v5 Changes in v5: - remove --lsv since we use the lowest_supported_version in the dtb Changes in v3: - remove '-f' option - move some definitions into tools/eficapsule.h - add dependency

[PATCH v8 07/10] doc: uefi: add firmware versioning documentation

2023-06-06 Thread Masahisa Kojima
This commit describes the procedure to add the firmware version into the capsule file. Signed-off-by: Masahisa Kojima --- No update since v7 Changes in v7: - move documentation into "Creating a capsule file" - cleary describe the --fw-version option Newly created in v6 doc/de

[PATCH v8 05/10] efi_loader: check lowest supported version

2023-06-06 Thread Masahisa Kojima
version. If the firmware version is lower than lowest supported version, capsule update will not be performed. Signed-off-by: Masahisa Kojima --- No update since v7 Changes in v7: - return immediately if efi_firmware_capsule_authenticate() fails Changes in v6: - get aligned to the latest

[PATCH v8 04/10] efi_loader: get lowest supported version from device tree

2023-06-06 Thread Masahisa Kojima
This commit gets the lowest supported version from device tree, then fills the lowest supported version in FMP->GetImageInfo(). Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas --- No update since v6 Changed in v6: - fw_version is removed from device tree .../firmware/firmw

[PATCH v8 03/10] efi_loader: versioning support in GetImageInfo

2023-06-06 Thread Masahisa Kojima
MP->GetImageInfo() and ESRT have the meaningful version number. Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas --- No update since v6 Changes in v6: - create function to fill the version information lib/efi_loader/efi_firmware.c | 41 ++- 1 file cha

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