Add following changes.
Fix switch case
latest compiler throwing error where CASE statement does
not have break or return under all the execution paths.
Rename size_add to size_add_
There is a name collision between this one and one coming from
overflow.h. Hence renaming it.
Modify IRQ handling for qce50 module
Change PDE_DATA to pde_data
Signed-off-by: Smita Ghosh <quic_smitag@quicinc.com>
Change-Id: I4226fb41df12273b45d2e114f1aad2709dc36eb7
Signed-off-by: Smita Ghosh <quic_smitag@quicinc.com>
Add qseecom support for Auto GVM platform.
Change-Id: I9b386486961e36b571498bf6c495c8c786df64c3
Signed-off-by: venkata sateesh <quic_vencher@quicinc.com>
Disable the clock gating feature till some of the stability
issues concerning it is resolved.
Change-Id: I7c7832a843240a75b426ca9187fd02dc1488d0ca
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
Currently, there is no lock held when doing crypto
housekeeping when a timeout occurs. Use a lock in this
scenario to avoid concurrent scenario timing errors.
Change-Id: I60c243e0dfde5a716df772177ab4cd75d9b5b7cc
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
1. Add qseecom_dlkm.ko based on Khaje and AUTO arch type
2. Restructure conf file into multiple conf files
to enable feature based conf file.
Change-Id: I8bc0472667aebc35e8d1afa37eaca5c3353fd191
Signed-off-by: Jayasri Bhattacharyya <quic_jbhattac@quicinc.com>
1. When invoke thread have resumed from freezing to running or is
killed, the interruption signals will always interrupt the
smcinvoke callback calls. this will lead the QTEE and listener
to be out of sync.
2. To fix this issue, we remove the signal interruption, this solution
will prevent the smcinvoke from being out of sync.
Change-Id: I8f0cd7342784564ce12e617dc4076638f365aba9
Signed-off-by: wenji <quic_wenji@quicinc.com>
check the num_fds passed into unmap buf ioctl,
or else it can lead to an out of bounds access.
Change-Id: Ief209a60a6b7dc1ea4be485eaf5cf51d2955a980
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
During Callback request from TZ, smcinvoke in and out buffers need
explicit cache operation with legacy smcinvoke.
Change-Id: I3eacd69901c1ce117017b2d59a28dfab83b5f3f9
Since TZ already votes at nominal, voting at nominal from
HLOS will cause aggregate to cross Turbo, so vote at lowSVS
by default from HLOS.
Change-Id: I662fecfa1c8dd29e71eb3c59e2c03d58710ca387
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
Support to have multiple qcedev requests at a time in
the driver.
Change-Id: I2ba8f22e2b659db04db348dfa3b06b70bf234d0b
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
smcinvoke.c:578:10: error: implicit declaration of function 'kthread_should_stop'
while (!kthread_should_stop()) {
smcinvoke.c:617:43: error: implicit declaration of function 'kthread_run'
smcinvoke[i].postprocess_kthread_task = kthread_run(
Change-Id: Id6a8b6844ec7ae00b55c81d3760a91da9d49a9ad
Signed-off-by: Patrick Daly <quic_pdaly@quicinc.com>
This change will compile and generate qce50 object
only when QCEDEV(QTI Crypto Engine driver) is
compiled.
Test: Nominal, Stress, Adversial and Repetitive Test passed.
Change-Id: I00f41c825d516dcf6e974a7e0333899a746f696f
Signed-off-by: Anvisha <quic_anvisriv@quicinc.com>
Because the device node of smcinvoke is published at the
beginning of the smcinvoke_probe(), the device node will
be ready while the smcinvoke is not initialized completely.
Hence the smcinvoke_release probably is called when the
smcinvoke driver is not ready. this case will lead to
smcinvoke crash issue.
To avoid this concurrency issue, we create the device node
at the end of the smcinvoke_probe.
Change-Id: I930685a24fb744893017c90c1881f13e2f2c3d7c
Signed-off-by: wenji <quic_wenji@quicinc.com>
Use DTSI values to vote for clocks instead of using
fixed values. This enables to vote for crypto clocks
on a per target basis.
Change-Id: I05c9e55f4aa0ec876903f1963f859ecf1fc929ab
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
1. When there is a large shambridge memory which is not
deleted in time, The shambridge in QTEE might be out of
memory. we met this issue in the TVM TUI unit test.
TrustedUISampleTest -vm --gtest_filter=*Basic_TUIStartStop*
2. To avoid being out of shambridge memory, we should postpone
the deletion of shambridge created by smcinvoke itself.
Change-Id: I2ef837339881c1dcd78a0da10fc848488c9819ca
Signed-off-by: wenji <quic_wenji@quicinc.com>
Current wait times for crypto is too high which might cause
concurerency issues for other EEs. Reduce this to what is
required.
Also, reset the offload error for every new IOCTL call.
Change-Id: I43dd2e59e3f30706c87cdc4f633d8132dc8410c9
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
Changing the kernel error messages to Info message for unsupported sys-call in TZ.
Test: Compiled tested and validated on device.
Change-Id: Iced52a7c0ac40717de11d6b07923d414b380c40f
1.When the QTEE is busy with a high concurrency, the objects and shared
memory bridge will not be released and deleted in time, this will lead
to memory leakage issues in the QTEE.
2.To avoid the memory leakage in case of EBUSY, we add 2 exclusive worker
threads to postprocess the object release and shmbridge deletion
separately.
Change-Id: I94c656d191d5098f1c093650e4321e6b5353e45e
Signed-off-by: Nitin LNU <quic_nlakra@quicinc.com>
With the offload implementation, there are a couple of issues
for non-offload usecases.
1. Set config and offload op parameters correctly for non-cipher
usecases.
2. Due to default wait value, there is a crypto operation irrespective
of previous errors, fix that.
Change-Id: Idba55b3603349b7ad831eccd6ee25c98b1df5de6
1. Currently, each request api sometimes returns 0 even
when an error has occured. This will result in unecessary
crypto requests when failures are expected.
2. The request callback handlers does not check handles to
be NULL before accessing. Fix to add NULL handling.
Change-Id: Ia44e353bdb75434dfbc0e3ec0582abc0208be6a7
1. There is no need to vote for high bandwidth for every
ioctl operation, Instead, vote only when a new device
node is opened (which translates to a new session from
a userspace point of view).
2. Fix the way BAM pipes are reset when there is a crypto
operation by initializing it correctly through the SPS
BAM framework.
3. Checking crypto status for every request is performance
heavy. Remove these checks and read status only on
error conditions.
Change-Id: Ibb3607ecb6919f563b00a9a8cd6f5440a8c3940a
Acquire lock before delete_cb_txn_locked.
This API expects the lock is aquired before calling it
release the lock afterwards.
Also rename the api with_locked to state that api
needs to be called on locked mutex.
Change-Id: I6384ff60004da90b46904823e399c62c55ea4273
Control DLKM using TARGET_ENABLE_DLKM.
During early bring when most of the modules are not ready
either due to missing header or other reasons. Its good idea
to keep it disabled until its fully ready.
Change-Id: I421f7329cd84d53b3233cea96b0e1920de9d39ea
Add support for loading securemsm module to be loaded during
recovery to avoid unknown symbols error for other dependent drivers.
Change-Id: I477b69cc649ed6b40d0f22a695a25a8d674328f2
When non-pattern tests are run after pattern tests, there is
stale data from previous tests that never get erased, which
depending on crypto behavior might cause decrypt discrepancies.
Make the change to correctly set the pattern info to the
command descriptors.
Also, convert all debug logs to pr_info to avoid flooding serial
when QCE_DEBUG is enabled.
Change-Id: Ib84f4025263c622d6e51a47fc147856049bd75d4
a validation added to check whether retrieved struct smcinvoke_file_data
inside the function get_server_id belongs to g_smcinvoke_fops or not.
Change-Id: I50bce93ab89759b4fdcb76e41f699d8199771fbd
Signed-off-by: Pavan Bobba <quic_pav@quicinc.com>
Disabling export error and commenting out ununsed variable
which will be resolved with correct export symbol in future.
Test: Compile tested for complete apps build.
Change-Id: I51c45b522de1437d341c7b3fce0aaa82fd233e55
Add MODULE_IMPORT_NS for smcinvoke driver to ignore consider it as as
filesystem and not a driver.
Change-Id: I839b972f68f45f184f6a46de6779ac6adace9d38