Hi Sherry,

 

Thanks for the explanations.

 

So if I understood correctly, there is a plan to support then? If so then when?

It is not an issue for us but just want to know to better schedule our work.

 

Regards,

Bohdan Hunko

 

Cypress Semiconductor Ukraine

Engineer

CSUKR CSS ICW SW FW

Mobile: +38099 50 19 714
Bohdan.Hunko@infineon.com

 

 

From: Sherry Zhang <Sherry.Zhang2@arm.com>
Sent: Friday, December 8, 2023 04:43
To: Hunko Bohdan (CSS ICW SW FW 3) <Bohdan.Hunko@infineon.com>; tf-m@lists.trustedfirmware.org
Cc: nd <nd@arm.com>
Subject: RE: Redundant checks in FWU code

 

Caution: This e-mail originated outside Infineon Technologies. Do not click on links or open attachments unless you validate it is safe.

 

Hi Bohdan,

 

FWU is not supported in DIRECT_XIP and RAM_LOAD upgrade strategies. The main reason is that, in FWU, it does not record which slot is the active running slot and always takes the primary slot as the active running slot. In the c source code, these two upgrade strategies are taken into consideration in component state management to make it easier to support them later in FWU.

 

Regards,

Sherry Zhang

 

From: Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.com>
Sent: Thursday, December 7, 2023 10:52 PM
To: tf-m@lists.trustedfirmware.org; Sherry Zhang <Sherry.Zhang2@arm.com>
Subject: Redundant checks in FWU code

 

Hi all,

 

In config/check_config.cmake there is a following code:

tfm_invalid_config((MCUBOOT_UPGRADE_STRATEGY STREQUAL " DIRECT_XIP " OR MCUBOOT_UPGRADE_STRATEGY STREQUAL "RAM_LOAD") AND TFM_PARTITION_FIRMWARE_UPDATE)

 

So looks like FWU is not supported when DIRECT_XIP or RAM_LOAD upgrade strategies are used.

 

But then in FWU code I see a lot of checks for DIRECT_XIP or RAM_LOAD, for example in fwu_bootloader_get_image_info:

    #if !defined(MCUBOOT_DIRECT_XIP) && !defined(MCUBOOT_RAM_LOAD) && \

        !defined(MCUBOOT_OVERWRITE_ONLY)

 

What is the point of these checks if it is impossible to compile FWU code with DIRECT_XIP Because of check in config/check_config.cmake?

 

Regards,

Bohdan Hunko

 

Cypress Semiconductor Ukraine

Engineer

CSUKR CSS ICW SW FW

Mobile: +38099 50 19 714
Bohdan.Hunko@infineon.com