Commit Graph

11 Commits

Author SHA1 Message Date
Zhang Zhijie
603bf24744 OP-TEE: add configure uart port function
When kernel change print log uart port, optee should keep the same
with it. Kernel driver will tell optee the uart port id when
tee-supplicant starts up.
If fiq-debugger node is disabled, then id is set as 0xffffffff,
optee uart print is disabled.

Change-Id: Id0bc5428d244896fa95eb6a9c2f36bd3ff1248b7
Signed-off-by: Zhang Zhijie <zhangzj@rock-chips.com>
2018-03-13 18:32:09 +08:00
Tao Huang
3196045628 OPTEE: rename tee_shm_pool_alloc to rk_tee_shm_pool_alloc
keep compitable with new version driver

Change-Id: I8e3f12e252f712860adad57d84bd231769bd8997
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-03-09 14:24:18 +08:00
Tao Huang
f9eefeeaa7 rk: add SPDX license identifier to files with no license
Change-Id: I754250669891307b0deab2bdab1bd01512713f79
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-01-31 20:56:06 +08:00
Zhang Zhijie
0aea51cd79 OP-TEE: keep compitable with new version driver
1.Rename some functions to fix multiple definition compile error.
2.Build optee_linuxdriver when TEE_SUPPORT is enabled.
3.Rename "optee" obj name to "optee_v1" to fix module name conflict error:

[    0.211629] sysfs: cannot create duplicate filename '/module/optee/version'
[    0.211670] ------------[ cut here ]------------
[    0.211684] WARNING: at fs/sysfs/dir.c:31
[    0.211697] Modules linked in:
[    0.211713]
[    0.211726] CPU: 4 PID: 1 Comm: swapper/0 Not tainted 4.4.93 #42
[    0.211738] Hardware name: Rockchip RK3399 Excavator Board edp (Android) (DT)
[    0.211752] task: ffffffc0f2160000 task.stack: ffffffc0f2168000
[    0.211772] PC is at sysfs_warn_dup+0x60/0x7c
[    0.211785] LR is at sysfs_warn_dup+0x60/0x7c

Change-Id: I9cc98307a32d9b186f7aac86027da231b486c487
Signed-off-by: Zhang Zhijie <zhangzj@rock-chips.com>
2017-11-30 11:21:37 +08:00
Zhang Zhijie
b04da73d7f OP-TEE: remove macro SWITCH_CPU0_DEBUG
Now OP-TEE OS can run in muti-core state,
so don't need switch to cpu0 anymore.'

Change-Id: I4f61120250823d6e2e13e2edeee58c26a184b7d2
Signed-off-by: Zhang Zhijie <zhangzj@rock-chips.com>
2017-06-23 16:16:58 +08:00
Zhang Zhijie
b7b50eb62f OP-TEE: fix warning when LPAE is activated on ARM
When LPAE is activated, the dma_addr_t type is u64,
but pointer is still 32bit on arm32 platform.
1. %pad is used to print dma_addr_t type in log.
2. The member paddr(dma_addr_t type) in struct shm is cast
to unsigned long when it needs to be cast to a pointer. The cast
is fine as the value of paddr in struct shm is always less than 4G.

Change-Id: I1e2112796f657759dfa845258ea19558cb84c4ec
Signed-off-by: Zhang Zhijie <zhangzj@rock-chips.com>
2017-06-05 14:29:35 +08:00
sean.huang
f54c22b859 optee: fix mutex_unlock after mutex_lock
Change-Id: Ic5a4b5b4691b11083e5fd9e327fc4be82d626bfb
Signed-off-by: sean.huang <sean.huang@rock-chips.com>
2017-06-02 15:59:16 +08:00
sean.huang
77c5eaeb67 optee: add res of cpumask_to_cpu0 and restore
if res is error,break;

Change-Id: I4c8a11ae02fef2aa30849a94afcce3af5569bbeb
Signed-off-by: sean.huang <sean.huang@rock-chips.com>
(cherry picked from commit 36bc4c52281bb9f476dc22f8bbd6e35183fa7863)
Signed-off-by: Zhang Zhijie <zhangzj@rock-chips.com>
2017-05-31 15:54:29 +08:00
sean.huang
f7b87e8de9 OP-TEE: update optee_linuxdriver to match updated optee_os & optee_client
Match the optee_os version 1.5 or later.

Main update features:
1.Support 32-bit client working with 64-bit linux kernel.
2.Fix Shared Memory protection.
3.Add mutex to serialize tee-supplicant request.
4.Revert "rename tee-supplicant to tee_supplicant".

cherry-pick from 3.10
commit id:5f6467dc09e8c00f7fa6a621b3aad7046ae84d48

Change-Id: I5c77ed85aa56e36d346be7c4462c5a15120df439
Signed-off-by: sean.huang <sean.huang@rock-chips.com>
2017-01-11 11:25:40 +08:00
Zhang Zhijie
0c87e75a8e OP-TEE: build optee_linuxdriver into kernel
Change-Id: I4cacc3b0670643ab02af592549de988f11c378df
Signed-off-by: Zhang Zhijie <zhangzj@rock-chips.com>
2015-10-22 12:13:58 +08:00
Zhang Zhijie
8e4b2eda3f OP-TEE: add optee driver from GitHub: optee_linuxdriver
Commit 4136b9d5a139(Fix TEESMC{32,64}_FASTCALL_RETURN_FROM_RPC)

Change-Id: I389e4f79270e3bc6e8844ec81758f8b5546192a1
Signed-off-by: Zhang Zhijie <zhangzj@rock-chips.com>
2015-10-20 10:47:31 +08:00