Skip to content

Commit 7065b79

Browse files
committed
[nrf noup] Align with IronSide APIs
Use APIs defined in the following upstream commit: f324a1540f57c7ea229fb047c542de80c4149aea Ref: NCSDK-36359 Signed-off-by: Tomasz Chyrowicz <[email protected]>
1 parent 66d5c91 commit 7065b79

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

boot/zephyr/ironside_counters/ironside_counters.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fih_int boot_nv_security_counter_get(uint32_t image_id, fih_int *security_cnt)
3030
FIH_RET(FIH_FAILURE);
3131
}
3232

33-
if (image_id > IRONSIDE_COUNTER_MAX) {
33+
if (image_id > IRONSIDE_COUNTER_NUM) {
3434
FIH_RET(FIH_FAILURE);
3535
}
3636

@@ -59,7 +59,7 @@ fih_int boot_nv_security_counter_get(uint32_t image_id, fih_int *security_cnt)
5959

6060
int32_t boot_nv_security_counter_update(uint32_t image_id, uint32_t img_security_cnt)
6161
{
62-
if ((img_security_cnt > IRONSIDE_COUNTER_MAX_VALUE) || (image_id > IRONSIDE_COUNTER_MAX)) {
62+
if ((img_security_cnt > IRONSIDE_COUNTER_MAX_VALUE) || (image_id > IRONSIDE_COUNTER_NUM)) {
6363
return -BOOT_EBADARGS;
6464
}
6565

@@ -89,7 +89,7 @@ fih_int boot_nv_security_counter_is_update_possible(uint32_t image_id, uint32_t
8989

9090
int32_t boot_nv_security_counter_lock(uint32_t image_id)
9191
{
92-
if (image_id > IRONSIDE_COUNTER_MAX) {
92+
if (image_id > IRONSIDE_COUNTER_NUM) {
9393
return -BOOT_EBADARGS;
9494
}
9595

0 commit comments

Comments
 (0)