Page MenuHomePhabricator

Identify a way to disable/enable driver features based on macro identifiers in the JSON file
Closed, ResolvedPublic

Description

Investigate, list possible approaches, come up with some ideas or prototype. Currently we put some (hardcoded) defines in the cmake files of the CC stack, we need to find a way to link those to the JSON description.

Event Timeline

adeaarm triaged this task as Normal priority.Aug 20 2021, 2:02 PM
adeaarm created this task.

The spec currently defines an attribute for an entry point (or family of) in the JSON file, i.e. algorithms, which is used by the core to decide if the entry point needs to be applied for a particular algorithm or not. The JSON file is meant to be consumed as a description of the driver by the mbedTLS parser at build time, in order to link the driver entry points properly into the driver core.

On the other side, the main requirement here is to configure the driver code. The JSON file, although being a description of the driver, it's meant for the core (and not to be consumed when building the driver itself). As a result, I think that the most natural part to put an driver-specific defines, that can enable/disable (i.e. configure) driver components, is indeed the CMakelists.txt associated to the driver code, as it's currently done. For this reason, I believe that what has started as a temporary way of configuring the driver, can be regarded as the recommended way of doing it.

Will move this in review and discuss at the next sync-up call.

adeaarm moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Sep 6 2021, 10:45 AM

Note: Feedback to the PSA spec team for a priority value to be associated to each JSON file for those configurations where we have multiple accelerators available.

adeaarm closed this task as Resolved.Sep 10 2021, 10:54 PM
adeaarm moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.