Bzl files changes to enable CONFIG_QSEECOM_COMPAT for pineapple.
Now that ddk flag is enabled, the config can no longer be enabled
with Kbuild, instead we have to use bzl based changes to enable
it.
Change-Id: I2f1bb9bb4b78413289b7fa988a49fc7b10e7836e
Signed-off-by: Divisha Bisht <quic_divibish@quicinc.com>
Expand SMCInvoke API to support possible
future requirements.
Change-Id: I9f6031751489c43a27afc2860a1cb9f87c7ebb87
Signed-off-by: Reut Zysman <quic_rzysman@quicinc.com>
Enable qseecom driver by default to compile on all chipset
in parallel with Qseecom-compat enable.
Change-Id: I3dd3aa2864c41196197f0770020225fa36f088c1
Signed-off-by: Nitin LNU <quic_nlakra@quicinc.com>
Move qseecom headers to securemsm-kernel. Also, cleanup and split
of qseecom header done based on usage.
These qseecom headers are now exposed to userspace as
qseecom_kernel_headers.
All the other changes are to take care of compilation dependencies
from the above.
Tests: Tested in device with local build with qseecom sampleclient
cmds.
Change-Id: I55442ce7380636a2630c2e372099735fec0756a8
Signed-off-by: Divisha Bisht <quic_divibish@quicinc.com>
Remove a log on the TVM when we receive a message in the proxy driver.
Change-Id: Ib7197eee830d0cf86b62893949cb6356c4a7b951
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
Add support for two additional offload pipes.
1 new HLOS_HLOS pipes.
1 new HLOS_CPB pipe.
Change-Id: Ia9acf3cbdf9c1f148dbddc9426d51ade0d26ff75
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
Whenever there is a crypto error, the pipe is reset which
in turn resets the crypto core. When the pipe is reset wait
for it to complete by monitoring the crypto status.
Change-Id: Id79838e517df491b8062ec379baff2407fea500c
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
Move the securemsm-kernel uapi headers to a uapi include path,
to conform with the uapi requirements.
NOTE: Duplicating qcedev.h & smcinvoke.h temporarily until
clients that manually include the path use the exported headers.
Change-Id: I33d390954ff0e6c721a5fa8256b431020e4f8912
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
Increase the wait timeout for non-offload requests as
there are no expected failures such as timer or pause
events like in the offload pipes. This way, corner case
race scenarios are avoided.
Change-Id: I0be3a3d1807710bb8f0427f88bfee9144591a685
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
The synchronous release may happen in the path of callback response.
The retry may unnecessarily be resulted in callback response timeout.
Run concurrently to evaluate the test:
smcinvoke_vendor_client -i /data/smplap64.mbn 5 1
smcinvoke_vendor_client -c /data 1
Change-Id: Idefca46a34fd72c867e3cba616d30985af40ffe4
Signed-off-by: Amirreza Zarrabi <quic_azarrabi@quicinc.com>
If the server dies, the memobj would be released two times.
Assuming, one instance is already held by the server which
is not true.
Change-Id: I609b1e5f64648736d26c2e780aefcf7f2db64729
If invoke call fails due to some reason, map objects created
for memory objects should also be released. Failing to do so,
creates a memory leak as TZ is unaware of these objects and
no one calls release on these.
Change-Id: If5c48b810192553e3a216a0c3671f98a79bb2b59
Signed-off-by: Anmolpreet Kaur <quic_anmolpre@quicinc.com>
Compile the SMMU proxy driver with Bazel.
Change-Id: I3323e2a6fec620354c4f9a6de1270ba9155998af
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
Add a custom fault handler for the SMMU proxy driver.
Change-Id: I155a047abb8899ba3458abd9bd48774965d339be
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
Zero the proxy buffers on mapping and unmapping them.
Change-Id: I3629f1333420aeefb4d0a6be8ad666d3e1dbc601
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
Proxy map calls on a locked and already-mapped buffer should succeed.
Re-arrange state checks in retrieve_and_iommu_map() to ensure this.
Change-Id: Ia14c565f2b6ba6ab97c5d4aca595b5ed707b5efb
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
We're not caching the CSF version despite intending to - fix this.
Change-Id: Iaf95c39eb0c3cade36a4c12454bb12fcd7becc74
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
Return the failure code from the remote VM when smmu_proxy_map()
fails.
Change-Id: I7a7a8a5930275ce13e2bfea38365b878fba534bd
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
Support to build qcedev and qrng modules using
Bazel.
Change-Id: I4411d208f294cdc014280d4da1a211b72d862d53
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
Ref_count should be with shmbridge and shmbridge should
maintain real owner and ref_count info as smcinvoke is a
client it should blindly do register and deregister.
Change-Id: Ib9400af0db1abafa7c6262e7cd80c8ae301a4ed1
Signed-off-by: Nitin LNU <quic_nlakra@quicinc.com>
expose ITrustedCameraDriver header file to camera so
that camera kernel driver can trigger protect/unprotect calls.
Change-Id: I4301fc3d676e4bc12fde5a5af0bd61f6a63988aa
Add support for map opjects to be written into the
async side channel also for the use case where memory
objects are created as a result of a CB request.
Change-Id: I63798d92e40127fe842c08b892d734134f792dd9
Signed-off-by: Reut Zysman <quic_rzysman@quicinc.com>
When qcedev module is exiting, it disconnects SPS.
At this times, crypto clocks need to be turned on
or it will cause a synchronous abort.
Tests: rmmod on the qcedev module.
Change-Id: I1721fe408392ef81b07a6c08d2196b2413ba2b2f
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
Steps to test
1. Create symlink
cd kernel_platform
mkdir techpacks
cd techpacks
mkdir securemsm-kernel
cd securemsm-kernel
ln /vendor/qcom/open-source/securemsm-kernel/* .
2. To compile
cd kernel_platfrom
tools/bazel run --lto=thin //techpacks/securemsm-kernel:pineapple_consolidate_securemsm-kernel_dist
Test done::
Able to compile hdcp DLKM and able to install it at
out/target/product/<target>/dlkm/lib/modules
Change-Id: Ic2ab2656bd6434944583a12f54920e3db6c15f2d
Add the full drivers for the PVM and TVM.
Change-Id: I3046306fff91670928c750ffa31db02bd0240c9c
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
Use printk_ratelimit() to limit the logs
indicating that secure side is busy,
that the sever state was set to defunct,
and other logs that may be printed frequently.
Change-Id: I93c64bfa65cc2f499cabff3fd26b74764269b6f6
Signed-off-by: Reut Zysman <quic_rzysman@quicinc.com>
Replace DMA_BUF_MAP with IOSYS_MAP Conditionally
based on kernel version.
Add break/fallthrough after every case.
Add return in all the return path.
Import DMA_BUF.
Change-Id: I67c5b477d1f3a44456789dc37ab7ff7ab1ae905b
call release tz object in sync manner
only in case of EBUSY add
object in to post process list, so that we can retry
and process it later in a seprate kthread.
Change-Id: I2158b3faa5c41d2f10ed532c50c9c6b113961c57
Make required changes to satisfy external module dependency.
This gives flexibilty for external modules to include
*.h
linux/*.h
Change-Id: I68c5a5842f84622b85da0056f998775f89e6eebf
Removed name from log message
Test:Compiled and boot up tested.
Change-Id: Ia5c21710a63bb2e461259cf07951c579c3c95bee
Signed-off-by: Indranil Pradhan <quic_ipradhan@quicinc.com>