Re: [PATCH v8 4/9] sandbox: Build the mkeficapsule tool for the sandbox variants

2023-08-11 Thread Takahiro Akashi
on your target, you certainly need this. > > > > > > > > > > Sorry, what is this fixing exactly? > > > > > > > > s/command/tool/ is mixed in with this commit, but the main purpose is > > > > to enable it on sandbox. > > >

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

2023-06-18 Thread Takahiro Akashi
Hi Heinrich, On Mon, Jun 19, 2023 at 06:37:14AM +0200, Heinrich Schuchardt wrote: > > > Am 19. Juni 2023 02:49:54 MESZ schrieb Takahiro Akashi > : > >On Sat, Jun 17, 2023 at 09:58:13PM +0200, Heinrich Schuchardt wrote: > >> On 6/15/23 10:03, Masahisa Kojima wr

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

2023-06-18 Thread Takahiro Akashi
e rollback protection is a security issue. On a > secure system you would probably want to disable console commands like > mc and fdt. Shouldn't we provide an advice for safe settings? Is there any case where a user wants to use fdt for some reason, for example, in CONFIG_PREBOOT or CONFIG_BOOTC

Re: [PATCH 4/7] tools: mkeficapsule: Add support for parsing capsule params from config file

2023-06-15 Thread Takahiro Akashi
On Fri, Jun 16, 2023 at 10:37:01AM +0530, Sughosh Ganu wrote: > hi Takahiro, > > On Fri, 16 Jun 2023 at 10:16, Takahiro Akashi > wrote: > > > > Hi Sughosh, > > > > On Fri, Jun 16, 2023 at 09:56:33AM +0530, Sughosh Ganu wrote: > > > On Thu, 15 Ju

Re: [PATCH 4/7] tools: mkeficapsule: Add support for parsing capsule params from config file

2023-06-15 Thread Takahiro Akashi
Hi Sughosh, On Fri, Jun 16, 2023 at 09:56:33AM +0530, Sughosh Ganu wrote: > On Thu, 15 Jun 2023 at 11:19, Takahiro Akashi > wrote: > > > > On Thu, Jun 15, 2023 at 10:09:06AM +0530, Sughosh Ganu wrote: > > > On Wed, 14 Jun 2023 at 11:23, Takahiro Akashi > > >

Re: [PATCH 4/7] tools: mkeficapsule: Add support for parsing capsule params from config file

2023-06-14 Thread Takahiro Akashi
On Thu, Jun 15, 2023 at 10:09:06AM +0530, Sughosh Ganu wrote: > On Wed, 14 Jun 2023 at 11:23, Takahiro Akashi > wrote: > > > > On Wed, Jun 14, 2023 at 10:56:23AM +0530, Sughosh Ganu wrote: > > > hi Takahiro, > > > > > > On Wed, 14 Ju

Re: [PATCH 4/7] tools: mkeficapsule: Add support for parsing capsule params from config file

2023-06-13 Thread Takahiro Akashi
On Wed, Jun 14, 2023 at 10:56:23AM +0530, Sughosh Ganu wrote: > hi Takahiro, > > On Wed, 14 Jun 2023 at 09:09, Takahiro Akashi > wrote: > > > > Hi Sughosh, > > > > I think this is a good extension to mkeficapsule, but > > > > On Tue, Jun

Re: [PATCH 4/7] tools: mkeficapsule: Add support for parsing capsule params from config file

2023-06-13 Thread Takahiro Akashi
) { > + capsule == CAPSULE_ACCEPT) < 0) { > fprintf(stderr, "Creating empty capsule failed\n"); > exit(EXIT_FAILURE); > } > @@ -756,6 +762,26 @@ int main(int argc, char **argv) &g

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

2023-06-07 Thread Takahiro Akashi
rsion in the capsule file is updated, > lowest-supported-version > +in the dtb might be updated accordingly. I think that you should explicitly mention that a user always needs to update dtb *manually* in order to enforce anti-rollback to *any* older versio

Re: [PATCH v6 7/8] doc: uefi: add firmware versioning documentation

2023-05-21 Thread Takahiro Akashi
; + > +1. Run the following command to add firmware version into the capsule file Anyhow, you'd better clearly mention that an user needs to specify "--fw-version" option and what happens (or not happen) if the option is not there. I think all the text here can be simply merged in

Re: [PATCH v6 8/8] doc: uefi: add anti-rollback documentation

2023-05-21 Thread Takahiro Akashi
ersion and lowest-supported-version and that users should always update their device tree to enforce the protection. (If the lowest-supported-version is kept the same even after the firmware update, anti-rollback won't work.) -Takahiro Akashi > +1. Insert the lowest supported version into a d

Re: [PATCH v5 1/4] efi_loader: get version information from device tree

2023-05-09 Thread Takahiro Akashi
gt; >>> + } > > >>> +} > > >>> + > > >>>/** > > >>> * efi_fill_image_desc_array - populate image descriptor array > > >>> * @image_info_size:Size of @image_info > > >>> @@

Re: [PATCH v5 0/4] FMP versioning support

2023-04-10 Thread Takahiro Akashi
as not been applied yet.) I believe that your current approach is rather incomplete as a workable solution. -Takahiro Akashi > The disadvantage of this design change is that we need to maintain > the fw_version in both device tree and FMP Payload Header. > It is inevitable since not all t

Re: [PATCH v2 0/4] FMP versioning support

2023-03-05 Thread Takahiro Akashi
On Mon, Mar 06, 2023 at 03:08:55PM +0900, Masahisa Kojima wrote: > Hi Akashi-san, > > On Sat, 4 Mar 2023 at 10:28, Takahiro Akashi > wrote: > > > > Kojima-san, > > > > On Wed, Mar 01, 2023 at 06:15:18PM +0900, Masahisa Kojima wrote: > > > F

Re: [PATCH v2 0/4] FMP versioning support

2023-03-03 Thread Takahiro Akashi
a capsule update is *reverted* to an older version. In addition, please don't forget in the next patch set: - update the man page of mkeficapsule command - add test cases (in pytest) -Takahiro Akashi > EDK2 reference implementation utilizes the FMP Payload Header > inserted right bef

Re: [PATCH v2 1/4] efi_loader: store firmware version into FmpState variable

2023-03-02 Thread Takahiro Akashi
last_attempt_status; > + } else { > + var_state.last_attempt_version = state->last_attempt_version; > + var_state.last_attempt_status = state->last_attempt_status; > + } > + > + ret = efi_set_variable_int(varname, _guid_fmp_state, > +

Re: [PATCH v2 2/4] efi_loader: versioning support in GetImageInfo

2023-03-02 Thread Takahiro Akashi
On Thu, Mar 02, 2023 at 07:05:50PM +0900, Masahisa Kojima wrote: > On Thu, 2 Mar 2023 at 14:16, Takahiro Akashi > wrote: > > > > On Wed, Mar 01, 2023 at 06:15:20PM +0900, Masahisa Kojima wrote: > > > Current FMP->GetImageInfo() always return 0 for the fi

Re: [PATCH v2 4/4] mkeficapsule: add FMP Payload Header

2023-03-01 Thread Takahiro Akashi
cert_file; > int c, idx; > + struct fmp_payload_header_params fmp_ph_params = { 0 }; > > guid = NULL; > index = 0; > @@ -679,6 +739,15 @@ int main(int argc, char **argv) > case 'I': > instance = strtoul(opta

Re: [PATCH v2 2/4] efi_loader: versioning support in GetImageInfo

2023-03-01 Thread Takahiro Akashi
), "FmpState", > + fw_array[i].image_index); Don't we have to think of the systems where multiple FMP drivers are used? In those cases, 'image_index' doesn't work as an unique ID. It is unlikely under the current code, but we should conside

Re: [PATCH v2 1/4] efi_loader: store firmware version into FmpState variable

2023-03-01 Thread Takahiro Akashi
; + > + return ret; > } > > /** > @@ -330,7 +459,9 @@ efi_status_t EFIAPI efi_firmware_fit_set_image( > efi_status_t (*progress)(efi_uintn_t completion), > u16 **abort_reason) > { > + bool updated; > efi_status_t status; > + struct

Re: [PATCH v11 15/15] FWU: doc: Add documentation for the FWU feature

2022-10-04 Thread Takahiro Akashi
On Tue, Oct 04, 2022 at 12:10:27PM +0530, Sughosh Ganu wrote: > hi Takahiro, > > On Tue, 4 Oct 2022 at 08:24, Takahiro Akashi > wrote: > > > > Sughosh, > > > > On Wed, Sep 28, 2022 at 02:59:56PM +0530, Sughosh Ganu wrote: > > > Add docume

Re: [PATCH v11 05/15] stm32mp1: dk2: Add image information for capsule updates

2022-10-03 Thread Takahiro Akashi
On Mon, Oct 03, 2022 at 04:40:04PM +0530, Sughosh Ganu wrote: > hi Takahiro, > > On Mon, 3 Oct 2022 at 16:27, Takahiro Akashi > wrote: > > > > Hi Sughosh, > > > > On Wed, Sep 28, 2022 at 02:59:46PM +0530, Sughosh Ganu wrote: > > > Enabling capsule

Re: [PATCH v11 15/15] FWU: doc: Add documentation for the FWU feature

2022-10-03 Thread Takahiro Akashi
ifferent banks. Well, what is not clear to me here is: - who is responsible to set up FWU metadata and when - how FWU metadata is related to fw_images and update_info which are used in normal case, which is mentioned in develop/uefi/uefi.rst I know the whole text here is dedicated to A/B update, bu

Re: [PATCH v11 05/15] stm32mp1: dk2: Add image information for capsule updates

2022-10-03 Thread Takahiro Akashi
Then, we should describe that image_index must be 1 to num_image_type_guids (or strictly, number of descriptors returned by GetImageInfo()) in the document above. (I hope that you add a sanity checker against it as well.) -Takahiro Akashi > +#endif > return 0; > } > > diff

Re: [PATCH] test/py: efi_secboot: Remove unnecessary cert-to-efi-hash-list option

2022-10-03 Thread Takahiro Akashi
need the CRL revoked for all the time, just don't specify > '-t' option. Correct. Thank you for the fix. (The tests happen to pass since the year is always 0 (or 1900?).) -Takahiro Akashi > $ cert-to-efi-hash-list -s 256 db.crt dbx_hash.crl > TimeOfRevocation is 0-0-0 00:00:00 >

Re: [PATCH v10 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-09-21 Thread Takahiro Akashi
On Wed, Sep 21, 2022 at 04:56:20PM +0530, Sughosh Ganu wrote: > hi Takahiro, > > On Wed, 21 Sept 2022 at 10:58, Takahiro Akashi > wrote: > > > > Sughosh, > > > > On Tue, Sep 20, 2022 at 06:34:12PM +0530, Sughosh Ganu wrote: > > > On Tue, 20 Sep

Re: [PATCH v10 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-09-20 Thread Takahiro Akashi
Sughosh, On Tue, Sep 20, 2022 at 06:34:12PM +0530, Sughosh Ganu wrote: > On Tue, 20 Sept 2022 at 13:46, Takahiro Akashi > wrote: > > > > On Fri, Sep 16, 2022 at 04:24:35PM +0530, Sughosh Ganu wrote: > > > hi Takahiro, > > > > > > On Fri, 16 Sep

Re: [PATCH v10 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-09-20 Thread Takahiro Akashi
On Fri, Sep 16, 2022 at 04:24:35PM +0530, Sughosh Ganu wrote: > hi Takahiro, > > On Fri, 16 Sept 2022 at 12:20, Takahiro Akashi > wrote: > > > > On Fri, Sep 16, 2022 at 10:52:11AM +0530, Sughosh Ganu wrote: > > > () hi Takahiro, > > > > >

Re: [PATCH v10 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-09-16 Thread Takahiro Akashi
On Fri, Sep 16, 2022 at 10:52:11AM +0530, Sughosh Ganu wrote: > () hi Takahiro, > > On Fri, 16 Sept 2022 at 07:17, Takahiro Akashi > wrote: > > > > Hi Sughosh, > > > > On Thu, Sep 15, 2022 at 01:44:46PM +0530, Sughosh Ganu wrote: > > > The FW

Re: [PATCH v10 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-09-15 Thread Takahiro Akashi
%pUs, > hardware instance %lld\n", > >update_image_type_id, > @@ -485,8 +648,30 @@ static efi_status_t efi_capsule_update_firmware( > goto out; > } > > + if (IS

Re: [PATCH v9 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-09-07 Thread Takahiro Akashi
} else { > + log_debug("Successfully updated the > active_index\n"); > + ret = EFI_SUCCESS; > + if (fw_accept_os) { > + status = fwu_trial_state_ctr_start

Re: [PATCH v16 10/10] test: unit test for eficonfig

2022-09-05 Thread Takahiro Akashi
up_down_enter_and_wait(0, 0, True, 'Quit') will incorrectly select "initrd-2.img" instead of "initrd-1.img -Takahiro Akashi > Best regards > > Heinrich > > > > > Changes in v14: > > - update to support media device enumeration in eficonfig start

Re: [PATCH v13 6/9] eficonfig: add "Change Boot Order" menu entry

2022-08-24 Thread Takahiro Akashi
ransition and shows something like: ** Select Boot Option ** Quit even if no applicable option is available. I hope a consistent behavior for "Change Boot Order" as well, or printing some error message will be better. -Takahiro Akashi > Changes in v12: > - enumerate remo

Re: [PATCH v11 6/9] bootmenu: add removable media entries

2022-08-23 Thread Takahiro Akashi
On Fri, Aug 19, 2022 at 12:05:50PM +0900, Masahisa Kojima wrote: > Hi Akashi-san, > > On Fri, 19 Aug 2022 at 10:31, Takahiro Akashi > wrote: > > > > On Wed, Aug 17, 2022 at 06:36:11PM +0900, Masahisa Kojima wrote: > > > UEFI specification requires

Re: [PATCH v11 8/9] doc:eficonfig: add documentation for eficonfig command

2022-08-19 Thread Takahiro Akashi
On Fri, Aug 19, 2022 at 03:15:09PM +0900, Masahisa Kojima wrote: > Hi Akashi-san, > > On Fri, 19 Aug 2022 at 14:57, Takahiro Akashi > wrote: > > > > On Wed, Aug 17, 2022 at 06:36:13PM +0900, Masahisa Kojima wrote: > > > Add documentation for eficonfig command. &g

Re: [PATCH v11 8/9] doc:eficonfig: add documentation for eficonfig command

2022-08-18 Thread Takahiro Akashi
enabled and "eficonfig" is configured as preboot command, > +the newly added Boot Options are enumerated in the bootmenu when user exits > +from the eficonfig menu. Right, and when user quits from eficonfig, bootmenu also quits. *If possible*, I expect that we return to bo

Re: [PATCH v11 6/9] bootmenu: add removable media entries

2022-08-18 Thread Takahiro Akashi
o provided in eficonfig (or even as part of system initialization?). -Takahiro Akashi > has the dedicated guid in the optional_data to distinguish it from > the UEFI boot option user adds manually. This optional_data is > removed when the efi bootmgr loads the selected UEFI boot option. >

Re: [PATCH v10 00/10] enable menu-driven UEFI variable maintenance

2022-07-26 Thread Takahiro Akashi
On Wed, Jul 27, 2022 at 10:08:00AM +0900, Takahiro Akashi wrote: > On Fri, Jul 22, 2022 at 11:45:49AM +0300, Ilias Apalodimas wrote: > > Hi Kojima-san, > > > > On Fri, 22 Jul 2022 at 05:36, Masahisa Kojima > > wrote: > > > > > > This series adds t

Re: [PATCH v10 00/10] enable menu-driven UEFI variable maintenance

2022-07-26 Thread Takahiro Akashi
ext4 work in a different way against a *directory* here. For instance, try this both on fat and ext4 ("test -e" internally uses fs_exists().) => test -e virtio X:Y / => echo $? I think eficonfig_select_file() can be rewritten with fs_opendir()/fs_readdir(). (Or much more preferab

Re: [RESEND v9 1/9] efi_loader: move udevice pointer into struct efi_object

2022-07-21 Thread Takahiro Akashi
On Wed, Jul 20, 2022 at 09:44:43AM +0200, Heinrich Schuchardt wrote: > On 7/20/22 01:56, Takahiro Akashi wrote: > > On Sun, Jul 17, 2022 at 10:09:42AM +0200, Heinrich Schuchardt wrote: > > > On 7/15/22 16:47, Masahisa Kojima wrote: > > > > This is a preparation patch

Re: [RESEND v9 1/9] efi_loader: move udevice pointer into struct efi_object

2022-07-19 Thread Takahiro Akashi
ader); > > > @@ -609,7 +608,7 @@ static int efi_disk_create_part(struct udevice *dev) > > >   log_err("Adding partition for %s failed\n", dev->name); > > >   return -1; > > >   } > > > -    disk->dev = dev; > > > +    e

Re: [PATCH v5 20/23] FWU: synquacer: Generate dfu_alt_info from devicetree partition

2022-07-19 Thread Takahiro Akashi
message. > > > For some reason, we get "No EFI system partition" during bootup and > the mmc does not show up in 'efidebug devices' unless we manually run > this (or mmc part) command. As far as UEFI is concerned, any U-Boot block device will be recognized as a UEFI disk

Re: [RESEND v9 1/9] efi_loader: move udevice pointer into struct efi_object

2022-07-19 Thread Takahiro Akashi
ev) > > > > if (direction == EFI_DISK_READ) > > n = blk_dread(desc, lba, blocks, buffer); > > else > > @@ -552,7 +551,7 @@ static int efi_disk_create_raw(struct udevice *dev) > > > > return -1; >

Re: [PATCH v8 2/9] eficonfig: menu-driven addition of UEFI boot option

2022-07-13 Thread Takahiro Akashi
Heinrich, On Sun, Jul 10, 2022 at 11:03:43AM +0200, Heinrich Schuchardt wrote: > On 6/19/22 06:56, Masahisa Kojima wrote: > > This commit add the "eficonfig" command. > > The "eficonfig" command implements the menu-driven UEFI boot option > > maintenance feature. This commit implements the

Re: [PATCH v8 2/9] eficonfig: menu-driven addition of UEFI boot option

2022-07-11 Thread Takahiro Akashi
les[i], > > _guid_device_path, ); > > + if (ret != EFI_SUCCESS) > > + continue; > > + ret = efi_protocol_open(handler, (void **)_path, > > + efi_root, NULL, > > EFI_OPEN_PROTOCOL_GET_PROTOCOL);

Re: [RFC PATCH 3/3] eficonfig: add "Delete Key" menu entry

2022-07-11 Thread Takahiro Akashi
cpy(>auth_info.cert_type, _guid_cert_type_pkcs7); > > + if (db) > > + memcpy((u8 *)auth + sizeof(struct > > efi_variable_authentication_2), db, *size); > > + > > + *new_db = auth; > > +

Re: [PATCH v6 00/13] FWU: Add FWU Multi Bank Update feature support

2022-07-04 Thread Takahiro Akashi
ule variable that was created > earlier to check for the type of capsule > * Remove use of payload variable in create_empty_capsule() as > suggested by Etienne > * Initialise the struct efi_capsule_header as suggested by Etienne > * Add some description about the reasoning for accept

Re: [PATCH v8 0/9] enable menu-driven UEFI variable maintenance

2022-06-19 Thread Takahiro Akashi
eam_v8_0618 > > [Major Changes] > - command name is changed from "efimenu" to "eficonfig" > - there is detailed chang At first glance, the behavior looks good. Thanks, -Takahiro Akashi > Masahisa Kojima (9): > efi_loader: expose END device path node >

Re: [PATCH v5 23/23] sandbox: fwu: Add support for testing FWU feature on sandbox

2022-06-16 Thread Takahiro Akashi
Sughosh, On Wed, Jun 15, 2022 at 05:40:12PM +0530, Sughosh Ganu wrote: > On Wed, 15 Jun 2022 at 11:07, Takahiro Akashi > wrote: > > > > On Thu, Jun 09, 2022 at 06:00:10PM +0530, Sughosh Ganu wrote: > > > Add a python test script for testing the FWU Multi Bank

Re: [PATCH v5 11/23] mkeficapsule: Add support for generating empty capsules

2022-06-16 Thread Takahiro Akashi
Sughosh, On Thu, Jun 16, 2022 at 12:42:08PM +0530, Sughosh Ganu wrote: > hi Takahiro, > > On Thu, 16 Jun 2022 at 06:31, Takahiro Akashi > wrote: > > > > Sughosh, > > > > On Wed, Jun 15, 2022 at 04:19:56PM +0530, Sughosh Ganu wrote: > > >

Re: [PATCH v5 11/23] mkeficapsule: Add support for generating empty capsules

2022-06-15 Thread Takahiro Akashi
Sughosh, On Wed, Jun 15, 2022 at 04:19:56PM +0530, Sughosh Ganu wrote: > On Wed, 15 Jun 2022 at 10:41, Takahiro Akashi > wrote: > > > > On Thu, Jun 09, 2022 at 05:59:58PM +0530, Sughosh Ganu wrote: > > > The Dependable Boot specification[1] describes the structure o

Re: [PATCH v5 08/23] FWU: Add boot time checks as highlighted by the FWU specification

2022-06-15 Thread Takahiro Akashi
\n"); > > + return 0; > > + } > > + > > + ret = fwu_mdata_check(); > > + if (ret) { > > + return 0; > > + } > > + > > + /* > > +* Get the Boot Index, i.e. the bank from > > +* whic

Re: [PATCH v5 23/23] sandbox: fwu: Add support for testing FWU feature on sandbox

2022-06-15 Thread Takahiro Akashi
bank. IIUC, your test doesn't not exercise neither accept-capsule nor revert capsule. I think those tests are crucial for verifying the code. -Takahiro Akashi > The FWU metadata is being stored on the SPI NOR flash, along with the > updatable images, and the FWU metadata driver for MTD devic

Re: [PATCH v5 23/23] sandbox: fwu: Add support for testing FWU feature on sandbox

2022-06-14 Thread Takahiro Akashi
ox_flattree') > @pytest.mark.buildconfigspec('efi_capsule_firmware_fit') > @pytest.mark.buildconfigspec('efi_capsule_on_disk') > diff --git a/test/py/tests/test_fwu_updates/capsule_defs.py > b/test/py/tests/test_fwu_updates/capsule_defs.py > new file mode 100644 > index 00..5

Re: [PATCH v5 11/23] mkeficapsule: Add support for generating empty capsules

2022-06-14 Thread Takahiro Akashi
ot;Select either of Accept or Revert capsule > generation\n"); > + exit(EXIT_FAILURE); > + } > + > + empty_capsule = (capsule == CAPSULE_ACCEPT || > + capsule == CAPSULE_REVERT); > + So empty_capsule is redundant as empty_capsule is equival

Re: [PATCH v7 0/9] enable menu-driven UEFI variable maintenance

2022-06-14 Thread Takahiro Akashi
a boot option (for a removable disk) which is automatically inserted by "bootmenu" from BootOrder. (The given boot option may still exist as a variable.) - As I said above, "Save" and "Quit" should be shown. * "Delete" - The header line is "S

Re: [PATCH v6 1/6] efi_loader: menu-driven addition of UEFI boot option

2022-05-24 Thread Takahiro Akashi
On Mon, May 16, 2022 at 08:00:37PM +0900, Masahisa Kojima wrote: > This commit supports the menu-driven UEFI boot option addition. > User can select the block device volume having > efi_simple_file_system_protocol and select the file corresponding > to the Boot variable. Then user enter the

Re: [PATCH v6 5/6] doc:bootmenu: add description for UEFI boot support

2022-05-17 Thread Takahiro Akashi
; + > +Example bootmenu is as below:: > + > +*** U-Boot Boot Menu *** > + > + mmc 0:1 > + mmc 0:2 > + debian > + nvme 0:1 > + ubuntu > + nvme 0:2 > + usb 0:2 If I understand your patch correctly, menus are initially sorte

Re: [PATCH v5 10/17] bootmenu: add distro boot entry

2022-05-12 Thread Takahiro Akashi
On Sun, May 01, 2022 at 11:48:40PM +0200, Heinrich Schuchardt wrote: > On 4/28/22 10:09, Masahisa Kojima wrote: > > This commit adds the distro_boot entries into the bootmenu. > > The bootmenu read the "boot_targets" U-Boot environment variable > > and enumerate it. > > User can select the distro

Re: [PATCH v4 00/11] enable menu-driven boot device selection

2022-03-24 Thread Takahiro Akashi
e Boot Order" - I like a more intuitive operation here. Say, select an item with "Enter" and then use "Up" and "Down" to move it around. - Probably, it would be better to have the final confirmation, like "Do you want to save the change?"

Re: [RFC PATCH v3 2/2] bootmenu: add UEFI and disto_boot entries

2022-03-09 Thread Takahiro Akashi
On Thu, Mar 10, 2022 at 10:50:57AM +0900, Takahiro Akashi wrote: > On Wed, Mar 09, 2022 at 04:34:42PM +0200, Ilias Apalodimas wrote: > > Hi Kojima-san > > > > On Tue, Mar 08, 2022 at 11:07:45PM +0900, Masahisa Kojima wrote: > > > This commit adds

Re: [RFC PATCH v3 2/2] bootmenu: add UEFI and disto_boot entries

2022-03-09 Thread Takahiro Akashi
itle) { > > + free(entry); > > + goto cleanup; > > + } > > + utf8_utf16_strncpy(, token,len); > > + sprintf(entry->key, "%d", i); > > + entry->num = i; > > + e

Re: [RFC PATCH v3 1/2] efi_loader: introduce "bootefi bootindex" command

2022-03-08 Thread Takahiro Akashi
On Wed, Mar 09, 2022 at 09:47:25AM +0900, Masahisa Kojima wrote: > On Tue, 8 Mar 2022 at 23:17, Takahiro Akashi > wrote: > > > > On Tue, Mar 08, 2022 at 11:07:44PM +0900, Masahisa Kojima wrote: > > > This commit introduces the new command "bootefi bootindex&quo

Re: [RFC PATCH v3 1/2] efi_loader: introduce "bootefi bootindex" command

2022-03-08 Thread Takahiro Akashi
xt 1 (for BOOT0001) $ bootefi bootmgr -Takahiro Akashi > Signed-off-by: Masahisa Kojima > --- > Changes in v3: > - newly created > > cmd/bootefi.c| 42 > include/efi_loader.h | 1 + > lib/efi_loader/efi_bootmgr.

Re: [PATCH 2/3] mkeficapsule: Remove dtb related options

2021-07-16 Thread Takahiro Akashi
--- a/tools/mkeficapsule.c > > +++ b/tools/mkeficapsule.c > > @@ -4,14 +4,12 @@ > > * Author: AKASHI Takahiro > > */ > > > > -#include > > #include > > #include > > #include > > #include > > #include > > #incl

Re: [PATCH 1/3] efi_capsule: Move signature from DTB to .rodata

2021-07-16 Thread Takahiro Akashi
> > { > > u8 *buf; > > int ret; > > - void *fdt_pkey, *pkey; > > + void *stored_pkey, *pkey; > > efi_uintn_t pkey_len; > > uint64_t monotonic_count; > > struct efi_signature_store *trusts

Re: [PATCH v6 1/3] lib: fix build error for secure boot and capsule authentication

2021-05-13 Thread Takahiro Akashi
son to do so if there are more than one users. Otherwise, every new user of hash_calculate() needs to modify generic Makefile. -Takahiro Akashi > obj-$(CONFIG_SHA1) += sha1.o > obj-$(CONFIG_SHA256) += sha256.o > obj-$(CONFIG_SHA512_ALGO) += sha512.o > -- > 2.17.1 >

Re: [PATCH v3 1/2] efi_loader: expose efi_image_parse() even if UEFI Secure Boot is disabled

2021-05-09 Thread Takahiro Akashi
;> +return true; and the succeeding check, if (!efi_secure_boot_enabled()) return true; are somehow redundant. But in the latter case, I'm afraid that a compiler cannot optimize out the rest of the logic in efi_image_authenticate().

Re: [PATCH v2 12/13] doc: qemu: arm64: Fix the documentation of capsule update

2021-04-20 Thread Takahiro Akashi
Heinrich, Sughosh, On Mon, Apr 19, 2021 at 04:35:15AM +0200, Heinrich Schuchardt wrote: > Am 19. April 2021 04:24:37 MESZ schrieb Masami Hiramatsu > : > >Hi, > > > >2021年4月19日(月) 9:37 Takahiro Akashi : > >> > >> Sughosh, > >> > >>

Re: [PATCH v2 12/13] doc: qemu: arm64: Fix the documentation of capsule update

2021-04-18 Thread Takahiro Akashi
uses openssl command like: openssl smime -sign -binary -outform DER -md sha256 \ -signer <...> -certfile <...> (See PayloadDescriptor.Encode in the script.) The output from the standard output is exactly what you want to use to build

Re: [PATCH 11/13] board: synquacer: Add DeveloperBox 96boards EE support

2021-04-14 Thread Takahiro Akashi
On Wed, Apr 14, 2021 at 03:29:23PM +0900, Masami Hiramatsu wrote: > Hi Takahiro, > > 2021年4月14日(水) 13:48 Takahiro Akashi : > > > > > > So why not define UEFI load options (BOOT) and use UEFI boot manager > > > > ("bootefi bootmgr")? > &

Re: [PATCH 11/13] board: synquacer: Add DeveloperBox 96boards EE support

2021-04-13 Thread Takahiro Akashi
On Wed, Apr 14, 2021 at 11:06:36AM +0900, Masami Hiramatsu wrote: > Hi Takahiro, > > 2021年4月14日(水) 10:27 Takahiro Akashi : > > > > On Wed, Apr 14, 2021 at 10:12:42AM +0900, Masami Hiramatsu wrote: > > > Hello Tom, > > > > > > 2021年4月14日(水) 2:47

Re: [PATCH 11/13] board: synquacer: Add DeveloperBox 96boards EE support

2021-04-13 Thread Takahiro Akashi
gt; > + "setenv fdt_size ${filesize} &&" > > > \ > > > + "setenv bootargs ${mmc_bootargs1} && " > > > \ > > > + "booti ${kernel_addr} - ${fdt_addr}\0" > > > \ > > > + "mmc_bootargs1=" > > > \ > > > + "root=/dev/mmcblk0p1 rw dtb=0x${fdt_addr},0x${fdt_size} " > > > \ > > > + "${basic_bootargs} \0" > > > > You are strongly encouraged to use the generic distro boot features > > instead. This may require a little work to handle the device tree. > > OK, anyway I can just drop it, because this platform is expected to use > UEFI boot (the DeveloperBox is shipped with EDK2). > I left this just for reference. So why not define UEFI load options (BOOT) and use UEFI boot manager ("bootefi bootmgr")? That is the way how UEFI (at least boot manager) boots the kernel. -Takahiro Akashi > Thank you, > > -- > Masami Hiramatsu

Re: [PATCH v3 7/8] efi_loader: signature: rework for intermediate

2020-07-16 Thread Takahiro Akashi
if (!cert) { > +if (IS_ERR(cert)) { That's correct. Can you post a fix patch, please? # There was the same problem with pkcs7_parse_message(), # and I have fixed it before. Thanks, -Takahiro Akashi > > Regards > Robert

Re: [RFC PATCH 4/4] qemu: arm64: Add support for efi firmware management protocol routines

2020-03-30 Thread Takahiro Akashi
e > +#include > +#include > + > +#define QEMU_UBOOT_IMAGE_INDEX 0x1 > +#define QEMU_UBOOT_IMAGE 0x1 > + > +#define UBOOT_FILE "bl33.bin" It would be better to parameterize this file name as a configuration option so as to make this solution

Re: [RFC PATCH 1/4] efidebug: capsule: Add a command to update capsule on disk

2020-03-30 Thread Takahiro Akashi
t > said, I can drop the patch if you prefer just having the version which > updates the capsule from memory. "efidebug capsule" command, like other subcommands of efidebug, is a tool mainly for test/debug purpose. Keep the functionality in the command won't bother anyone i

Re: [U-Boot] [PATCH v4 1/1] efi_loader: add RuntimeServicesSupported variable

2019-06-16 Thread Takahiro Akashi
cro is intended for CONFIG_SPL_XXX as well. For UEFI, however, we won't support UEFI in SPL. -Takahiro Akashi > v3 > Ensure that efi_runtime_services_supported is initialized. > v2 > Currently we only support SetVirtualAddress() for all systems and > ResetSyst

Re: [U-Boot] [PATCH v2 1/1] efi_loader: unload applications upon Exit()

2019-05-07 Thread Takahiro Akashi
On Wed, May 08, 2019 at 02:59:08AM +0200, Heinrich Schuchardt wrote: > On 5/8/19 1:59 AM, Takahiro Akashi wrote: > >On Tue, May 07, 2019 at 09:13:24PM +0200, Heinrich Schuchardt wrote: > >>Implement unloading of images in the Exit() boot services: > >> > >>* un

Re: [U-Boot] [PATCH v2 1/1] efi_loader: unload applications upon Exit()

2019-05-07 Thread Takahiro Akashi
gt; if (ret != EFI_SUCCESS) > EFI_PRINT("%s: out of memory\n", __func__); > } > + if (image_obj->image_type == IMAGE_SUBSYSTEM_EFI_APPLICATION || > + exit_status != EFI_SUCCESS) > + efi_delete_image(

Re: [U-Boot] [PATCH v2 1/1] efi_loader: optional data in load options are binary

2019-05-07 Thread Takahiro Akashi
On Tue, May 07, 2019 at 06:54:45PM +0200, Heinrich Schuchardt wrote: > On 5/7/19 9:30 AM, Takahiro Akashi wrote: > >On Tue, May 07, 2019 at 09:12:56AM +0200, Heinrich Schuchardt wrote: > >>On 5/7/19 8:16 AM, Takahiro Akashi wrote: > >>>On Tue, May 07, 2019 at 08:04:2

Re: [U-Boot] [PATCH v2 1/1] efi_loader: optional data in load options are binary

2019-05-07 Thread Takahiro Akashi
On Tue, May 07, 2019 at 09:12:56AM +0200, Heinrich Schuchardt wrote: > On 5/7/19 8:16 AM, Takahiro Akashi wrote: > > On Tue, May 07, 2019 at 08:04:26AM +0200, Heinrich Schuchardt wrote: > >> On 5/7/19 7:16 AM, Heinrich Schuchardt wrote: > >>> On 5/7/19 3:53 AM, Takahi

Re: [U-Boot] [PATCH 4/4] efi_loader: unload applications upon Exit()

2019-05-07 Thread Takahiro Akashi
On Tue, May 07, 2019 at 07:50:48AM +0200, Heinrich Schuchardt wrote: > On 5/7/19 6:39 AM, Takahiro Akashi wrote: > >On Sat, May 04, 2019 at 10:36:36AM +0200, Heinrich Schuchardt wrote: > >>Implement unloading of images in the Exit() boot services: > >> > >>* un

Re: [U-Boot] [PATCH v2 1/1] efi_loader: optional data in load options are binary

2019-05-07 Thread Takahiro Akashi
On Tue, May 07, 2019 at 08:04:26AM +0200, Heinrich Schuchardt wrote: > On 5/7/19 7:16 AM, Heinrich Schuchardt wrote: > >On 5/7/19 3:53 AM, Takahiro Akashi wrote: > >>On Tue, Apr 30, 2019 at 08:11:15AM +0200, Heinrich Schuchardt wrote: > >>>The field boot OptionalData

Re: [U-Boot] [PATCH 1/4] efi_loader: mark started images

2019-05-07 Thread Takahiro Akashi
On Tue, May 07, 2019 at 08:05:48AM +0200, Heinrich Schuchardt wrote: > On 5/7/19 7:58 AM, Takahiro Akashi wrote: > >On Tue, May 07, 2019 at 07:53:41AM +0200, Heinrich Schuchardt wrote: > >>On 5/7/19 7:44 AM, Takahiro Akashi wrote: > >>>On Tue, May 07, 2019 at 07:26:4

Re: [U-Boot] [PATCH 1/4] efi_loader: mark started images

2019-05-06 Thread Takahiro Akashi
On Tue, May 07, 2019 at 07:53:41AM +0200, Heinrich Schuchardt wrote: > On 5/7/19 7:44 AM, Takahiro Akashi wrote: > >On Tue, May 07, 2019 at 07:26:46AM +0200, Heinrich Schuchardt wrote: > >>On 5/7/19 5:02 AM, Takahiro Akashi wrote: > >>>On Sat, May 04, 2019 at 10:36:3

Re: [U-Boot] [PATCH 1/4] efi_loader: mark started images

2019-05-06 Thread Takahiro Akashi
On Tue, May 07, 2019 at 07:26:46AM +0200, Heinrich Schuchardt wrote: > On 5/7/19 5:02 AM, Takahiro Akashi wrote: > >On Sat, May 04, 2019 at 10:36:33AM +0200, Heinrich Schuchardt wrote: > >>In UnloadImage() we need to know if an image is already started. > >> > >>

Re: [U-Boot] [PATCH 4/4] efi_loader: unload applications upon Exit()

2019-05-06 Thread Takahiro Akashi
if (ret != EFI_SUCCESS) > EFI_PRINT("%s: out of memory\n", __func__); > } > + if (image_obj->image_type == IMAGE_SUBSYSTEM_EFI_APPLICATION || > + exit_status != EFI_SUCCESS) > + efi_delete_i

Re: [U-Boot] [PATCH 1/4] efi_loader: mark started images

2019-05-06 Thread Takahiro Akashi
gt; + */ > +enum efi_object_type { > + EFI_OBJECT_TYPE_UNDEFINED = 0, > + EFI_OBJECT_TYPE_LOADED_IMAGE, > + EFI_OBJECT_TYPE_STARTED_IMAGE, > +}; It sounds *status*, not *type*. In a separate patch, you added U_BOOT_FIRMWARE. We should distinguish status and type for future enhancement and to avoid a

Re: [U-Boot] [PATCH v2 1/1] efi_loader: optional data in load options are binary

2019-05-06 Thread Takahiro Akashi
ot variable. While optional_data holds u8 string in calling efi_serialize_load_option(), it holds u16 string in leaving from efi_deserialize_load_option(). We should handle it in a consistent way if you want to keep optional_data as "const u8." Thanks, -Takahiro Akashi > When printing b

Re: [U-Boot] [PATCH v2 2/2] efi_loader: parameter checks in StartImage and Exit()

2019-04-10 Thread Takahiro Akashi
in Exit() check that the image is the current image Does this check logic work for a case of nested calls of StartImage() at all? -Takahiro Akashi > Signed-off-by: Heinrich Schuchardt > --- > v2 > avoid `parent_image` may be used uninitialized > --- > l

Re: [U-Boot] [U-Boot, RESEND, v5, 3/7] test: fs: Add filesystem integrity checks

2019-04-09 Thread Takahiro Akashi
On Wed, Apr 10, 2019 at 11:51:20AM +0900, Takahiro Akashi wrote: > On Tue, Apr 09, 2019 at 10:25:14PM -0400, Tom Rini wrote: > > On Wed, Apr 10, 2019 at 10:37:42AM +0900, Takahiro Akashi wrote: > > > On Tue, Apr 09, 2019 at 08:19:40PM -0400, Tom Rini wrote: > > > >

Re: [U-Boot] [U-Boot, RESEND, v5, 3/7] test: fs: Add filesystem integrity checks

2019-04-09 Thread Takahiro Akashi
On Tue, Apr 09, 2019 at 10:25:14PM -0400, Tom Rini wrote: > On Wed, Apr 10, 2019 at 10:37:42AM +0900, Takahiro Akashi wrote: > > On Tue, Apr 09, 2019 at 08:19:40PM -0400, Tom Rini wrote: > > > On Wed, Apr 10, 2019 at 02:10:12AM +0200, Heinrich Schuchardt wrote: > > > >

Re: [U-Boot] [U-Boot, RESEND, v5, 3/7] test: fs: Add filesystem integrity checks

2019-04-09 Thread Takahiro Akashi
e all of test/py/tests/test_fs/test_unlink.py fails if > you fsck the image in question after each test. If you apply > https://patchwork.ozlabs.org/patch/1041186/ (to avoid spurious ext4 > failures) and then https://patchwork.ozlabs.org/patch/1041181/ and run > 'make tests' you'll see the full output. I have no time to dig into this issue right now, but if you give me a log from fsck, particularly why fsck failed here, it would help me to understand the problem. # like the case of ext4, we might have to turn off # some option at fsck? Thanks, -Takahiro Akashi > -- > Tom ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

Re: [U-Boot] [PATCH v2 2/2] efi_loader: parameter checks in StartImage and Exit()

2019-04-08 Thread Takahiro Akashi
%ld, %zu, %p", image_handle, exit_status, > exit_data_size, exit_data); > > + /* Check parameters */ > + if (image_handle != current_image) > + goto out; > + ret = EFI_CALL(efi_open_protocol(image_handle, _guid_loaded_image, > +

Re: [U-Boot] [PATCH 1/1] efi_loader: correct parameter size in efi_allocate_pool

2019-03-19 Thread Takahiro Akashi
On Tue, Mar 19, 2019 at 07:59:37AM +0100, Heinrich Schuchardt wrote: > On 3/19/19 1:19 AM, Takahiro Akashi wrote: > > On Mon, Mar 18, 2019 at 08:32:23PM +0100, Heinrich Schuchardt wrote: > >> efi_allocate_pages() expects a (uint64_t *) pointer to pass the address of > >>

Re: [U-Boot] [PATCH 1/1] efi_loader: correct parameter size in efi_allocate_pool

2019-03-18 Thread Takahiro Akashi
for the fourth argument. If this is because the type of the argument is a pointer to "physical address," > - > +); > if (r == EFI_SUCCESS) { > + alloc = (struct efi_pool_allocation *)(uintptr_t)addr; we should use map_sysmem() here. Thanks, -T

Re: [U-Boot] [PATCH] qemu-arm: Add persistent environment support

2018-12-14 Thread Takahiro Akashi
On Thu, Dec 13, 2018 at 02:43:58AM +0200, Tuomas Tynkkynen wrote: > Hi Sumit, Takahiro, > > On Wed, 12 Dec 2018 10:42:56 +0900 > Takahiro Akashi wrote: > > > On Tue, Dec 11, 2018 at 06:04:05PM +0530, Sumit Garg wrote: > > > On Mon, 26 Nov 2018 at

Re: [U-Boot] [PATCH] qemu-arm: Add persistent environment support

2018-12-11 Thread Takahiro Akashi
On Wed, Dec 12, 2018 at 12:14:27PM +0530, Sumit Garg wrote: > On Wed, 12 Dec 2018 at 07:09, Takahiro Akashi > wrote: > > > > On Tue, Dec 11, 2018 at 06:04:05PM +0530, Sumit Garg wrote: > > > On Mon, 26 Nov 2018 at 16:51, Sumit Garg wrote: > > > >

Re: [U-Boot] [PATCH] qemu-arm: Add persistent environment support

2018-12-11 Thread Takahiro Akashi
d in it). Put bl1.bin in flash0(0x0-0x400) and put fip.bin in flash1(0x400-0x800). Please note that, with secure=on, flash0 is in secure and flash1 is in non-secure. While I admit that your patch is workable, my point is that there are different use cases and it may not be a good idea

Re: [U-Boot] [PATCH 0/4] efi_loader: non-volatile variables support

2018-12-06 Thread Takahiro Akashi
olatile efi variable. I know the issue, but > IMHO, support should be added to "efi_set_variable" to save variable > with "EFI_VARIABLE_NON_VOLATILE" attribute to non volatile storage. I also hesitate to implement such a behavior to efi_set_variable as it ends up writing to fla

  1   2   >