Hi Bohdan,
The BOOT_TFM_SHARED_DATA_ region which ranges from BOOT_TFM_SHARED_DATA_BASE to BOOT_TFM_SHARED_DATA_LIMIT is used for sharing the “information” between BL2 and the SPE(TFM). At the end of the booting up of MCUboot, it writes down the image
information to that region. See the code
here and
here. The information includes the image version and the boot record which includes the image hash. When MCUboot handles over to TFM and TFM start running, it reads out the image information in that region. For example, at the initialization of the Firmware
Update partition, it reads out the image version information which is used by this partition. See the code
here.
Regards,
Sherry Zhang
From: David Hu <David.Hu@arm.com>
Sent: Wednesday, September 8, 2021 8:36 AM
To: Anton Komlev <Anton.Komlev@arm.com>; tf-m@lists.trustedfirmware.org; Sherry Zhang <Sherry.Zhang2@arm.com>
Cc: nd <nd@arm.com>
Subject: RE: BOOT_TFM_SHARED_DATA_* usage in arm/musca_b1
Hi Bohdan,
@Sherry Zhang is the author of FWU service. She can provide the implementation details.
Just some general information here. This shared boot area is used by boot loader to share some measured/boot data with TF-M services, such as Initial Attestation and FWU.
Regarding FWU, if I understand correctly, FWU leaves the actual shared data fetch and parse work to a bootloader specific “driver” under FWU service.
For example, FWU provides a reference implementation of MCUBoot code to access this shared data and acquire image TLV.
Please see `secure_fw/partitions/firmware_update/bootloader/mcuboot`
Sherry, please correct me if anything above is inaccurate.
Best regards,
Hu Ziji
From: TF-M <tf-m-bounces@lists.trustedfirmware.org>
On Behalf Of Anton Komlev via TF-M
Sent: Wednesday, September 8, 2021 1:21 AM
To: tf-m@lists.trustedfirmware.org
Cc: nd <nd@arm.com>
Subject: Re: [TF-M] BOOT_TFM_SHARED_DATA_* usage in arm/musca_b1
Hi Bohdan,
Assume you are aware that the CODE sharing topic was discussed in Tech forum on Oct 29, 2020.
You can find presentation and the records here:
https://www.trustedfirmware.org/meetings/tf-m-technical-forum/
Hope that helps,
Anton
From: TF-M <tf-m-bounces@lists.trustedfirmware.org>
On Behalf Of Bohdan Hunko via TF-M
Sent: Tuesday, September 7, 2021 5:27 PM
To: tf-m@lists.trustedfirmware.org
Subject: [TF-M] BOOT_TFM_SHARED_DATA_* usage in arm/musca_b1
Hi everyone!
I see definitions of BOOT_TFM_SHARED_DATA_* in platform\ext\target\arm\musca_b1\sse_200\partition\region_defs.h but I don’t see any real usage of that memory.
I have found TF-M
doc that describe usage of shared memory for Firmware Update Service but once again I was not able to find any code that uses that.
I would appreciate if someone could point to docs on this or to code that actually uses shared data between BL2 and TF-M SPE.
Best regards,
Bohdan Hunko
Cypress Semiconductor Ukraine
Engineer
CSUKR CSS ICW SW FW
Mobile: +38099 50 19 714
Bohdan.Hunko@infineon.com