summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Marinho <jose.marinho@arm.com>2021-08-10 15:03:06 +0100
committerJose Marinho <jose.marinho@arm.com>2021-08-10 15:56:31 +0100
commit5477e1b8bc5e582feabe2eb781dde36b26346bbc (patch)
tree211bf80c020626fc159ad90599c7d555f90c1acc
parentc8c91f1e984f0682b309521b68bb387984f8c3aa (diff)
[FWU proto] set update_index explicitly at the end of the Update Agent initfwu_BET0
-rw-r--r--Drivers/FWUpdate/FWUpdate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Drivers/FWUpdate/FWUpdate.c b/Drivers/FWUpdate/FWUpdate.c
index aac491d9..1948e35a 100644
--- a/Drivers/FWUpdate/FWUpdate.c
+++ b/Drivers/FWUpdate/FWUpdate.c
@@ -191,7 +191,7 @@ VOID PrintMetadata (struct fwu_metadata *metadata)
DEBUG((EFI_D_INFO, "Crc32 %x\n", metadata->crc_32));
DEBUG((EFI_D_INFO, "metadata version %x\n", metadata->version));
DEBUG((EFI_D_INFO, "active idx %x\n", metadata->active_index));
- DEBUG((EFI_D_INFO, "update index %x\n", metadata->previous_active_index));
+ DEBUG((EFI_D_INFO, "previous active index %x\n", metadata->previous_active_index));
DEBUG((EFI_D_INFO, "matadata size %x\n", sizeof(*metadata)));
DEBUG((EFI_D_INFO, "-------------------------------------------\n"));
}
@@ -360,9 +360,6 @@ EFI_STATUS refresh_metadata(struct fwu_metadata *metadata)
PrintMetadata(metadata);
- //set the update_index value for the current run
- update_index = (metadata->active_index + 1) % FWU_NUM_BANKS;
-
gMmst->MmFreePool (Buffer);
return EFI_SUCCESS;
@@ -435,6 +432,9 @@ InitFWUpdateStore (
trial_state = is_trial_state(fwu_metadata);
+ //set the update_index value for the current run
+ update_index = (fwu_metadata->active_index + 1) % FWU_NUM_BANKS;
+
return Status;
}