* [PATCH] fwu: Allow code to properly decode trial state
@ 2023-07-13 14:35 Michal Simek
2023-07-15 14:45 ` Jassi Brar
2023-07-25 21:13 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Michal Simek @ 2023-07-13 14:35 UTC (permalink / raw)
To: u-boot, git
Cc: Etienne Carriere, Ilias Apalodimas, Jassi Brar, Masahisa Kojima,
Patrick Delaunay, Sughosh Ganu
Current code after capsule update (mtd write) is not changing active_index
in mdata to previous_active_index.
On the reboot this is shown but showing message
"Boot idx 1 is not matching active idx 0, changing active_idx"
which is changing active_idx and writing mdata to flash.
But when this message is visible it is not checking which state that images
are. If they have acceptance bit setup to yes everything is fine and valid
images are booted (doesn't mean the latest one).
But if acceptance bit is no and images are in trial state in_trial variable
is never setup. Which means that from new flashed image stable image can be
rewritten because in_trial is not setup properly.
Signed-off-by: Michal Simek <michal.simek@amd.com>
---
lib/fwu_updates/fwu.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/lib/fwu_updates/fwu.c b/lib/fwu_updates/fwu.c
index cd5c3b64773b..38b50cb7628c 100644
--- a/lib/fwu_updates/fwu.c
+++ b/lib/fwu_updates/fwu.c
@@ -666,8 +666,6 @@ static int fwu_boottime_checks(void *ctx, struct event *event)
ret = fwu_set_active_index(boot_idx);
if (!ret)
boottime_check = 1;
-
- return 0;
}
if (efi_init_obj_list() != EFI_SUCCESS)
--
2.36.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] fwu: Allow code to properly decode trial state
2023-07-13 14:35 [PATCH] fwu: Allow code to properly decode trial state Michal Simek
@ 2023-07-15 14:45 ` Jassi Brar
2023-07-25 21:13 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Jassi Brar @ 2023-07-15 14:45 UTC (permalink / raw)
To: Michal Simek
Cc: u-boot, git, Etienne Carriere, Ilias Apalodimas, Masahisa Kojima,
Patrick Delaunay, Sughosh Ganu
On Thu, 13 Jul 2023 at 09:35, Michal Simek <michal.simek@amd.com> wrote:
>
> Current code after capsule update (mtd write) is not changing active_index
> in mdata to previous_active_index.
> On the reboot this is shown but showing message
> "Boot idx 1 is not matching active idx 0, changing active_idx"
> which is changing active_idx and writing mdata to flash.
>
> But when this message is visible it is not checking which state that images
> are. If they have acceptance bit setup to yes everything is fine and valid
> images are booted (doesn't mean the latest one).
> But if acceptance bit is no and images are in trial state in_trial variable
> is never setup. Which means that from new flashed image stable image can be
> rewritten because in_trial is not setup properly.
>
> Signed-off-by: Michal Simek <michal.simek@amd.com>
> ---
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fwu: Allow code to properly decode trial state
2023-07-13 14:35 [PATCH] fwu: Allow code to properly decode trial state Michal Simek
2023-07-15 14:45 ` Jassi Brar
@ 2023-07-25 21:13 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2023-07-25 21:13 UTC (permalink / raw)
To: Michal Simek
Cc: u-boot, git, Etienne Carriere, Ilias Apalodimas, Jassi Brar,
Masahisa Kojima, Patrick Delaunay, Sughosh Ganu
[-- Attachment #1: Type: text/plain, Size: 942 bytes --]
On Thu, Jul 13, 2023 at 04:35:24PM +0200, Michal Simek wrote:
> Current code after capsule update (mtd write) is not changing active_index
> in mdata to previous_active_index.
> On the reboot this is shown but showing message
> "Boot idx 1 is not matching active idx 0, changing active_idx"
> which is changing active_idx and writing mdata to flash.
>
> But when this message is visible it is not checking which state that images
> are. If they have acceptance bit setup to yes everything is fine and valid
> images are booted (doesn't mean the latest one).
> But if acceptance bit is no and images are in trial state in_trial variable
> is never setup. Which means that from new flashed image stable image can be
> rewritten because in_trial is not setup properly.
>
> Signed-off-by: Michal Simek <michal.simek@amd.com>
> Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-25 21:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-13 14:35 [PATCH] fwu: Allow code to properly decode trial state Michal Simek
2023-07-15 14:45 ` Jassi Brar
2023-07-25 21:13 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox