[RFC 03/14] efi_loader: export a couple of protocol related functions

2020-03-16 Thread AKASHI Takahiro
This is a preparatory patch. Those functions will be used in an implementation of UEFI firmware management protocol as part of my capsule update patch. Signed-off-by: AKASHI Takahiro --- include/efi_loader.h | 14 ++ lib/efi_loader/efi_boottime.c | 16 2

[RFC 04/14] efi_loader: correct a definition of struct efi_capsule_header

2020-03-16 Thread AKASHI Takahiro
See UEFI specification, section 8.5.3. In addition, the structure, efi_capsule_header, should be "packed" as it is a serialized binary format in a capsule file. Signed-off-by: AKASHI Takahiro --- include/efi_api.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[RFC 02/14] efi_loader: define System Resource Table macros

2020-03-16 Thread AKASHI Takahiro
Some of those values will be used in an implementation of UEFI firmware management protocol as part of my capsule update patch. Signed-off-by: AKASHI Takahiro --- include/efi_api.h | 27 +++ 1 file changed, 27 insertions(+) diff --git a/include/efi_api.h b/include

[RFC 01/14] efi_loader: define OsIndicationsSupported flags

2020-03-16 Thread AKASHI Takahiro
These flags are expected to be set in OsIndicationsSupported variable if corresponding features are supported. See UEFI specification, section 8.5.4. In particular, capsule-related flags will be used in my capsule update patch. Signed-off-by: AKASHI Takahiro --- include/efi_api.h | 11

[RFC 05/14] efi_loader: define UpdateCapsule api

2020-03-16 Thread AKASHI Takahiro
In this commit, skeleton functions for capsule-related API's are added under CONFIG_EFI_CAPSULE_UPDATE configuration. Detailed implementation will be added in the succeeding patches. Signed-off-by: AKASHI Takahiro --- include/efi_api.h| 12 include/efi_loader.h

[RFC 07/14] efi_loader: capsule: add memory range capsule definitions

2020-03-16 Thread AKASHI Takahiro
: AKASHI Takahiro --- include/efi_api.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/efi_api.h b/include/efi_api.h index ac2b38801c0c..b7bf21cac7ad 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -221,6 +221,10 @@ enum efi_reset_type { EFI_GUID

[RFC 06/14] efi_loader: capsule: add capsule_on_disk support

2020-03-16 Thread AKASHI Takahiro
mechanism. Please note that U-Boot itself has no notion of "boot device" and all the capsule files to be executed will be identified only if they are located in a specific directory on a device that is determined by "Boot" variables. Signed-off-by: AKASHI Takahiro --- inclu

[RFC 08/14] efi_loader: capsule: support firmware update

2020-03-16 Thread AKASHI Takahiro
set_image() interface against each binary in a capsule. In this commit, however, installing drivers is not supported yet. The result of applying a capsule is set to be stored in "Capsule" variable, but its implementation is deferred to a fmp driver. Signed-off-by: AKASHI Takahiro --

[RFC 10/14] efi_loader: capsule: support variable update

2020-03-16 Thread AKASHI Takahiro
See EBBR specification v1.0. A capsule tagged with the guid, EFI_VARIABLE_STORAGE_GUID, will be handled as a variable update object. What efi_update_capsule() basically does is to re-play SetVariable against each variable entry in a capsule. Signed-off-by: AKASHI Takahiro --- include/efi_api.h

[RFC 14/14] test/py: add efi capsule test

2020-03-16 Thread AKASHI Takahiro
We will have two pytest scenarios for capsule update here. * for firmware update (based on simple firmware management protocol) * for variable update Both can run on sandbox build and gives you some idea about how they should work on production system. Signed-off-by: AKASHI Takahiro

[RFC 13/14] tools: add mkeficapsule command for UEFI capsule update test

2020-03-16 Thread AKASHI Takahiro
: AKASHI Takahiro --- tools/Makefile | 3 + tools/mkeficapsule.c | 501 +++ 2 files changed, 504 insertions(+) create mode 100644 tools/mkeficapsule.c diff --git a/tools/Makefile b/tools/Makefile index 99be724b82a5..fe07f8952f49 100644 --- a/tools

[RFC 11/14] efi_loader: variable: export variables table for runtime access

2020-03-16 Thread AKASHI Takahiro
capsule-on-disk if necessary. The idea is based on Peter's proposal[1] in boot-arch ML. [1] https://lists.linaro.org/pipermail/boot-architecture/2018-October/000883.html Signed-off-by: AKASHI Takahiro --- include/efi_loader.h | 7 +++ lib/efi_loader/Kconfig| 10

[RFC 09/14] efi_loader: add simple firmware management protocol for FIT image

2020-03-16 Thread AKASHI Takahiro
CONFIG_EFI_CAPSULE_FIT_DEVICE are used. Signed-off-by: AKASHI Takahiro --- include/efi_loader.h | 3 + lib/efi_loader/Kconfig| 24 - lib/efi_loader/Makefile | 1 + lib/efi_loader/efi_firmware.c | 191 ++ 4 files changed, 218 insertions(+), 1

[RFC 12/14] cmd: add "efidebug capsule" command

2020-03-16 Thread AKASHI Takahiro
"efidebug capsule" is more or less a debugging utility. efidebug capsule update: invoke UpdateCapsule against data on memory efidebug capsule show: show a header of a capsule efidebug capsule result: dump a capsule result variable Signed-off-by: AKASHI Takahiro --- cmd/efideb

Re: [RFC 01/14] efi_loader: define OsIndicationsSupported flags

2020-03-17 Thread AKASHI Takahiro
On Tue, Mar 17, 2020 at 08:03:21AM +0100, Heinrich Schuchardt wrote: > On 3/17/20 3:12 AM, AKASHI Takahiro wrote: > > These flags are expected to be set in OsIndicationsSupported variable > > if corresponding features are supported. See UEFI specification, > > section 8.5.4. &

Re: [RFC 07/14] efi_loader: capsule: add memory range capsule definitions

2020-03-17 Thread AKASHI Takahiro
On Tue, Mar 17, 2020 at 09:11:43AM +0100, Heinrich Schuchardt wrote: > On 3/17/20 3:12 AM, AKASHI Takahiro wrote: > > Memory range capsule gives us a way to notify that some memory regions > > should be left untouched across the next reset. > > See UEFI specification, section

Re: [RFC 13/14] tools: add mkeficapsule command for UEFI capsule update test

2020-03-17 Thread AKASHI Takahiro
On Tue, Mar 17, 2020 at 08:58:55AM +0100, Heinrich Schuchardt wrote: > On 3/17/20 3:12 AM, AKASHI Takahiro wrote: > > This is a utility mainly for test purpose. > >mkeficapsule -f: create a FIT image firmware capsule > > The UEFI spec defines a capsule format and how to

Re: [RFC 11/14] efi_loader: variable: export variables table for runtime access

2020-03-17 Thread AKASHI Takahiro
On Tue, Mar 17, 2020 at 08:37:47AM +0100, Heinrich Schuchardt wrote: > On 3/17/20 3:12 AM, AKASHI Takahiro wrote: > > There are platforms on which OS's won't be able to access UEFI variables > > at runtime (i.e. after ExitBootServices). > > With this patch, all the U

Re: [RFC 00/14] efi_loader: add capsule update support

2020-03-17 Thread AKASHI Takahiro
Heinrich, Thank you for your quick review. On Tue, Mar 17, 2020 at 08:49:12AM +0100, Heinrich Schuchardt wrote: > On 3/17/20 3:12 AM, AKASHI Takahiro wrote: > > Summary > > === > > 'UpdateCapsule' is one of runtime services defined in UEFI specification >

Re: [RFC 07/14] efi_loader: capsule: add memory range capsule definitions

2020-03-18 Thread AKASHI Takahiro
On Wed, Mar 18, 2020 at 08:35:57AM +0100, Heinrich Schuchardt wrote: > On 3/18/20 2:22 AM, AKASHI Takahiro wrote: > > On Tue, Mar 17, 2020 at 09:11:43AM +0100, Heinrich Schuchardt wrote: > > > On 3/17/20 3:12 AM, AKASHI Takahiro wrote: > > > > Memory range capsule

Re: [RFC 09/14] efi_loader: add simple firmware management protocol for FIT image

2020-03-18 Thread AKASHI Takahiro
On Wed, Mar 18, 2020 at 09:04:44AM +0100, Heinrich Schuchardt wrote: > On 3/17/20 3:12 AM, AKASHI Takahiro wrote: > > In this commit, a very simple firmware management protocol driver > > is implemented. It will take a single FIT image firmware in a capsule > > and apply the d

Re: [PATCH 1/2] efi_loader: correct reported length in GetNextVariable()

2020-03-29 Thread AKASHI Takahiro
On Fri, Mar 20, 2020 at 07:28:19PM +0100, Heinrich Schuchardt wrote: > The runtime service GetNextVariable() returns the length of the next > variable including the closing 0x. This length should be in bytes. > > Comparing the output of EDK2 and U-Boot shows that this is currently not > correc

Re: [PATCH 2/2] efi_selftest: check length report by GetNextVariableName()

2020-03-29 Thread AKASHI Takahiro
On Fri, Mar 20, 2020 at 07:28:20PM +0100, Heinrich Schuchardt wrote: > GetNextVariableName should report the length of the variable including the > final 0x in bytes. > > Check this in the unit test. > > Signed-off-by: Heinrich Schuchardt > --- > lib/efi_selftest/efi_selftest_variables.c |

Re: [PATCH 1/1] efi_loader: definition of GetNextVariableName()

2020-03-29 Thread AKASHI Takahiro
On Sun, Mar 22, 2020 at 06:35:34PM +0100, Heinrich Schuchardt wrote: > 'vendor' is both an input and an output parameter. So it cannot be > constant. The same fix must be applied to parse_uboot_variable(). -Takahiro Akashi > Fixes: 0bda81bfdc5c ("efi_loader: use const efi_guid_t * for variable

Re: [PATCH] efi_loader: eliminate EFI_CALL() for variable access

2020-03-30 Thread AKASHI Takahiro
On Thu, Mar 19, 2020 at 11:01:42PM +0100, Heinrich Schuchardt wrote: > In several places of the UEFI sub-system UEFI variables as accessed via > runtime services functions. These functions require being called via > EFI_CALL() to restore the register holding the gd variable. Some code > even calls

Re: [RFC 06/14] efi_loader: capsule: add capsule_on_disk support

2020-03-30 Thread AKASHI Takahiro
On Thu, Mar 19, 2020 at 06:08:15PM +0100, Heinrich Schuchardt wrote: > On 3/18/20 9:55 AM, Heinrich Schuchardt wrote: > > On 3/17/20 3:12 AM, AKASHI Takahiro wrote: > >> Capsule data can be loaded into the system either via UpdateCapsule > >> runtime service or file

Re: [PATCH] efi_loader: eliminate EFI_CALL() for variable access

2020-03-30 Thread AKASHI Takahiro
On Mon, Mar 30, 2020 at 10:27:31AM +0200, Heinrich Schuchardt wrote: > On 3/30/20 9:06 AM, AKASHI Takahiro wrote: > > On Thu, Mar 19, 2020 at 11:01:42PM +0100, Heinrich Schuchardt wrote: > > > In several places of the UEFI sub-system UEFI variables as accessed via > > >

Re: u-boot environment on x86

2020-03-30 Thread AKASHI Takahiro
On Fri, Mar 27, 2020 at 01:26:09PM +, Kim Bøndergaard wrote: > I'm struggling with a u-boot as an uefi overlay on x86 (currently Qemu). > Basically it is working, but I'm now considering how /where to store my > u-boot environment. > > I need to have it stored in a device being accessible al

Re: [RFC 00/14] efi_loader: add capsule update support

2020-03-30 Thread AKASHI Takahiro
Heinrich, On Wed, Mar 18, 2020 at 11:04:05AM +0900, AKASHI Takahiro wrote: > Heinrich, > > Thank you for your quick review. > > On Tue, Mar 17, 2020 at 08:49:12AM +0100, Heinrich Schuchardt wrote: > > On 3/17/20 3:12 AM, AKASHI Takahiro wrote: > > > Summary >

Re: [PATCH 12/16] efi_loader: optional pointer for ConvertPointer

2020-03-30 Thread AKASHI Takahiro
On Fri, Mar 27, 2020 at 06:27:56AM +0100, Heinrich Schuchardt wrote: > If the EFI_OPTIONAL_PTR is set in DebugDisposition, a NULL pointer does not > constitute an invalid parameter. > > Signed-off-by: Heinrich Schuchardt > --- > include/efi_api.h| 2 ++ > lib/efi_loader/efi_runtime.c

Re: [PATCH 09/16] efi_loader: imply FAT, FAT_WRITE

2020-03-30 Thread AKASHI Takahiro
On Fri, Mar 27, 2020 at 06:27:53AM +0100, Heinrich Schuchardt wrote: > The UEFI spec requires support for the FAT file system. > > Signed-off-by: Heinrich Schuchardt > --- > lib/efi_loader/Kconfig | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader

Re: [PATCH 09/16] efi_loader: imply FAT, FAT_WRITE

2020-03-31 Thread AKASHI Takahiro
On Tue, Mar 31, 2020 at 08:44:02AM +0200, Heinrich Schuchardt wrote: > On March 31, 2020, 5:28 a.m. UTC Takahiro Akashi wrote: > > On Fri, Mar 27, 2020 at 06:27:53AM +0100, Heinrich Schuchardt wrote: > > > The UEFI spec requires support for the FAT file system. > > > > > > Signed-off-by: Heinrich

Re: [PATCH 12/16] efi_loader: optional pointer for ConvertPointer

2020-03-31 Thread AKASHI Takahiro
On Tue, Mar 31, 2020 at 08:52:23AM +0200, Heinrich Schuchardt wrote: > On March 31, 2020, 5:23 a.m. UTC Takahiro Akashi wrote > >On Fri, Mar 27, 2020 at 06:27:56AM +0100, Heinrich Schuchardt wrote: > >> If the EFI_OPTIONAL_PTR is set in DebugDisposition, a NULL pointer > does not > >> constitute an

Re: [PATCH 09/16] efi_loader: imply FAT, FAT_WRITE

2020-03-31 Thread AKASHI Takahiro
On Tue, Mar 31, 2020 at 03:08:06PM +0200, Heinrich Schuchardt wrote: > On 2020-03-31 09:44, AKASHI Takahiro wrote: > > On Tue, Mar 31, 2020 at 08:44:02AM +0200, Heinrich Schuchardt wrote: > >> On March 31, 2020, 5:28 a.m. UTC Takahiro Akashi wrote: > >>> On Fri, Ma

Re: [PATCH 09/16] efi_loader: imply FAT, FAT_WRITE

2020-03-31 Thread AKASHI Takahiro
On Tue, Mar 31, 2020 at 10:20:17AM +0200, Mark Kettenis wrote: > > Date: Tue, 31 Mar 2020 16:44:34 +0900 > > From: AKASHI Takahiro > > > > On Tue, Mar 31, 2020 at 08:44:02AM +0200, Heinrich Schuchardt wrote: > > > On March 31, 2020, 5:28 a.m. UTC Takahiro Aka

Re: [PATCH 16/16] efi_selftest: adjust runtime test for variables

2020-03-31 Thread AKASHI Takahiro
On Tue, Mar 31, 2020 at 08:07:39AM +0200, Heinrich Schuchardt wrote: > As variable services are available at runtime we have to expect EFI_SUCCESS > when calling the services. Why not run variables test *after* ExitBootServices as well as *before* that event? Then we should have more test cases.

Re: [PATCH 09/16] efi_loader: imply FAT, FAT_WRITE

2020-03-31 Thread AKASHI Takahiro
On Wed, Apr 01, 2020 at 08:57:33AM +0900, AKASHI Takahiro wrote: > On Tue, Mar 31, 2020 at 03:08:06PM +0200, Heinrich Schuchardt wrote: > > On 2020-03-31 09:44, AKASHI Takahiro wrote: > > > On Tue, Mar 31, 2020 at 08:44:02AM +0200, Heinrich Schuchardt wrote: > > >>

Re: [PATCH 15/16] efi_loader: enable UEFI variables at runtime

2020-03-31 Thread AKASHI Takahiro
On Tue, Mar 31, 2020 at 08:05:40AM +0200, Heinrich Schuchardt wrote: > Enable UEFI variables at runtime. > > Signed-off-by: Heinrich Schuchardt > --- > lib/efi_loader/efi_runtime.c | 6 +- > lib/efi_loader/efi_variable.c | 23 +-- > 2 files changed, 22 insertions(+), 7

Re: [PATCH 15/16] efi_loader: enable UEFI variables at runtime

2020-03-31 Thread AKASHI Takahiro
On Wed, Apr 01, 2020 at 08:26:24AM +0200, Heinrich Schuchardt wrote: > On 4/1/20 3:41 AM, AKASHI Takahiro wrote: > > On Tue, Mar 31, 2020 at 08:05:40AM +0200, Heinrich Schuchardt wrote: > >> Enable UEFI variables at runtime. > >> > >> Signed-off-by: Hei

Re: [PATCH 09/16] efi_loader: imply FAT, FAT_WRITE

2020-04-01 Thread AKASHI Takahiro
On Wed, Apr 01, 2020 at 08:31:10AM +0200, Heinrich Schuchardt wrote: > On 4/1/20 3:14 AM, AKASHI Takahiro wrote: > > On Wed, Apr 01, 2020 at 08:57:33AM +0900, AKASHI Takahiro wrote: > >> On Tue, Mar 31, 2020 at 03:08:06PM +0200, Heinrich Schuchardt wrote: > >>> On 202

Re: [PATCH 16/16] efi_selftest: adjust runtime test for variables

2020-04-01 Thread AKASHI Takahiro
On Wed, Apr 01, 2020 at 08:37:38AM +0200, Heinrich Schuchardt wrote: > On 4/1/20 3:05 AM, AKASHI Takahiro wrote: > > On Tue, Mar 31, 2020 at 08:07:39AM +0200, Heinrich Schuchardt wrote: > >> As variable services are available at runtime we have to expect EFI_SUCCESS > >>

Re: [PATCH 09/16] efi_loader: imply FAT, FAT_WRITE

2020-04-01 Thread AKASHI Takahiro
Hi Mark, On Wed, Apr 01, 2020 at 07:56:31PM +0200, Mark Kettenis wrote: > > Date: Wed, 1 Apr 2020 09:31:03 +0900 > > From: AKASHI Takahiro > > > > On Tue, Mar 31, 2020 at 10:20:17AM +0200, Mark Kettenis wrote: > > > > Date: Tue, 31 Mar 2020 16:44:34

Re: [PATCH v2 2/2] efi_loader: identify EFI system partition

2020-04-05 Thread AKASHI Takahiro
Heinrich, On Sun, Apr 05, 2020 at 11:28:18AM +0200, Heinrich Schuchardt wrote: > For capsule updates we need to identify the EFI system partition. Right, but > Signed-off-by: Heinrich Schuchardt > --- > v2: > no change > --- > include/efi_loader.h | 7 +++ > lib/efi_loader/efi_

Re: [PATCH v2 2/2] efi_loader: identify EFI system partition

2020-04-05 Thread AKASHI Takahiro
On Mon, Apr 06, 2020 at 07:12:56AM +0200, Heinrich Schuchardt wrote: > On 4/6/20 6:21 AM, AKASHI Takahiro wrote: > > Heinrich, > > > > On Sun, Apr 05, 2020 at 11:28:18AM +0200, Heinrich Schuchardt wrote: > >> For capsule updates we need to identify the EFI system

Re: [RFC 07/14] efi_loader: capsule: add memory range capsule definitions

2020-04-06 Thread AKASHI Takahiro
Heinrich, On Wed, Mar 18, 2020 at 04:57:16PM +0900, AKASHI Takahiro wrote: > On Wed, Mar 18, 2020 at 08:35:57AM +0100, Heinrich Schuchardt wrote: > > On 3/18/20 2:22 AM, AKASHI Takahiro wrote: > > > On Tue, Mar 17, 2020 at 09:11:43AM +0100, Heinrich Schuchardt wrote: > >

Re: [RFC 09/14] efi_loader: add simple firmware management protocol for FIT image

2020-04-06 Thread AKASHI Takahiro
Heinrich, On Wed, Mar 18, 2020 at 10:06:38AM +0100, Heinrich Schuchardt wrote: > On 3/18/20 9:17 AM, AKASHI Takahiro wrote: > > On Wed, Mar 18, 2020 at 09:04:44AM +0100, Heinrich Schuchardt wrote: > > > On 3/17/20 3:12 AM, AKASHI Takahiro wrote: > > > > In this

Re: [PATCH v2 3/4] efi_capsule: Add a function to get the public key needed for capsule authentication

2021-05-10 Thread AKASHI Takahiro
On Thu, Apr 15, 2021 at 03:55:52PM +0530, Sughosh Ganu wrote: > On Thu, 15 Apr 2021 at 01:08, Simon Glass wrote: > > > On Mon, 12 Apr 2021 at 16:06, Sughosh Ganu > > wrote: > > > > > > Define a function which would be used in the scenario where the > > > public key is stored on the platform's dt

[PATCH 0/4] efi_loader: capsule: improve capsule authentication support

2021-05-11 Thread AKASHI Takahiro
https://lists.denx.de/pipermail/u-boot/2021-May/449351.html Changes === Initial release (May 12, 2021) * based on v2021.07-rc2 AKASHI Takahiro (4): tools: mkeficapsule: add firmwware image signing tools: mkeficapsule: remove device-tree related operation tools: add fdtsig command te

[PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-11 Thread AKASHI Takahiro
icate file Only when those parameters are given, a signature will be added to a capsule file. Users are expected to maintain the monotonic count for each firmware image. Signed-off-by: AKASHI Takahiro --- tools/Makefile | 4 + tools/mkeficapsule.c

[PATCH 2/4] tools: mkeficapsule: remove device-tree related operation

2021-05-11 Thread AKASHI Takahiro
tb").) The same feature is implemented by a shell script (tools/fdtsig.sh). Signed-off-by: AKASHI Takahiro --- Makefile | 7 +- tools/Makefile | 1 - tools/fdtsig.sh | 40 tools/mkeficapsule.c | 235 ++- 4 fi

[PATCH 3/4] tools: add fdtsig command

2021-05-11 Thread AKASHI Takahiro
by Sughosh and derived from mkeficapsule.c. Signed-off-by: AKASHI Takahiro --- Makefile | 2 +- tools/Makefile | 2 + tools/fdtsig.c | 274 + 3 files changed, 277 insertions(+), 1 deletion(-) create mode 100644 tools/fdtsig.c diff --git

[PATCH 4/4] test/py: efi_capsule: add image authentication test

2021-05-11 Thread AKASHI Takahiro
Add a couple of test cases against dealing with a signed capsule file. Signed-off-by: AKASHI Takahiro --- .../py/tests/test_efi_capsule/capsule_defs.py | 5 + test/py/tests/test_efi_capsule/conftest.py| 35 ++- test/py/tests/test_efi_capsule/signature.dts | 8

Re: [PATCH 2/4] tools: mkeficapsule: remove device-tree related operation

2021-05-12 Thread AKASHI Takahiro
gt; > >>> Akashi-san, > >>> > >>> On Wed, May 12, 2021 at 01:57:51PM +0900, AKASHI Takahiro wrote: > >>>> As we discussed, "-K" and "-D" options have nothing to do with > >>>> creating a capsule file. The

Re: [PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-12 Thread AKASHI Takahiro
On Wed, May 12, 2021 at 10:56:41AM +0200, Heinrich Schuchardt wrote: > On 12.05.21 06:57, AKASHI Takahiro wrote: > > With this enhancement, mkeficapsule will be able to create a capsule > > file with a signature which will be verified later by FMP's SetImage(). > > &

Re: [PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-12 Thread AKASHI Takahiro
On Thu, May 13, 2021 at 06:22:39AM +0200, Heinrich Schuchardt wrote: > On 5/13/21 5:08 AM, AKASHI Takahiro wrote: > > On Wed, May 12, 2021 at 10:56:41AM +0200, Heinrich Schuchardt wrote: > > > On 12.05.21 06:57, AKASHI Takahiro wrote: > > > > With this enhancement

Re: [PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-12 Thread AKASHI Takahiro
On Thu, May 13, 2021 at 07:35:36AM +0200, Heinrich Schuchardt wrote: > On 5/13/21 7:00 AM, AKASHI Takahiro wrote: > > On Thu, May 13, 2021 at 06:22:39AM +0200, Heinrich Schuchardt wrote: > > > On 5/13/21 5:08 AM, AKASHI Takahiro wrote: > > > > On Wed, May 12, 2021

Re: [PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-12 Thread AKASHI Takahiro
On Thu, May 13, 2021 at 07:50:52AM +0200, Heinrich Schuchardt wrote: > On 5/13/21 7:12 AM, Masami Hiramatsu wrote: > > Hi Heinrich, > > > > 2021年5月13日(木) 13:22 Heinrich Schuchardt : > > > > > > On 5/13/21 5:08 AM, AKASHI Takahiro wrote: > > > >

Re: [PATCH 3/4] tools: add fdtsig command

2021-05-13 Thread AKASHI Takahiro
On Thu, May 13, 2021 at 07:23:43AM +0200, Heinrich Schuchardt wrote: > On 5/12/21 6:57 AM, AKASHI Takahiro wrote: > > This command allows us to add a certificate (or public key) to dtb blob: > > { > > signature { > > capsule-key = "..."; &

Re: [PATCH 2/4] tools: mkeficapsule: remove device-tree related operation

2021-05-13 Thread AKASHI Takahiro
On Thu, May 13, 2021 at 07:08:12AM +0200, Heinrich Schuchardt wrote: > On 5/13/21 4:33 AM, AKASHI Takahiro wrote: > > On Wed, May 12, 2021 at 12:01:32PM +0200, Heinrich Schuchardt wrote: > > > On 12.05.21 10:01, Ilias Apalodimas wrote: > > > > On Wed, May 12, 20

Re: [PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-13 Thread AKASHI Takahiro
On Thu, May 13, 2021 at 08:55:17AM +0200, Heinrich Schuchardt wrote: > Am 13. Mai 2021 08:50:54 MESZ schrieb AKASHI Takahiro > : > >On Thu, May 13, 2021 at 07:50:52AM +0200, Heinrich Schuchardt wrote: > >> On 5/13/21 7:12 AM, Masami Hiramatsu wrote: > >> > Hi Hein

Re: [PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-13 Thread AKASHI Takahiro
>> > Hi Heinrich, > >> > > >> > 2021年5月13日(木) 13:22 Heinrich Schuchardt : > >> >> > >> >> On 5/13/21 5:08 AM, AKASHI Takahiro wrote: > >> >>> On Wed, May 12, 2021 at 10:56:41AM +0200, Heinrich Schuchardt > &g

Re: [PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-13 Thread AKASHI Takahiro
On Thu, May 13, 2021 at 08:45:10AM +0200, Heinrich Schuchardt wrote: > Am 13. Mai 2021 08:36:05 MESZ schrieb AKASHI Takahiro > : > >On Thu, May 13, 2021 at 07:35:36AM +0200, Heinrich Schuchardt wrote: > >> On 5/13/21 7:00 AM, AKASHI Takahiro wrote: > >> > On Thu,

Re: [PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-13 Thread AKASHI Takahiro
On Thu, May 13, 2021 at 05:18:36PM +0900, Masami Hiramatsu wrote: > 2021年5月13日(木) 16:24 AKASHI Takahiro : > > > > >> > BTW, IMHO, if u-boot.bin can not find the ESL in the device tree, > > > >> > it should skip authentication too. > > > >>

Re: [PATCH 2/4] tools: mkeficapsule: remove device-tree related operationy

2021-05-13 Thread AKASHI Takahiro
On 5/13/21 9:13 AM, AKASHI Takahiro wrote: > > On Thu, May 13, 2021 at 07:08:12AM +0200, Heinrich Schuchardt wrote: > > > On 5/13/21 4:33 AM, AKASHI Takahiro wrote: > > > > On Wed, May 12, 2021 at 12:01:32PM +0200, Heinrich Schuchardt wrote: > > > > > On

Re: [PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-13 Thread AKASHI Takahiro
On Thu, May 13, 2021 at 06:32:13PM +0200, Heinrich Schuchardt wrote: > On 5/13/21 6:12 PM, Masami Hiramatsu wrote: > > 2021年5月13日(木) 19:27 Ilias Apalodimas : > > > > > > On Thu, May 13, 2021 at 05:38:51PM +0900, AKASHI Takahiro wrote: > > > > On Thu, M

Re: [PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-13 Thread AKASHI Takahiro
On Thu, May 13, 2021 at 07:42:04PM +0300, Ilias Apalodimas wrote: > [...] > > > > FWIW I personally don't think we should even have a config option. But > > > > even > > > > if we did it certainly must not be dictated by a hardware config. > > > > > > > > When you install distro packages you acce

Re: [PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-13 Thread AKASHI Takahiro
On Thu, May 13, 2021 at 08:25:56PM +0200, Heinrich Schuchardt wrote: > On 5/13/21 10:18 AM, Masami Hiramatsu wrote: > > 2021年5月13日(木) 16:24 AKASHI Takahiro : > > > > > > > > > BTW, IMHO, if u-boot.bin can not find the ESL in the device tree, > > &

Re: [PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-14 Thread AKASHI Takahiro
On Fri, May 14, 2021 at 08:59:38AM +0200, Heinrich Schuchardt wrote: > On 5/14/21 8:19 AM, AKASHI Takahiro wrote: > > On Thu, May 13, 2021 at 08:25:56PM +0200, Heinrich Schuchardt wrote: > > > On 5/13/21 10:18 AM, Masami Hiramatsu wrote: > > > > 2021年

Re: [PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-14 Thread AKASHI Takahiro
Heinrich, Can you please reply to each of my replies? Otherwise, I don't know which one of my comments/opinions you agree to and which one not. On Fri, May 14, 2021 at 10:45:48AM +0200, Heinrich Schuchardt wrote: > On 5/14/21 9:13 AM, AKASHI Takahiro wrote: > > > E.g for IMAGE

Re: [PATCH v2 16/50] image: Add Kconfig options for FIT in the host build

2021-05-17 Thread AKASHI Takahiro
On Mon, May 17, 2021 at 05:29:44PM -0500, Alex G. wrote: > On 5/12/21 12:14 PM, Tom Rini wrote: > > On Wed, May 12, 2021 at 11:19:52AM -0500, Alex G. wrote: > > > > > > > > > On 5/12/21 10:52 AM, Simon Glass wrote: > > [snip] > > > > > We have a NO_SDL build-time control. Perhaps have a NO_SSL

Re: [PATCH] efi: Restrict the simple file system protocol to support only FAT

2021-06-02 Thread AKASHI Takahiro
On Thu, Jun 03, 2021 at 11:17:56AM +0900, Masami Hiramatsu wrote: > Because UEFI specification v2.9, 13.3 File System Format said "The > file system supported by the Extensible Firmware Interface is based > on the FAT file system.", the simple file system protocol might be > better to support only

Re: [PATCH 1/4] tools: docker: Install a readable kernel for libguestfs-tools

2021-06-04 Thread AKASHI Takahiro
On Fri, Jun 04, 2021 at 10:02:03PM +0300, Alper Nebi Yasak wrote: > The filesystem and EFI (capsule and secure boot) test setups try to use > guestmount and virt-make-fs respectively to prepare disk images to run > tests on. However, these libguestfs tools need a kernel image and fail > with the fo

Re: EFI from usb HDD

2021-06-10 Thread AKASHI Takahiro
On Thu, Jun 10, 2021 at 02:31:46PM +0200, Michal Simek wrote: > > > On 6/10/21 12:51 PM, Heinrich Schuchardt wrote: > > On 6/10/21 12:04 PM, Michal Simek wrote: > >> Hi, > >> > >> On 6/10/21 11:47 AM, Heinrich Schuchardt wrote: > >>> On 6/10/21 10:44 AM, Michal Simek wrote: > Hi, > > >>

Re: [PATCH] efi_loader: check update capsule parameters

2021-06-11 Thread AKASHI Takahiro
Hi Vincent, Thank you for the update. On Fri, Jun 11, 2021 at 07:06:01PM +0200, Heinrich Schuchardt wrote: > Cc: Takahiro, Sughosh, Ilias > > On 6/11/21 6:15 PM, Vincent Stehlé wrote: > > UpdateCapsule() must return EFI_INVALID_PARAMETER in a number of cases, > > listed by the UEFI specification

Re: BISECTED f3866909e350 ("distro_bootcmd: call EFI bootmgr even without having /EFI/boot")

2021-06-11 Thread AKASHI Takahiro
Hi Matwey, On Fri, Jun 11, 2021 at 06:08:28PM +0300, Matwey V. Kornilov wrote: > чт, 10 июн. 2021 г. в 23:05, Heinrich Schuchardt : > > > > On 6/7/21 7:51 PM, Matwey V. Kornilov wrote: > > > вс, 6 июн. 2021 г. в 19:47, Heinrich Schuchardt : > > >> > > >> On 6/6/21 6:21 PM, Heinrich Schuchardt wrot

Re: BISECTED f3866909e350 ("distro_bootcmd: call EFI bootmgr even without having /EFI/boot")

2021-06-12 Thread AKASHI Takahiro
On Sat, Jun 12, 2021 at 04:50:46PM +0300, Matwey V. Kornilov wrote: > сб, 12 июн. 2021 г. в 05:05, AKASHI Takahiro : > > > > Hi Matwey, > > > > On Fri, Jun 11, 2021 at 06:08:28PM +0300, Matwey V. Kornilov wrote: > > > чт, 10 июн. 2021 г. в 23:05, Heinrich Schu

Re: [PATCH] efi_loader: FMP cleanups

2021-06-14 Thread AKASHI Takahiro
Ilias, In this patch, you are trying to address a couple of independent issues in a single commit. Please split. (Heinrich doesn't like that.) On Mon, Jun 14, 2021 at 06:10:14PM +0300, Ilias Apalodimas wrote: > Right now we allow both of the FMPs (RAW and FIT based) to be installed at > the same

Re: [PATCH] efi_loader: FMP cleanups

2021-06-14 Thread AKASHI Takahiro
On Tue, Jun 15, 2021 at 06:55:50AM +0300, Ilias Apalodimas wrote: > Akashi-san, > > On Tue, Jun 15, 2021 at 10:51:01AM +0900, AKASHI Takahiro wrote: > > Ilias, > > > > In this patch, you are trying to address a couple of independent > > issues in a single commit

Re: [PATCH] efi_loader: FMP cleanups

2021-06-14 Thread AKASHI Takahiro
On Tue, Jun 15, 2021 at 08:23:35AM +0300, Ilias Apalodimas wrote: > On Tue, Jun 15, 2021 at 01:44:58PM +0900, AKASHI Takahiro wrote: > > On Tue, Jun 15, 2021 at 06:55:50AM +0300, Ilias Apalodimas wrote: > > > Akashi-san, > > > > > > On Tue, Jun 15, 2021 at 10:

Re: [PATCH] efi_loader: FMP cleanups

2021-06-14 Thread AKASHI Takahiro
On Tue, Jun 15, 2021 at 09:22:31AM +0300, Ilias Apalodimas wrote: > On Tue, Jun 15, 2021 at 02:55:38PM +0900, AKASHI Takahiro wrote: > > On Tue, Jun 15, 2021 at 08:23:35AM +0300, Ilias Apalodimas wrote: > > > On Tue, Jun 15, 2021 at 01:44:58PM +0900, AKASHI Takahiro wrote: >

Re: [PATCH] efi_loader: FMP cleanups

2021-06-15 Thread AKASHI Takahiro
On Tue, Jun 15, 2021 at 09:56:10AM +0300, Ilias Apalodimas wrote: > > > > > > [...] > > > > > They are fixing "different" problems relating ESRT generation. > > > > That is my point. > > > > > > > > > > Sure, but it's a minor clean up really. As I said the current code works > > > fine. So I

Re: [PATCH] tools: Use a single target-independent config to enable OpenSSL

2021-06-15 Thread AKASHI Takahiro
A gentle ping. What is the current review status? Who will take care of this patch? -Takahiro Akashi On Mon, May 24, 2021 at 03:23:17PM -0500, Alexandru Gagniuc wrote: > Host tool features, such as mkimage's ability to sign FIT images were > enabled or disabled based on the target configuration.

Re: [PATCH] tools: Use a single target-independent config to enable OpenSSL

2021-06-16 Thread AKASHI Takahiro
On Wed, Jun 16, 2021 at 12:08:00PM -0400, Tom Rini wrote: > On Wed, Jun 16, 2021 at 09:34:27AM -0500, Alex G. wrote: > > On 6/15/21 6:34 PM, AKASHI Takahiro wrote: > > > A gentle ping. > > > What is the current review status? > > > Who will take care of this pat

Re: [PATCH 1/1] efi_loader: fix set_capsule_result()

2021-06-29 Thread AKASHI Takahiro
apsule.c > index 60309d4a07..f7c0c5725f 100644 > --- a/lib/efi_loader/efi_capsule.c > +++ b/lib/efi_loader/efi_capsule.c > @@ -6,6 +6,8 @@ > * Author: AKASHI Takahiro > */ > > +#define LOG_CATEGORY LOGC_EFI > + > #include > #include >

Re: [PATCH] efi_loader: Allow capsule update on-disk without checking OsIndications

2021-06-29 Thread AKASHI Takahiro
On Tue, Jun 29, 2021 at 09:43:40AM +0200, Heinrich Schuchardt wrote: > On 6/29/21 6:55 AM, Ilias Apalodimas wrote: > > From: apalos > > > > Although U-Boot supports capsule update on-disk, it's lack of support for > > SetVariable at runtime prevents applications like fwupd from using it. > > > >

Re: [PATCH 0/7] efi: Various tidy-ups and drop the default

2021-06-29 Thread AKASHI Takahiro
On Mon, Jun 28, 2021 at 12:08:27PM -0600, Simon Glass wrote: > Hi Tom, > > On Mon, 28 Jun 2021 at 11:27, Tom Rini wrote: > > > > On Mon, Jun 28, 2021 at 10:26:35AM -0600, Simon Glass wrote: > > > Hi Heinrich, > > > > > > On Mon, 28 Jun 2021 at 09:20, Heinrich Schuchardt > > > wrote: > > > > > >

Re: [PATCH] efi_loader: Allow capsule update on-disk without checking OsIndications

2021-06-29 Thread AKASHI Takahiro
On Tue, Jun 29, 2021 at 03:45:29PM +0300, Ilias Apalodimas wrote: > > > > > [...] > > > > +config EFI_IGNORE_OSINDICATIONS > > > > + bool "Ignore OsIndications for CapsuleUpdate on-disk" > > > > + depends on EFI_CAPSULE_ON_DISK > > > > + default n > > > > + help > > > > +

Re: [PATCH 0/7] efi: Various tidy-ups and drop the default

2021-06-29 Thread AKASHI Takahiro
On Tue, Jun 29, 2021 at 04:01:38PM +0200, Heinrich Schuchardt wrote: > On 6/29/21 2:56 PM, AKASHI Takahiro wrote: > > On Mon, Jun 28, 2021 at 12:08:27PM -0600, Simon Glass wrote: > > > Hi Tom, > > > > > > On Mon, 28 Jun 2021 at 11:27, Tom Rini wrote: > &g

Re: [PATCH v2 1/2] efi_loader: fix set_capsule_result()

2021-06-30 Thread AKASHI Takahiro
i_capsule.c | 39 +++- > 1 file changed, 21 insertions(+), 18 deletions(-) > > diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c > index 2c37a0d97b..f87ef2a514 100644 > --- a/lib/efi_loader/efi_capsule.c > +++ b/lib/efi_loade

Re: [PATCH v2 1/2] efi_loader: fix set_capsule_result()

2021-06-30 Thread AKASHI Takahiro
On Thu, Jul 01, 2021 at 03:20:48AM +0200, Heinrich Schuchardt wrote: > Am 1. Juli 2021 02:49:09 MESZ schrieb AKASHI Takahiro > : > >NAK. For example, > >On Wed, Jun 30, 2021 at 05:31:15PM +0200, Heinrich Schuchardt wrote: > >> The log category must be LOG_CATEGORY LO

Re: [PATCH v3 1/2] efi_loader: fix set_capsule_result()

2021-07-01 Thread AKASHI Takahiro
r/efi_capsule.c > +++ b/lib/efi_loader/efi_capsule.c > @@ -6,6 +6,8 @@ > * Author: AKASHI Takahiro > */ > > +#define LOG_CATEGORY LOGC_EFI > + > #include > #include > #include > @@ -95,13 +97,25 @@ void set_capsule_result(int index, struct > efi

Re: QEMU NUMA and U-Boot

2021-07-06 Thread AKASHI Takahiro
François, On Tue, Jul 06, 2021 at 08:10:08PM +0200, Heinrich Schuchardt wrote: > On 7/6/21 6:13 PM, François Ozog wrote: > > Hi Heinrich, U-Boot 2021-07rc5 does not take into account memory > > description when using Qemu 5.2 NUMA configuration to adapt memory map > > (kernel_addr_r...): > > > >

Re: QEMU NUMA and U-Boot

2021-07-07 Thread AKASHI Takahiro
t; > > xypron.g...@gmx.de>: > > > >Am 7. Juli 2021 03:44:35 MESZ schrieb AKASHI Takahiro > > > >: > > > >>François, > > > >> > > > >>On Tue, Jul 06, 2021 at 08:10:08PM +0200, Heinrich Schuchardt wrote: > >

Re: RFC: Devices for files and partitions

2021-07-08 Thread AKASHI Takahiro
On Tue, Jul 06, 2021 at 05:05:19PM -0600, Simon Glass wrote: > Hi, > > At present U-Boot avoids the concept of 'opening' a file. Being in a > bootloader environment, it is normally better to take the action > immediately and avoid any caching, for example, since there is no > background task to cl

[PATCH] cmd: efidebug: always check return code from get_variable()

2021-01-21 Thread AKASHI Takahiro
t suppress CID 316364, the resulting code is much safer. Signed-off-by: AKASHI Takahiro --- cmd/efidebug.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index 9a2d4ddd5ef4..83bc2196a5a9 100644 --- a/cmd/efidebug.c +++ b/cmd

[PATCH] efi_loader: capsule: fix SIZEOF_MISMATCH warning

2021-01-21 Thread AKASHI Takahiro
(u16 *)", but this is not a portable assumption. > > 767 tmp_files = malloc(count * sizeof(*files)); The change in this patch fixes the ambiguity. Signed-off-by: AKASHI Takahiro Fixes: CID 316361 --- lib/efi_loader/efi_capsule.c | 2 +- 1 file changed, 1 insertion(+), 1 del

[PATCH] tools: mkeficapsule: fill reserved members of structure

2021-01-21 Thread AKASHI Takahiro
Fill reserved members of efi_firmware_management_capsule_image_header structure with zero's for safety. Signed-off-by: AKASHI Takahiro Fixes: CID 316354 --- tools/mkeficapsule.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/mkeficapsule.c b/tools/mkeficapsule.c index 270943f

Re: [PATCH] disk: part_efi: update partition table entries after write

2021-01-26 Thread AKASHI Takahiro
On Tue, Jan 26, 2021 at 04:08:13PM +0100, Heinrich Schuchardt wrote: > On 26.01.21 14:56, Gary Bisson wrote: > > Fixes fastboot issues when switching from mbr to gpt partition tables. > > > > Signed-off-by: Gary Bisson > > --- > > Hi, > > > > I hesitated calling this a RFC as I'm not sure everyone

Re: [RFC RESEND 1/2] efi: Add ESRT to the EFI system table

2021-01-28 Thread AKASHI Takahiro
orresponding ESRT entries are > > initialized as long as there is available entries in the table. > > > > Signed-off-by: Jose Marinho > > CC: Heinrich Schuchardt > > CC: Sughosh Ganu > > CC: AKASHI Takahiro > > CC: Andre Przywara > > CC

Re: [PATCH 4/4] fs: fat: remove trailing periods from long name

2021-02-01 Thread AKASHI Takahiro
On Sun, Jan 31, 2021 at 12:09:53AM +0100, Heinrich Schuchardt wrote: > The FAT32 File System Specification [1] requires leading and trailing > spaces as well as trailing periods of long names to be ignored. > > This renders a test for '.' and '..' as file name superfluous. > > But we must check t

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