From b8e83033f4eaace15834540fc1e049923a551e11 Mon Sep 17 00:00:00 2001 From: Roland Mikhel Date: Thu, 27 Apr 2023 15:36:24 +0200 Subject: [PATCH] bootutil: Add capability to test hw-rollback-prot Signed-off-by: Roland Mikhel Change-Id: I3dee0baf27b8cae78b87135ea7447556b06fdefd --- boot/bootutil/include/bootutil/caps.h | 1 + boot/bootutil/src/caps.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/boot/bootutil/include/bootutil/caps.h b/boot/bootutil/include/bootutil/caps.h index 3c0ffb3649..6448f537df 100644 --- a/boot/bootutil/include/bootutil/caps.h +++ b/boot/bootutil/include/bootutil/caps.h @@ -50,6 +50,7 @@ uint32_t bootutil_get_caps(void); #define BOOTUTIL_CAP_AES256 (1<<14) #define BOOTUTIL_CAP_RAM_LOAD (1<<15) #define BOOTUTIL_CAP_DIRECT_XIP (1<<16) +#define BOOTUTIL_CAP_HW_ROLLBACK_PROT (1<<17) /* * Query the number of images this bootloader is configured for. This diff --git a/boot/bootutil/src/caps.c b/boot/bootutil/src/caps.c index 63bcd64573..49bdfecf7c 100644 --- a/boot/bootutil/src/caps.c +++ b/boot/bootutil/src/caps.c @@ -75,6 +75,9 @@ uint32_t bootutil_get_caps(void) #if defined(MCUBOOT_DIRECT_XIP) res |= BOOTUTIL_CAP_DIRECT_XIP; #endif +#if defined(MCUBOOT_HW_ROLLBACK_PROT) + res |= BOOTUTIL_CAP_HW_ROLLBACK_PROT; +#endif return res; }