Hi all,
I've created a change as a follow-on from the mail discussion below to provide a design pattern proposal: IOCTL for platform-specific services. https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/951/
Brief problem statement: Some platforms required services and HAL functions that were not generic to warrant their dedicated generic HAL API functions as that implied a requirement for *all* platforms to implement - essentially stub - the implementation if the functionality was not applicable to that platform. The existing solution doesn't scale so I propose to introduce a single mandatory function that serves as a platform-specific wrapper/arbiter for services that are specific to a single platform, or a family of similar platforms.
Note that at present the change IS the design proposal - I felt it would make more sense to present it this time as code changes and documentation updates instead of a single linear design document.
Let me know your thought in this mail thread for generic observations or on the review page for specific details of the implementation.
Thanks
Regards, Miklos
-----Original Message----- From: Michel JAOUEN michel.jaouen@st.com Sent: 11 April 2019 17:38 To: Miklos Balint Miklos.Balint@arm.com; tf-m@lists.trustedfirmware.org Cc: nd nd@arm.com Subject: RE: Platform: Create platform service for pin functions
Hello, You should detail your proposal with single entry. It should help to implement the function really required for dedicated platform.
Regards
-----Original Message----- From: Miklos Balint Miklos.Balint@arm.com Sent: jeudi 11 avril 2019 17:28 To: Michel JAOUEN michel.jaouen@st.com; tf-m@lists.trustedfirmware.org Cc: nd nd@arm.com Subject: RE: Platform: Create platform service for pin functions
Michel,
I agree there is a need for a more generic design pattern for such platform-specific features. I think that there should be a single entry point for any platform specific service request to the platform/ directory and each platform should/could list the specific features it supports. Then the specific function type would be encoded in an invec to the service request. But I think a more detailed design proposal is needed with enough room for discussion before committing to a new pattern, and I'd prefer to avoid introducing platform dependencies in the services/ folder. That folder should ideally just have an indirection across HAL to a platform-specific service request arbiter.
Any opinions or should I produce a more detailed proposal to show what I mean?
Regards Miklos
-----Original Message----- From: TF-M tf-m-bounces@lists.trustedfirmware.org On Behalf Of Michel JAOUEN via TF-M Sent: 11 April 2019 13:57 To: tf-m@lists.trustedfirmware.org Subject: Re: [TF-M] Platform: Create platform service for pin functions
I see that there is https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/825/ On review , it adds some dummy functions for the platform not requiring these services Can we think about introducing some configuration on platform basis. As example , I post https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/854/
Best regards
From: Michel JAOUEN Sent: mercredi 10 avril 2019 13:05 To: 'tf-m@lists.trustedfirmware.org' tf-m@lists.trustedfirmware.org Subject: Platform: Create platform service for pin functions
Hello, I noticed the merge of this api, which seems require only for platform Musca_a. This create the need to implement dummy functions for the other platform. would it be better to make this configurable for each platform ? I think for the interface connected to platform partition, it is important to have a flexibility. As example some platform , may require an API requesting a pin to be configureable from non secure .
Best regards
-- TF-M mailing list TF-M@lists.trustedfirmware.org https://lists.trustedfirmware.org/mailman/listinfo/tf-m