ARM-software / psa-firmware-update-spec

The PSA Firmware Update API specification, and discussion of future versions of this API.
Other
4 stars 2 forks source link

Remove the Discovery API #10

Open athoelke opened 2 years ago

athoelke commented 2 years ago

The Discovery API (see v0.7 specification of psa_fwu_get_image_id_iterator(), psa_fwu_get_image_id_next(), psa_fwu_get_image_id_valid(), and psa_fwu_get_image_id()) enables the Client to iterate across all firmware images in the device to determine the image status.

Analysis

The existing specification is ambiguous about whether this reports on every image, or on every component (or 'image type'). If included for v1.0, it would enable discovery of the components on the device.

There does appear to be a clear use case for v1.0 that requires this API. The current assumption is that the Client (or Update Server) is aware of the components on this device (via built-in or downloaded configuration data), and can query for the state of these components without using aa discovery API.

Comparison

TF-M does not currently implementation this part of the Firmware Update API.

Proposal

Without a use case to justify its inclusion, we propose to remove the discovery API from v1.0.

d3zd3z commented 2 years ago

With a configuration of Zephyr as NS, we generally will have to match the partition table in the Zephyr build, so indeed the update app would not need a discovery API. I could envision a situation where the NS build only knows about its main partition, and doesn't have knowledge of the others, and a discovery API would indeed be useful. But, I'm not sure how practical that is for v1.0.

Sherryzhang2 commented 2 years ago

The image maker should know the components on the device. Take the AWS OTA server for example, the OTA client cannot request a dedicated image for the server to start a OTA process. The OTA client can only request to listen to the OTA server and check whether there is new OTA process from the server. So when making a new image, which component it belongs to should already be known.