Skip to content

Commit 093efc8

Browse files
tomchyrlubos
authored andcommitted
[nrf noup] loader: Add counter API implementation
Add the boot_nv_image_should_have_security_counter(..) API implementation inside the manifest-based loader. Ref: NCSDK-36359 Signed-off-by: Tomasz Chyrowicz <[email protected]>
1 parent 9d3275e commit 093efc8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

boot/bootutil/src/loader_manifest_xip.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,20 @@ boot_validate_slot(struct boot_loader_state *state, int slot,
202202
FIH_RET(fih_rc);
203203
}
204204

205+
#ifdef MCUBOOT_HW_ROLLBACK_PROT
206+
/**
207+
* Checks if the specified image should have a security counter present on it or not
208+
*
209+
* @param image_index Index of the image to check.
210+
*
211+
* @return true if security counter should be present; false if otherwise
212+
*/
213+
fih_ret boot_nv_image_should_have_security_counter(uint32_t image_index)
214+
{
215+
return FIH_SUCCESS;
216+
}
217+
#endif /* MCUBOOT_HW_ROLLBACK_PROT */
218+
205219
/**
206220
* Opens all flash areas and checks which contain an image with a valid header.
207221
*

0 commit comments

Comments
 (0)