Hi Anton

 

I think what I really was uncertain about was whether sizes and locations of my LocalLoader “slots” have to be hardcoded somewhere so they cannot change, but it looks like it is not the case.

As you pointed out, my LocalLoader app can just use TF-M crypto service to decrypt MainApp firmware update and then decompress it on its own.

Ofc, out-of-the-box TF-M decryption-decompression (same time) service would be helpful, but there are no standard ones I am aware of and by no means lack of it is any show stopper.

 

Kind regards,

Tomasz

 

Btw, I apologize for multiple posts, I thought those exceeding 80k would be just discarded.

 

From: Anton Komlev <Anton.Komlev@arm.com>
Sent: Tuesday, January 30, 2024 5:23 PM
To: Tomasz Jastrzębski <tdjastrzebski@wp.pl>; tf-m@lists.trustedfirmware.org
Cc: nd <nd@arm.com>
Subject: RE: [TF-M] Can primary and secondary images size change in opposite directions?

 

Hi Tomasz,

 

If I understand you correctly, then your scenario is fully implemented on NSPE side while TF-M is essentially responsible for SPE side only, allowing any functionality of NS application as long as it stays in the memory range allocated for NSPE.

 

Does it help?

 

Best regards,

Anton

 

From: Tomasz Jastrzębski via TF-M <tf-m@lists.trustedfirmware.org>
Sent: Thursday, January 25, 2024 9:25 AM
To: tf-m@lists.trustedfirmware.org
Subject: [TF-M] Can primary and secondary images size change in opposite directions?

 

Hi All,

 

I'm considering a scenario where users will be able to manually update device firmware from USB pen drive.

For this reason, my Main App does not need a secondary copy kept in case update failed. If update fails, user can simply make another attempt a using different media or a different image.

However, what needs to be protected against failed update is the Local Loader (LL) – updatable app reading files from pen drive, which updates the Main App.

As new versions get developed and functionality is added (e.g. NTFS support), Local Loader (LL) may grow in size.

The same time I would like to be able to use all the remaining flash space for the Main App.

All the above dictates the flash layout depictured below. Local Loader update may result in the Main App update, but that is OK.

 

Can primary and secondary LL images size change in opposite directions?

Does TF-M support the described scenario? Image size flexibility is my goal.

Kind regards,

Tomasz Jastrzębski

 

https://drive.google.com/file/d/17jrIfz0vE6OGJDWvXRn6TqNSh3mAX7e-/view?usp=sharing