misc: fastrpc: Add support to secure memory map

This patch adds support to secure memory allocations for DSP.
It repurposes the reserved field in struct fastrpc_invoke_args
to add attributes to invoke request, for example to setup a secure memory
map for dsp. Secure memory is assigned to DSP Virtual Machine IDs using
Qualcomm SCM calls.

Signed-off-by: Vamsi Krishna Gattupalli <quic_vgattupa@quicinc.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220214161002.6831-9-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Vamsi Krishna Gattupalli
2022-02-14 16:09:58 +00:00
committed by Greg Kroah-Hartman
parent 87ccc14ee6
commit e90d911906
3 changed files with 61 additions and 10 deletions

View File

@@ -63,11 +63,14 @@ enum fastrpc_proc_attr {
FASTRPC_MODE_PRIVILEGED = (1 << 6),
};
/* Fastrpc attribute for memory protection of buffers */
#define FASTRPC_ATTR_SECUREMAP (1)
struct fastrpc_invoke_args {
__u64 ptr;
__u64 length;
__s32 fd;
__u32 reserved;
__u32 attr;
};
struct fastrpc_invoke {