aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Brand <chris.brand@cypress.com>2020-01-08 11:33:03 -0800
committerDavid Hu <david.hu@arm.com>2020-01-20 05:31:10 +0000
commit20fa011d141e3a3c03e4ff4f7a76e0153e911a1f (patch)
treed7109fdf1d4d696617dac8af910ad82aa039f65a
parent5425c7cb47ce076ac5969268f0aeec8b6c4b00eb (diff)
downloadtrusted-firmware-m-20fa011d141e3a3c03e4ff4f7a76e0153e911a1f.tar.gz
Docs: Update dualcore comms prototype doc to match code
Now that we have an actual implementation of this interface, it makes sense to update the documentation accordingly. Change-Id: If8346e250ea2b56ee372bcf1495d86ed4a8d4543 Signed-off-by: Chris Brand <chris.brand@cypress.com> Co-authored-by: David Hu <david.hu@arm.com>
-rw-r--r--docs/design_documents/communication_prototype_between_nspe_and_spe_in_dual_core_systems.rst105
1 files changed, 51 insertions, 54 deletions
diff --git a/docs/design_documents/communication_prototype_between_nspe_and_spe_in_dual_core_systems.rst b/docs/design_documents/communication_prototype_between_nspe_and_spe_in_dual_core_systems.rst
index 9f44db804..46c92773c 100644
--- a/docs/design_documents/communication_prototype_between_nspe_and_spe_in_dual_core_systems.rst
+++ b/docs/design_documents/communication_prototype_between_nspe_and_spe_in_dual_core_systems.rst
@@ -100,13 +100,14 @@ The mailbox design document should define the structure of the mailbox message.
The information and parameters of PSA Client call in the mailbox message include
-- PSA client call type
+- PSA Client API
- Parameters required in PSA Client call. The parameters can include the
following, according to PSA client call type
- Service ID (SID)
- Handle
+ - Request type
- Input vectors and the lengths
- Output vectors and the lengths
- Requested version of secure service
@@ -132,8 +133,8 @@ should protect concurrent operations from the other core.
Support of multiple ongoing NS PSA client calls (informative)
=============================================================
-Current TF-M implementation (commit-id 8aea0c0a) only supports single
-outstanding NS PSA client calls from NSPE.
+Current TF-M implementation (git tag TF-Mv1.0-RC3) only supports single
+outstanding PSA client call from NSPE.
If the support of multiple ongoing NS PSA client calls in TF-M is required
in dual-core systems, an optional queue can be maintained in TF-M core to store
@@ -467,7 +468,7 @@ result to NSPE.
.. code-block:: c
- void tfm_rpc_client_call_reply(void *owner, int32_t ret);
+ void tfm_rpc_client_call_reply(const void *owner, int32_t ret);
Parameters
~~~~~~~~~~
@@ -498,15 +499,16 @@ parameters are passed from non-secure core to secure core via mailbox.
.. code-block:: c
- typedef struct client_call_params_t {
+ struct client_call_params_t {
uint32_t sid;
psa_handle_t handle;
+ int32_t type;
const psa_invec *in_vec;
size_t in_len;
psa_outvec *out_vec;
size_t out_len;
- uint32_t minor_version;
- } client_call_params_t;
+ uint32_t version;
+ };
Mailbox operations callbacks
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -515,10 +517,10 @@ This structures contains the callback functions for specific mailbox operations.
.. code-block:: c
- typedef struct tfm_rpc_ops_t {
+ struct tfm_rpc_ops_t {
void (*handle_req)(void);
- void (*reply)(void *owner, int32_t ret);
- } tfm_rpc_ops_t;
+ void (*reply)(const void *owner, int32_t ret);
+ };
``tfm_rpc_register_ops()``
^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -527,7 +529,7 @@ This function registers underlying mailbox operations into TF-M RPC callbacks.
.. code-block:: c
- int32_t tfm_rpc_register_ops(const tfm_rpc_ops_t *ops_ptr);
+ int32_t tfm_rpc_register_ops(const struct tfm_rpc_ops_t *ops_ptr);
Parameters
~~~~~~~~~~
@@ -551,6 +553,9 @@ Usage
Mailbox should register TF-M RPC callbacks during mailbox initialization, before
enabling secure services for NSPE.
+Currently one and only one underlying mailbox communication implementation is
+allowed in runtime.
+
``tfm_rpc_unregister_ops()``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -558,14 +563,13 @@ This function unregisters underlying mailbox operations from TF-M RPC callbacks.
.. code-block:: c
- void tfm_rpc_unregister_ops(const tfm_rpc_ops_t *ops_ptr);
+ void tfm_rpc_unregister_ops(void);
-Parameters
-~~~~~~~~~~
+Usage
+~~~~~
-+---------+----------------------------------------------+
-| ops_ptr | Pointer to the specific operation structure. |
-+---------+----------------------------------------------+
+Currently one and only one underlying mailbox communication implementation is
+allowed in runtime.
``tfm_rpc_psa_framework_version()``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -574,14 +578,7 @@ TF-M RPC handler for psa_framework_version().
.. code-block:: c
- int32_t tfm_rpc_psa_framework_version(const client_call_params_t *params);
-
-Parameters
-~~~~~~~~~~
-
-+------------+-----------------------------+
-| ``params`` | Base address of parameters. |
-+------------+-----------------------------+
+ uint32_t tfm_rpc_psa_framework_version(void);
Return
~~~~~~
@@ -604,17 +601,17 @@ TF-M RPC handler for psa_version().
.. code-block:: c
- int32_t tfm_rpc_psa_version(const client_call_params_t *params,
- int32_t ns_caller);
+ uint32_t tfm_rpc_psa_version(const struct client_call_params_t *params,
+ bool ns_caller);
Parameters
~~~~~~~~~~
-+---------------+----------------------------------------------------+
-| ``params`` | Base address of parameters. |
-+---------------+----------------------------------------------------+
-| ``ns_caller`` | A non-zero value to indcate the non-secure caller. |
-+---------------+----------------------------------------------------+
++---------------+-----------------------------------+
+| ``params`` | Base address of parameters. |
++---------------+-----------------------------------+
+| ``ns_caller`` | Whether the caller is non-secure. |
++---------------+-----------------------------------+
Return
~~~~~~
@@ -640,17 +637,17 @@ TF-M RPC handler for ``psa_connect()``.
.. code-block:: c
- int32_t tfm_rpc_psa_connect(const client_call_params_t *params,
- int32_t ns_caller);
+ psa_status_t tfm_rpc_psa_connect(const struct client_call_params_t *params,
+ bool ns_caller);
Parameters
~~~~~~~~~~
-+---------------+----------------------------------------------------+
-| ``params`` | Base address of parameters. |
-+---------------+----------------------------------------------------+
-| ``ns_caller`` | A non-zero value to indcate the non-secure caller. |
-+---------------+----------------------------------------------------+
++---------------+-----------------------------------+
+| ``params`` | Base address of parameters. |
++---------------+-----------------------------------+
+| ``ns_caller`` | Whether the caller is non-secure. |
++---------------+-----------------------------------+
Return
~~~~~~
@@ -679,17 +676,17 @@ TF-M RPC handler for ``psa_call()``.
.. code-block:: c
- int32_t tfm_rpc_psa_call(const client_call_params_t *params,
- int32_t ns_caller);
+ psa_status_t tfm_rpc_psa_call(const struct client_call_params_t *params,
+ bool ns_caller);
Parameters
~~~~~~~~~~
-+---------------+----------------------------------------------------+
-| ``params`` | Base address of parameters. |
-+---------------+----------------------------------------------------+
-| ``ns_caller`` | A non-zero value to indcate the non-secure caller. |
-+---------------+----------------------------------------------------+
++---------------+-----------------------------------+
+| ``params`` | Base address of parameters. |
++---------------+-----------------------------------+
+| ``ns_caller`` | Whether the caller is non-secure. |
++---------------+-----------------------------------+
Return
~~~~~~
@@ -714,23 +711,23 @@ TF-M RPC ``psa_close()`` handler
.. code-block:: c
- int32_t tfm_rpc_psa_close(const client_call_params_t *params,
- int32_t ns_caller);
+ void tfm_rpc_psa_close(const struct client_call_params_t *params,
+ bool ns_caller);
Parameters
~~~~~~~~~~
-+---------------+----------------------------------------------------+
-| ``params`` | Base address of parameters. |
-+---------------+----------------------------------------------------+
-| ``ns_caller`` | A non-zero value to indcate the non-secure caller. |
-+---------------+----------------------------------------------------+
++---------------+-----------------------------------+
+| ``params`` | Base address of parameters. |
++---------------+-----------------------------------+
+| ``ns_caller`` | Whether the caller is non-secure. |
++---------------+-----------------------------------+
Return
~~~~~~
+---------------------+---------------------------------------------+
-| ``PSA_SUCCESS`` | Success. |
+| ``void`` | Success. |
+---------------------+---------------------------------------------+
| ``Does not return`` | The call is invalid, or invalid parameters. |
+---------------------+---------------------------------------------+