Infineon: Add cyw20829 platform, shared slot feature, json memory map, psoc6 xip
Based in 1.8.0 release of MCUBoot library
This commit adds CYW20829 Infineon platform support with following capabilities:
1. Overwrite and swap upgrade mode support
2. Multi-image with up to 4 images
3. Hardware security counter is supported for CYW20829 platform
Add XIP support for PSOC6 platform - place BOOT slot in external memory and execute it in place using SMIF in XIP mode
and some new features for Infineon devices.
1. Shared upgrade slot feature - use one shared area for upgrade slots of multiple images
2. Memory map defined using JSON file - define memory regions for bootloader and user app in conventional way using JSON file
diff --git a/sim/src/caps.rs b/sim/src/caps.rs
index c626ee6..3fbf4c3 100644
--- a/sim/src/caps.rs
+++ b/sim/src/caps.rs
@@ -1,6 +1,6 @@
// Copyright (c) 2017-2019 Linaro LTD
// Copyright (c) 2019 JUUL Labs
-// Copyright (c) 2019 Arm Limited
+// Copyright (c) 2019-2021 Arm Limited
//
// SPDX-License-Identifier: Apache-2.0
@@ -25,7 +25,10 @@
DowngradePrevention = (1 << 12),
EncX25519 = (1 << 13),
Bootstrap = (1 << 14),
- SwapUsingStatus = (1 << 15),
+ Aes256 = (1 << 15),
+ RamLoad = (1 << 16),
+ DirectXip = (1 << 17),
+ SwapUsingStatus = (1 << 18),
}
impl Caps {
@@ -39,6 +42,12 @@
pub fn get_num_images() -> usize {
(unsafe { bootutil_get_num_images() }) as usize
}
+
+ /// Query if this configuration performs some kind of upgrade by writing to flash.
+ pub fn modifies_flash() -> bool {
+ // All other configurations perform upgrades by writing to flash.
+ !(Self::RamLoad.present() || Self::DirectXip.present())
+ }
}
extern "C" {