public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: Jassi Brar <jaswinder.singh@linaro.org>
Cc: jassisinghbrar@gmail.com, u-boot@lists.denx.de,
	ilias.apalodimas@linaro.org, etienne.carriere@linaro.org,
	trini@konsulko.com, sjg@chromium.org, sughosh.ganu@linaro.org,
	xypron.glpk@gmx.de, takahiro.akashi@linaro.org
Subject: Re: [PATCH v4 6/6] fwu: DeveloperBox: add support for FWU
Date: Fri, 14 Apr 2023 15:52:08 +0200	[thread overview]
Message-ID: <748fabc8-deef-a921-e99b-0f62769a5853@amd.com> (raw)
In-Reply-To: <CAJe_Zhc-MmrL_F1d14wO6ZQ0gp1woPj0dXZTaNMs74b+gqDEGQ@mail.gmail.com>



On 4/10/23 06:21, Jassi Brar wrote:
> On Wed, 29 Mar 2023 at 08:02, Michal Simek <michal.simek@amd.com> wrote:
>> On 3/27/23 23:16, jassisinghbrar@gmail.com wrote:
> 
> .....
>>> +
>>> +void fwu_plat_get_bootidx(uint *boot_idx)
>>> +{
>>> +     int ret;
>>> +     u32 active_idx;
>>> +     u32 *bootidx = boot_idx;
>>> +
>>> +     ret = fwu_get_active_index(&active_idx);
>>> +
>>
>> nit: remove this newline
>>
> ok
> 
>>> +     if (ret < 0)
>>> +             *bootidx = -1;
>>> +
>>> +     *bootidx = active_idx;
>>
>> Is this logic here right?
>> If fwu_get_active_index fails you setup bootidx to -1
>> and right after it you rewrite it to active_idx initialized in
>> fwu_get_active_index() to mdata->active_index.
>>
>> It means why to do *bootidx = -1; at all?
>>
> yes :) it's a silly remnant of history of changes.
> Actually this goes away after implementing the default/weak function.
> 
> 
>>> +}
>>> diff --git a/configs/synquacer_developerbox_defconfig b/configs/synquacer_developerbox_defconfig
>>> index 09e12b739b..d09684153a 100644
>>> --- a/configs/synquacer_developerbox_defconfig
>>> +++ b/configs/synquacer_developerbox_defconfig
>>> @@ -97,3 +97,11 @@ CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y
>>>    CONFIG_EFI_CAPSULE_ON_DISK=y
>>>    CONFIG_EFI_IGNORE_OSINDICATIONS=y
>>>    CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
>>> +CONFIG_EFI_SECURE_BOOT=y
>>> +CONFIG_FWU_MULTI_BANK_UPDATE=y
>>> +CONFIG_FWU_MDATA=y
>>> +CONFIG_FWU_MDATA_MTD=y
>>> +CONFIG_FWU_NUM_BANKS=2
>>> +CONFIG_FWU_NUM_IMAGES_PER_BANK=1
>>> +CONFIG_CMD_FWU_METADATA=y
>>> +CONFIG_TOOLS_MKFWUMDATA=y
>>
>> doesn't look like that it was created via savedefconfig.
>>
> Yes. I had some other config changes too and picked only the relevant
> ones together.

But this is defconfig not documentation.



> 
> 
>>> +And make a FIP image.::
>>> +
>>> +  cp build/synquacer/release/fip.bin SPI_NOR_NEWFIP.fd
>>> +  tools/fiptool/fiptool update --tb-fw build/synquacer/release/bl2.bin SPI_NOR_NEWFIP.fd
>>> +
>>> +UUIDs for the FWU Multi Bank Update
>>> +-----------------------------------
>>> +
>>> +FWU multi-bank update requires some UUIDs. The DeveloperBox platform uses
>>> +following UUIDs.
>>> +
>>> + - Location UUID for the FIP image: 17e86d77-41f9-4fd7-87ec-a55df9842de5
>>
>>
>> In past you have it listed at flash node in DT. I see you have removed it
>> between v3 and v4 without any note about it.
>> Is it still needed? And should it be listed in DT spec again?
>>
> After the dt change, we no longer require this. But the location_uuid
> is a standard member of an fwu_image_entry and cmd/fwu_mdata.c always
> print it. So I think this should be seen as just what a platform wants
> some unique id to be printed for the image (?).

I am fine with your explanation but documentation should make this clear that 
uuid is required by spec but not actually used by current implementation or 
description.

M


  reply	other threads:[~2023-04-14 13:52 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27 21:14 [PATCH v4 0/6] FWU: Add support for mtd backed feature on DeveloperBox jassisinghbrar
2023-03-27 21:15 ` [PATCH v4 1/6] FWU: Add FWU metadata access driver for MTD storage regions jassisinghbrar
2023-03-29 11:59   ` Michal Simek
2023-04-10  3:56     ` Jassi Brar
2023-04-14 13:56       ` Michal Simek
2023-04-14 15:09         ` Jassi Brar
2023-05-19 12:21           ` Ilias Apalodimas
2023-05-19 12:45             ` Michal Simek
2023-05-19 20:54               ` Tom Rini
2023-03-27 21:16 ` [PATCH v4 2/6] FWU: mtd: Add helper functions for accessing FWU metadata jassisinghbrar
2023-03-29 11:55   ` Michal Simek
2023-04-10  4:02     ` Jassi Brar
2023-03-27 21:16 ` [PATCH v4 3/6] tools: Add mkfwumdata tool for FWU metadata image jassisinghbrar
2023-03-29 12:28   ` Michal Simek
2023-04-10  4:05     ` Jassi Brar
2023-04-14 13:53       ` Michal Simek
2023-04-14 15:02         ` Jassi Brar
2023-04-17  6:37           ` Michal Simek
2023-04-17 13:48             ` Jassi Brar
2023-04-17 14:29               ` Michal Simek
2023-04-17 14:50                 ` Jassi Brar
2023-03-29 20:02   ` Simon Glass
2023-04-10  4:25     ` Jassi Brar
2023-04-14 13:52       ` Michal Simek
2023-04-19  1:46         ` Simon Glass
2023-04-19  2:57           ` Jassi Brar
2023-04-19 22:40             ` Simon Glass
2023-03-30  6:07   ` Heinrich Schuchardt
2023-04-10  4:11     ` Jassi Brar
2023-03-27 21:16 ` [PATCH v4 4/6] dt: fwu: developerbox: enable fwu banks and mdata regions jassisinghbrar
2023-03-29 11:52   ` Michal Simek
2023-03-27 21:16 ` [PATCH v4 5/6] configs: move to new flash layout and boot flow jassisinghbrar
2023-03-27 21:16 ` [PATCH v4 6/6] fwu: DeveloperBox: add support for FWU jassisinghbrar
2023-03-29 13:01   ` Michal Simek
2023-04-10  4:21     ` Jassi Brar
2023-04-14 13:52       ` Michal Simek [this message]
2023-03-29 13:14 ` [PATCH v4 0/6] FWU: Add support for mtd backed feature on DeveloperBox Michal Simek
2023-03-30 13:35 ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=748fabc8-deef-a921-e99b-0f62769a5853@amd.com \
    --to=michal.simek@amd.com \
    --cc=etienne.carriere@linaro.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=jaswinder.singh@linaro.org \
    --cc=sjg@chromium.org \
    --cc=sughosh.ganu@linaro.org \
    --cc=takahiro.akashi@linaro.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox