aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/qcom_scm.h
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2022-01-27 18:55:01 -0800
committerBjorn Andersson <bjorn.andersson@linaro.org>2022-02-03 15:32:29 -0600
commit3a99f121fe0bfa4b65ff74d9e980018caf54c2d4 (patch)
tree4dd7057af0ef5b5b23e2a0c31a6d3361d2d6eefc /include/linux/qcom_scm.h
parentsoc: qcom: aoss: remove spurious IRQF_ONESHOT flags (diff)
downloadlinux-dev-3a99f121fe0bfa4b65ff74d9e980018caf54c2d4.tar.xz
linux-dev-3a99f121fe0bfa4b65ff74d9e980018caf54c2d4.zip
firmware: qcom: scm: Introduce pas_metadata context
Starting with Qualcomm SM8450, some new security enhancements has been done in the secure world, which results in the requirement to keep the metadata segment accessible by the secure world from init_image() until auth_and_reset(). Introduce a "PAS metadata context" object that can be passed to init_image() for tracking the mapped memory and a related release function for client drivers to release the mapping once either auth_and_reset() has been invoked or in error handling paths on the way there. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20220128025513.97188-2-bjorn.andersson@linaro.org
Diffstat (limited to 'include/linux/qcom_scm.h')
-rw-r--r--include/linux/qcom_scm.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/qcom_scm.h b/include/linux/qcom_scm.h
index ca4a88d7cbdc..681748619890 100644
--- a/include/linux/qcom_scm.h
+++ b/include/linux/qcom_scm.h
@@ -68,8 +68,16 @@ extern int qcom_scm_set_warm_boot_addr(void *entry, const cpumask_t *cpus);
extern void qcom_scm_cpu_power_down(u32 flags);
extern int qcom_scm_set_remote_state(u32 state, u32 id);
+struct qcom_scm_pas_metadata {
+ void *ptr;
+ dma_addr_t phys;
+ ssize_t size;
+};
+
extern int qcom_scm_pas_init_image(u32 peripheral, const void *metadata,
- size_t size);
+ size_t size,
+ struct qcom_scm_pas_metadata *ctx);
+void qcom_scm_pas_metadata_release(struct qcom_scm_pas_metadata *ctx);
extern int qcom_scm_pas_mem_setup(u32 peripheral, phys_addr_t addr,
phys_addr_t size);
extern int qcom_scm_pas_auth_and_reset(u32 peripheral);