[RFC] SCMI drivers: generic changes + Arm SMCCC transport + drafted OP-TEE transport#2
Open
etienne-lms wants to merge 15 commits intolinux-nextfrom
Open
[RFC] SCMI drivers: generic changes + Arm SMCCC transport + drafted OP-TEE transport#2etienne-lms wants to merge 15 commits intolinux-nextfrom
etienne-lms wants to merge 15 commits intolinux-nextfrom
Conversation
SCMI could use SMC/HVC as tranports. Since there is no standardized id, we need to use vendor specific id. So add into devicetree binding doc. Also add arm,scmi-smc compatible string for smc/hvc transport Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Take arm,smc-id as the 1st arg, leave the other args as zero for now. There is no Rx, only Tx because of smc/hvc not support Rx. Signed-off-by: Peng Fan <peng.fan@nxp.com>
Embed SCMI mailbox transport upon CONFIG_MAILBOX configuration switch. Embed SCMI smc transport upon CONFIG_HAVE_ARM_SMCCC configuration switch. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Don't mandate res.a0 to be 0 for a valid invocation. As per SMCCC specification, only value ~0 (sign extended -1) denoted a non supported function ID. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Do not mandate to rely on arm_smccc_1_1_invoke() which depends on PSCI support to dynamically provide the expected method. Allow FDT to define the conduit method using property "method". If no property "method" is defined in the FDT, invocation relies on arm_smccc_1_1_invoke(). Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Split binding properties description in 2 sections for clarity. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Add optional property "method" to define which of the Arm SMC or HVC instruction is to be used to invoke the SCMI server in secure world. This is needed when the platform do not provide a SMCCC 1.1 conduit method driven from the PSCI driver. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Add missing header guards to local common.h. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
transfer Change scmi_do_xfer() to not report a timeout when transport poll_done callback handler reports success even if timeout occurred. This change prevent reporting of a timeout when poll operation is delayed, i.e. due to thread reschedule, and return success when timeout elapsed due to the executed thread being rescheduled. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Fix scmi_do_xfer() to test SCMI transport callback handler return value this is expected to be 0 on success, not any positive value. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Remove transport callback handler chan_available that can be factorize for all transports. Indeed SCMI child nodes defining each expected SCMI protocol define expect protocol ID through FDT property "reg" whereas SCMI device root node does not define such "reg" property. This change replaces need for transport specific chan_available handler with a common test on SCMI root node to determine if currently probed device is the SCMI device which shall define the channel to be used whereas SCMI child node only define target protocols. This change updates mailbox transport driver accordingly. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
62f5d6e to
655dc7a
Compare
TODO: remove shmem from the bindings. Message buffer should be
provided through a memref parameter to OP-TEE PTA invocation.
Add a new transport channel to the SCMI firmware interface driver for
SCMI message exchange based on OP-TEE transport channel that leverage
OP-TEE secure threaded context for processing of SCMI messages.
The current proposal uses a statically defined physical memory area
to be used as shared memory SCMI endpoints. The location is extracted
from the FDT upon property "shmem".
Entry in OP-TEE threaded context is realized by invoking a service
PTA (Pseudo TA) in OP-TEE OS. Each invocation carries a agent
numerical identifier for which a message is pending in the shared
memory. The OP-TEE service provides means to get the agent identifier
value for a given shared memory location.
OPTEE transport driver depends on CONFIG_OPTEE and probes from SCMI
compatible identifier "arm,scmi-optee".
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
# Conflicts:
# drivers/firmware/arm_scmi/Makefile
# drivers/firmware/arm_scmi/common.h
Introduce compatible "linaro,scmi-optee" for SCMI transport channel based on an OP-TEE service invocation. This device mandates an agent_id property to identify the SCMI agent invoking the OP-TEE service. SCMI message is transmitted to the OP-TEE using OP-TEE native shared buffer support. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Early review for a series of changes proposed in the SCMI drivers.