diff options
author | Etienne Carriere <etienne.carriere@st.com> | 2020-05-01 10:36:03 +0200 |
---|---|---|
committer | Etienne Carriere <etienne.carriere@linaro.org> | 2020-06-17 18:46:43 +0200 |
commit | 7d6fa6ecbe6212480ad656731eeddf84291aeba5 (patch) | |
tree | a2e9661f0668f81c99cab9292e787713ae7b992c /include/drivers/st | |
parent | 6cc2c1cbed9535a0b9352388724eedfd92b43a7d (diff) | |
download | arm-trusted-firmware-7d6fa6ecbe6212480ad656731eeddf84291aeba5.tar.gz |
drivers/scmi-msg: smt entry points for incoming messages
This change implements SCMI channels for reading a SCMI message from a
shared memory and call the SCMI message drivers to route the message
to the target platform services.
SMT refers to the shared memory management protocol which is used
to get/put message/response in shared memory. SMT is a 28byte header
stating shared memory state and exchanged protocol data.
The processing entry for a SCMI message can be a secure interrupt
or fastcall SMCCC invocation.
SMT description in this implementation is based on the OP-TEE
project [1] itself based in the SCP-firmware implementation [2].
Link: [1] https://github.com/OP-TEE/optee_os/commit/a58c4d706d2333d2b21a3eba7e2ec0cb257bca1d
Link: [2] https://github.com/ARM-software/SCP-firmware.git
Change-Id: I416c7dab5c67954c6fe80bae8d8cdfdcda66873e
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Diffstat (limited to 'include/drivers/st')
-rw-r--r-- | include/drivers/st/scmi-msg.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/drivers/st/scmi-msg.h b/include/drivers/st/scmi-msg.h index 8f7a788a8..a9a99cf52 100644 --- a/include/drivers/st/scmi-msg.h +++ b/include/drivers/st/scmi-msg.h @@ -32,6 +32,32 @@ struct scmi_msg_channel { const char *agent_name; }; +/* + * Initialize SMT memory buffer, called by platform at init for each + * agent channel using the SMT header format. + * + * @chan: Pointer to the channel shared memory to be initialized + */ +void scmi_smt_init_agent_channel(struct scmi_msg_channel *chan); + +/* + * Process SMT formatted message in a fastcall SMC execution context. + * Called by platform on SMC entry. When returning, output message is + * available in shared memory for agent to read the response. + * + * @agent_id: SCMI agent ID the SMT belongs to + */ +void scmi_smt_fastcall_smc_entry(unsigned int agent_id); + +/* + * Process SMT formatted message in a secure interrupt execution context. + * Called by platform interrupt handler. When returning, output message is + * available in shared memory for agent to read the response. + * + * @agent_id: SCMI agent ID the SMT belongs to + */ +void scmi_smt_interrupt_entry(unsigned int agent_id); + /* Platform callback functions */ /* |