Platform: Add new NV counter due to multiple image boot
Add new NV counter to the NV counter flash area to be used
by the bootloader as a separate second security counter
for another firmware image to enable multiple image boot.
Change-Id: I6cd3bf675317240e40cd0bc31a714070885791aa
Signed-off-by: David Vincze <david.vincze@arm.com>
diff --git a/bl2/ext/mcuboot/bootutil/src/loader.c b/bl2/ext/mcuboot/bootutil/src/loader.c
index c7c7173..ef2e812 100644
--- a/bl2/ext/mcuboot/bootutil/src/loader.c
+++ b/bl2/ext/mcuboot/bootutil/src/loader.c
@@ -392,7 +392,7 @@
goto done;
}
- rc = boot_nv_security_counter_update(0, img_security_cnt);
+ rc = boot_nv_security_counter_update(current_image, img_security_cnt);
if (rc != 0) {
goto done;
}