Add necessary flags for userspace to request this type of memory.
Change-Id: Ic603cb6cf186f3dec483b5a769ed4c405667d9e4
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
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>
There are no remaining users of these functions. Remove them.
Change-Id: Ifef302a591248f48b6d38e7c8c8fa4cd0d9e7b5b
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Add definitions for the CP VMIDs so they can be used by clients.
Change-Id: I1ce54de87d54ce665109293422520598c5b09eed
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
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>
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>