Commit Graph

19 Commits

Author SHA1 Message Date
Patrick Daly
f92b061e25 ion: msm: Add support for VMID_CP_CDSP
Add necessary flags for userspace to request this type of memory.

Change-Id: Ic603cb6cf186f3dec483b5a769ed4c405667d9e4
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2018-03-21 14:30:42 -07:00
Charan Teja Reddy
55c1de1e43 ion: add support for secure dma allocations
Some targets need slave side secure buffers allocation using ION.
Add the support for the same.

Change-Id: I21489ea71fd7d2844c3bea1f4b701b3eb33cb355
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
2017-12-27 21:47:59 -08:00
Patrick Daly
31aace97f9 soc: qcom: secure_buffer: Remove deprecated functions
There are no remaining users of these functions. Remove them.

Change-Id: Ifef302a591248f48b6d38e7c8c8fa4cd0d9e7b5b
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2017-08-01 19:16:04 -07:00
Sarada Prasanna Garnayak
3153916dec soc: qcom: secure_buffer: add export symbol hyp_assign_phys
Fix the symbol linking error for loadable kernel modules
which is using secure buffer hypervisor api for smmu configuration.

CRs-Fixed: 2019262
Change-Id: I3d83fd4b1854298c1283e03f220de8c673195492
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
2017-07-21 05:17:52 -07:00
Sudarshan Rajagopalan
e08afb6e6f msm: secure_buffer: Add SPSS_HLOS_SHARED vmid
The SPSS_HLOS_SHARED vmid can be used along with SPSS VM
if an ION buffer is to be shared between SPSS and HLOS.

Change-Id: I14407343a924ab652b20ba5d93e72114473c7f8a
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
2017-07-13 11:20:57 -07:00
Sudarshan Rajagopalan
8e20679827 msm: secure_buffer: Add SPSS_SP_SHARED vmid
Add support for SPSS_SP_SHARED vmid. This vmid is equivalent
to TZ VM, which can be used for sharing memory with TZ with
the assign call.

Change-Id: I10b98820796e8bab7b8275f5ddf44e8814dc0fb0
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
2017-07-07 10:22:57 -07:00
Sudarshan Rajagopalan
c934228c28 msm: secure_buffer: Add SPSS_SP vmid
Add support for content protection for ION
memory allocated to SPSS through user process.

Change-Id: I1aa37717c02a5b96468d16ec1a26bb2ee7020e74
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
2017-07-05 11:22:57 -07:00
Liam Mark
d9a5085246 msm: secure_buffer: Add VMID_CP_CAMERA_PREVIEW
Add support for VMID_CP_CAMERA_PREVIEW

Change-Id: Ifacc1ff95262c6240283d19cf02dcac37933c141
Signed-off-by: Liam Mark <lmark@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2017-03-17 14:34:37 -07:00
Patrick Daly
152e05a6c3 qcom: secure_buffer: Use enum type to hold VMID definitions
Using a enum allows easier maintence by automatically updating the
value of VMID_LAST whenever a new value is added.

Change-Id: I35e38b9331bb10cc4725b9d9e2f65add21e58765
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-09-30 16:16:37 -07:00
Sameer Thalappil
253b23dc5b msm: secure_buffer: Add WLAN support
Add support for WLAN Adrastea hardware.

Change-Id: I99868cf456c5b4641731dcea884b67627780477d
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-09-30 16:16:36 -07:00
Mitchel Humpherys
5f2e343c68 msm: secure_buffer: Add missing include
secure_buffer.h makes use of the scatterlist structure, but doesn't
include the header file that defines it.  Until now we've been getting
lucky that all users of secure_buffer.h have been including the
scatterlist header file themselves, but this might not always be the
case.  Add the missing include.

Change-Id: If7598c26a1ef3551132c6eb62ac9bd6d447654d0
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-09-30 16:16:35 -07:00
Jeremy Gebben
33b9a21455 msm: secure_buffer: fix stub functions
All of these need to be 'static inline' to avoid multiple
definition problems when MSM_SECURE_BUFFER=n.

Change-Id: Ie2f9e6204964e46f837ae1d77a10fb81de48671a
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-09-30 16:16:34 -07:00
Mitchel Humpherys
5b8290a3f7 msm: secure_buffer: Add helper function to convert VMIDs into strings
It can be useful to convert secure VMID values into strings.  Provide a
helper function to do so.

Change-Id: If907a0bac92c5d164154c0e5dfe67933115163c8
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-09-30 16:16:33 -07:00
Neeti Desai
bcd5e3a1a7 msm: Add secure vmid for msa
For sharing the memory between hlos and modem,
a new secure vmid is needed to be used in the
assign api. Define that.

Change-Id: Ibcddbafeb1fc430aae3fcda7c609bca4d81e57a9
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-09-30 16:16:32 -07:00
Neeti Desai
f85f566718 msm: secure_buffer: Update the hyp_assign_phys() api
The hyp_assign_phys() api can be called by different
usecases where it is not guaranteed that the source vm is
always VMID_HLOS.

Pass the responsibility of setting the source_vm to
caller of the function.

Change-Id: I3851a6681f49d4bb6fa5b7a889a16a158497e9e6
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-09-30 16:16:30 -07:00
Shrenuj Bansal
395a31229e msm: kgsl: Add EXEC permission to the unassign call
When calling hyp_assign to free a secure buffer we need to pass
in RWX permissions so that when the Hypervisor unmaps the buffer
and maps it back to HLOS, the HLOS is able to use the same
memory for data and instructions.

Change-Id: I71e06a81df85891fecb11c5f197acd54979d2887
Signed-off-by: Shrenuj Bansal <shrenujb@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-09-30 16:16:29 -07:00
Patrick Daly
651acafd7d qcom: secure_buffer: Add CP VMID
Add definitions for the CP VMIDs so they can be used by clients.

Change-Id: I1ce54de87d54ce665109293422520598c5b09eed
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-09-30 16:16:29 -07:00
Neeti Desai
0e64e70323 msm: Update the assign api to secure buffers
The assign call apis have been updated by TZ to
include more usecases. Update the secure_buffer
api files with the same. The system secure heap
needs to be updated to reflect the change in
the api calls.

Change-Id: Idc784ddac222e6ad9f5defafc422e6e3fb88aa0c
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-09-30 16:16:28 -07:00
Neeti Desai
8dcc36492b msm: move types and declarations to header file
Move all function declarations and types to the header
file to make the macros and definitions available even
when the CONFIG_QCOM_SECURE_BUFFER is not enabled.

Change-Id: Ia5ca0c52f971a67c7936c64b42cd2522aa1773fa
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-09-30 16:16:26 -07:00