Hi Antonio,
I tried moving the built-in key driver as well as CC3xx driver to the auto-gen approach. For now, since only very few operations are supported for entry points (https://github.com/Mbed-TLS/mbedtls/blob/development/docs/psa-driver-example-and-guide.md),
most of the changes ended up in jinja file (even for CC3xx). It is mostly hard-coding in jinja files , but these changes can help us be aligned with what is happening in mbedtls and ease things for the driver writer. (At least for functions which are auto-generated).
As a driver write I can now add the json files, modify the jinja files and then go for auto-generation.
Attached are the patches I generated for these 2 drivers. They end result almost looks similar, except the function name for export public key where auto-gen generates the export public key function name with prefix cc3xx_transparent_export_public_key().
Can you please have a look.
[These are based on the patchset for these drivers you created in
https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/27718]
Regards,
Ruchika
From: Antonio De Angelis via TF-M <tf-m@lists.trustedfirmware.org>
Sent: Monday, April 8, 2024 2:43 PM
To: tf-m@lists.trustedfirmware.org
Subject: [EXT] [TF-M] Re: Use of auto-generation approach for mbedtls/mbed-crypto driver psa_crypto_driver_wrappers..h file
Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button
|
Hi Ruchika,
thanks for your email and apologies for the late reply but I did not receive this directly so I am replying only because I was pointed to this.
TF-M would really welcome a contribution to move those drivers to the autogen framework. This has not been done yet due to lack of bandwidth on TF-M side. Would like to note that
the TF-M builtin key loader driver can't be (maybe, just completely) moved to the autogen framework because it patches some internals of Mbed TLS as well (i.e. you would need to patch the jinja template as well). But the CC3XX driver is absolutely something
that we would like to move to the autogen framework without any issue.
Thanks,
Antonio