Page MenuHomePhabricator

Platform: create design pattern for platform-specific services
Closed, ResolvedPublic

Description

Original suggestion sent to mailing list on 11th April 2019:

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.

Update on 25th April 2019:
I'm close to submitting a change on review containing a proposal. Sorry for the long delay.

Event Timeline

wmnt triaged this task as Normal priority.Apr 25 2019, 1:52 PM
wmnt created this task.
wmnt added a comment.Apr 25 2019, 3:06 PM

Please see the review below for proposal:
https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/951/

Will send mailing list update shortly.
Please that the patch is primarily for design review, not intended for upstreaming as is. Of course all code review comments welcome.

wmnt raised the priority of this task from Normal to High.Jun 3 2019, 9:00 AM
wmnt added a comment.Jun 3 2019, 9:11 AM

Due to increased interest in this feature and no objections to the implementation concept, I'm raising the priority and will rebase my proposal change and do some polishing to make it a good candidate for upstreaming.
The suggested change of naming convention was discussed offline but was deemed unnecessary as there's limited risk of the feature being misunderstood and that is planned to be mitigated by improved documentation, while the design pattern evoked by the current name is hopefully a reasonable point of reference.

Let me know any other comments

You can do it in two ways: either use a Facade with all snake io ifdefs in the code, or make a different class for each platform that shares the same interface. Within the second situation, you don't need a class; the function can work on its own.

We attempt to deliver 100% results and for that and that's what we're famous for. Our Vasant Kunj Escorts not only understand that the relationship between her and client is strictly professional but they are also well aware of the fact that the client is there to enjoy and it's her job to make the client the most happiest. The girls will not only impress you with her looks but also the way she talks and carries herself. That self confidence is the key to make your experience an unique and unforgettable one.