Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions subsys/mgmt/mcumgr/grp/img_mgmt/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,6 @@ config MCUMGR_GRP_IMG_SLOT_INFO_HOOKS
This will enable the slot info function hooks which can be used to add additional
information to responses.

config MCUMGR_GRP_IMG_QSPI_XIP_SPLIT_IMAGE
bool "QSPI XIP Split image mode"
depends on MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP
help
This option should not be selected by users and should automatically be selected by
sysbuild if needed. This enables selecting the correct slot when running a QSPI XIP
split image application in DirectXIP mode.

config MCUMGR_GRP_IMG_NRF5340_BOOTUTIL_HOOK
bool "nRF5340 network core bootutil hook"
depends on SOC_NRF5340_CPUAPP && BOOT_IMAGE_ACCESS_HOOKS && MCUBOOT_NETWORK_CORE_IMAGE_NUMBER > -1
Expand Down
26 changes: 0 additions & 26 deletions subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,6 @@

#if !defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_RAM_LOAD)

#if USE_PARTITION_MANAGER
#include <flash_map_pm.h>

#ifdef PM_MCUBOOT_SECONDARY_PAD_SIZE
BUILD_ASSERT(PM_MCUBOOT_PAD_SIZE == PM_MCUBOOT_SECONDARY_PAD_SIZE);
#endif

#if CONFIG_BUILD_WITH_TFM
#define PM_ADDRESS_OFFSET (PM_MCUBOOT_PAD_SIZE + PM_TFM_SIZE)
#else
#define PM_ADDRESS_OFFSET (PM_MCUBOOT_PAD_SIZE)
#endif

#define FIXED_PARTITION_IS_RUNNING_APP_PARTITION(label) \
(FIXED_PARTITION_OFFSET(label) == (PM_ADDRESS - PM_ADDRESS_OFFSET))

#else /* ! USE_PARTITION_MANAGER */
#ifndef CONFIG_FLASH_LOAD_OFFSET
#error MCUmgr requires application to be built with CONFIG_FLASH_LOAD_OFFSET set \
to be able to figure out application running slot.
Expand All @@ -68,7 +51,6 @@ BUILD_ASSERT(PM_MCUBOOT_PAD_SIZE == PM_MCUBOOT_SECONDARY_PAD_SIZE);
#define FIXED_PARTITION_IS_RUNNING_APP_PARTITION(label) \
(FIXED_PARTITION_OFFSET(label) <= CONFIG_FLASH_LOAD_OFFSET && \
FIXED_PARTITION_OFFSET(label) + FIXED_PARTITION_SIZE(label) > CONFIG_FLASH_LOAD_OFFSET)
#endif /* USE_PARTITION_MANAGER */

BUILD_ASSERT(sizeof(struct image_header) == IMAGE_HEADER_SIZE,
"struct image_header not required size");
Expand Down Expand Up @@ -236,14 +218,6 @@ int img_mgmt_active_slot(int image)
/* Multi image does not support DirectXIP or RAM load currently */
#if CONFIG_MCUMGR_GRP_IMG_UPDATABLE_IMAGE_NUMBER > 1
slot = (image << 1);

#if defined(CONFIG_MCUMGR_GRP_IMG_QSPI_XIP_SPLIT_IMAGE) || \
defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP) || \
defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP_WITH_REVERT)
if (FIXED_PARTITION_IS_RUNNING_APP_PARTITION(slot1_partition)) {
slot += 1;
}
#endif
#elif defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_RAM_LOAD)
/* RAM load requires querying bootloader */
int rc;
Expand Down