Hi all,
We've created a change, which is using original CMSIS headers in TF-M. Current patch is only for arm/mps3/an552 platform. Our plan is to create a public review only for this (which will NOT be merged), and after the review, we would like to extend this patch to all of the platforms.
The main changes in the chain: - copy and zero_table size fix in the GNU linker scripts and initial startup code - Removed __INITIAL_SP and __STACK_LIMIT patch form gcc and iar cmsis files, NS linker scripts using CMSIS style naming, the secure and bl2 build's linker scripts remains untouched (ARMCLANG style naming, __INITIAL_SP and __STACK_LIMIT patched with cmsis_stack_override interface library) - NS process stack removed from NS linkers (PSP) - Common startup file for bl2 and ns builds - Add original cmsis headers, updated system and startup files - Stack sealing done twice, once from startup (to resemble CMSIS startup template) and once from TF-M secure main
Feedback is welcome: https://review.trustedfirmware.org/q/topic:%2522use-original-cmsis-headers%2...
David Hazi
Hi All,
As the vacation season is ending could we request feedback on the change proposed by David?
Aligning to the original CMSIS headers makes possible to start TF-M porting to a new platform from the existing CMSIS DFP or BSP pack. If the pack was created from the CMSIS base files (for example in case of CM85, from these fileshttps://github.com/ARM-software/CMSIS_5/tree/develop/Device/ARM/ARMCM85/Source), startup_<Device>.c or .s and system_<Device>.c and .h can be reused without modification.)
But unfortunately, to implement the alignment all the current platform ports must be updated. We can update all the upstreamed platform ports, but of course cannot fix the ports living outside of the TF-M main repository. Our feeling is that this is a minor update (for details please check the change on review), and the benefits easily outweigh the required maintenance work. Anyhow, please let us know if this change concerns you!
Best regards, Mark ________________________________ From: david.hazi--- via TF-M tf-m@lists.trustedfirmware.org Sent: Tuesday, August 23, 2022 2:32 PM To: tf-m@lists.trustedfirmware.org tf-m@lists.trustedfirmware.org Subject: [TF-M] Use original CMSIS files
Hi all,
We've created a change, which is using original CMSIS headers in TF-M. Current patch is only for arm/mps3/an552 platform. Our plan is to create a public review only for this (which will NOT be merged), and after the review, we would like to extend this patch to all of the platforms.
The main changes in the chain: - copy and zero_table size fix in the GNU linker scripts and initial startup code - Removed __INITIAL_SP and __STACK_LIMIT patch form gcc and iar cmsis files, NS linker scripts using CMSIS style naming, the secure and bl2 build's linker scripts remains untouched (ARMCLANG style naming, __INITIAL_SP and __STACK_LIMIT patched with cmsis_stack_override interface library) - NS process stack removed from NS linkers (PSP) - Common startup file for bl2 and ns builds - Add original cmsis headers, updated system and startup files - Stack sealing done twice, once from startup (to resemble CMSIS startup template) and once from TF-M secure main
Feedback is welcome: https://review.trustedfirmware.org/q/topic:%2522use-original-cmsis-headers%2...
David Hazi -- TF-M mailing list -- tf-m@lists.trustedfirmware.org To unsubscribe send an email to tf-m-leave@lists.trustedfirmware.org
Hi All,
The review is open for the "use-original-CMSIS-headers" change chain, all the platforms are updated, please check! https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/16355
The additionally changes since the last update: - most of the ASM startup files have been rewritten to C startup files, and aligned with CMSIS 5.9.0 - Aligned every region to (at least) 4bytes boundaries in the GNU linker scripts, which is referenced in the copy or zero table section. - MSP stack sealing have been aligned with CMSIS, done at reset handler only once. Every msp stack sealing in the secure_fw has changed to a sealing check/assert.
Best regards, Dávid Házi
Hi All,
It is a kind reminder for platform maintainers to check the CMSIS related change chain. We would like to merge it during next week. https://review.trustedfirmware.org/q/topic:%22use-original-cmsis-headers%22+...)
Best regards, Dávid Házi
tf-m@lists.trustedfirmware.org