firmware: arm_scmi: Add qcom smc/hvc transport support
authorNikunj Kela <quic_nkela@quicinc.com>
Mon, 9 Oct 2023 19:14:37 +0000 (12:14 -0700)
committerSudeep Holla <sudeep.holla@arm.com>
Mon, 9 Oct 2023 21:07:13 +0000 (22:07 +0100)
commitda405477e7670782241234ea6b4309f3224ecb63
treed2b4eba5545a46c2fc0d45e4a6d9e7482a4c71f5
parent6979f88f5a8e6ab1cdbfeb842abb7ce9daecbb8d
firmware: arm_scmi: Add qcom smc/hvc transport support

This change adds the support for SCMI message exchange on Qualcomm
virtual platforms.

The hypervisor associates an object-id also known as capability-id
with each smc/hvc doorbell object. The capability-id is used to
identify the doorbell from the VM's capability namespace, similar
to a file-descriptor.

The hypervisor, in addition to the function-id, expects the capability-id
to be passed in x1 register when SMC/HVC call is invoked.

The capability-id is allocated by the hypervisor on bootup and is stored in
the shmem region by the firmware before starting Linux.

Signed-off-by: Nikunj Kela <quic_nkela@quicinc.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Link: https://lore.kernel.org/r/20231009191437.27926-3-quic_nkela@quicinc.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/driver.c
drivers/firmware/arm_scmi/smc.c