Hi all,
I uploaded a patch (https://review.trustedfirmware.org/c/trusted-firmware-m/+/4009)
to simplify/improve the entry points of secure functions in Library model.
In current Library model implementation, each secure function includes the same inline entry point
tfm_core_partition_request(). Actually, only the NS client check is required to be inline. The duplicated entry points cost much code size.
Thus this patch extracts NS client check and make it as a simple inline function
tfm_core_is_ns_client().
tfm_core_partition_request() becomes a normal function called by each secure function.
Some quantitative results of code size optimization (about 3KB) are shown below:
Profile Small (ConfigDefaultProfileS) is based on
https://review.trustedfirmware.org/q/topic:%22symmetric-attest%22+(status:open%20OR%20status:merged)
ConfigDefault + Armclang 6.10 + Release + AN521
|
Code |
RO-data |
RW-data |
ZI-data |
Current impl |
129778 |
8994 |
272 |
50108 |
Improved |
126294 |
8994 |
272 |
50108 |
ConfigDefaultProfileS + Armclang 6.10 + Release + AN521
|
Code |
RO-data |
RW-data |
ZI-data |
Current impl |
55886 |
3274 |
200 |
31664 |
Improved |
52930 |
3274 |
200 |
31664 |
Best regards,
Hu Ziji