GitHub/LineageOS/G12/android_hardware_amlogic_kernel-modules_optee.git
3 years agooptee: change vmx-socket API from socket to ioctl [2/2]
Liqiang Jin [Thu, 14 Jan 2021 14:43:18 +0000 (22:43 +0800)]
optee: change vmx-socket API from socket to ioctl [2/2]

PD#SWPL-40058

Problem:
selinux blocks the socket

Solution:
change vmx-socket API from socket to ioctl

Verify:
Android Q + AH212(SC2)

Change-Id: If3dcc92b1a7dc50776406c2438e2dcdf213c397e
Signed-off-by: Liqiang Jin <liqiang.jin@amlogic.com>
3 years agooptee_driver: fix compile error on buildroot [1/1]
Pengguang Zhu [Wed, 2 Dec 2020 07:21:03 +0000 (15:21 +0800)]
optee_driver: fix compile error on buildroot [1/1]

PD#SWPL-36509

Problem:
compile fail on buildroot

Solution:
fix compile error on buildroot

Verify:
Android Q/R + AH212

Change-Id: I8c969b64090c0119961a837cbdc769a8e2763951
Signed-off-by: Pengguang Zhu <pengguang.zhu@amlogic.com>
3 years agooptee_driver: support standalone build for R [5/6]
Pengguang Zhu [Fri, 27 Nov 2020 03:02:01 +0000 (11:02 +0800)]
optee_driver: support standalone build for R [5/6]

PD#SWPL-36509

Problem:
need to support modules standalone build

Solution:
support modules standalone build

Verify:
Android Q/R + AH212

Change-Id: I37217f5c83cf88409443cbbb36c6e0dba7a957e5
Signed-off-by: Pengguang Zhu <pengguang.zhu@amlogic.com>
4 years agolinuxdriver: add Watermark flush mechanism [2/2]
Liqiang Jin [Mon, 9 Nov 2020 08:12:51 +0000 (16:12 +0800)]
linuxdriver: add Watermark flush mechanism [2/2]

PD#SWPL-36395

Problem:
1) if Verimatrix Watermark enable, OSD flicker when the TV station changes
2) if screen resolution changes, NexGuard Watermark display is abnormal

Solution:
add Watermark flush mechanism

Verify:
Android Q + AH212(SC2)

Change-Id: I096ecf01eca522cb3b6c2f943cd57ab813eb92ed
Signed-off-by: Liqiang Jin <liqiang.jin@amlogic.com>
4 years agolinuxdriver: support dump tee log [1/1]
Pengguang Zhu [Wed, 24 Jun 2020 03:06:38 +0000 (11:06 +0800)]
linuxdriver: support dump tee log [1/1]

PD#TV-20362

Problem:
Save the key information like fatal error
to buffer when OPTEE process crash

Solution:
add sysfs node to dump the log buffer

Verify:
Android Q + franklin

Change-Id: I4b292a07034ee424911a14f86a885890d21e7be4
Signed-off-by: Pengguang Zhu <pengguang.zhu@amlogic.com>
4 years agolinuxdriver: update tdk linux driver path [1/1]
Hangyu Li [Wed, 27 May 2020 07:18:35 +0000 (15:18 +0800)]
linuxdriver: update tdk linux driver path [1/1]

PD#SWPL-20734

Problem:
need move tdk linuxdriver from common/tdk/linuxdriver
to common/tdk_linuxdriver

Solution:
move common/tdk/linuxdriver
to common/tdk_linuxdriver, update Android.mk
to pass compile

Verify:
Android Q + franklin

Change-Id: I30c87dc4776e2f6f0a78f5aa97e827eb578250fd
Signed-off-by: Hangyu Li <hangyu.li@amlogic.com>
4 years agotimer: support TEE timer callback [2/2]
Liqiang Jin [Mon, 28 Oct 2019 10:16:32 +0000 (18:16 +0800)]
timer: support TEE timer callback [2/2]

PD#SWPL-1120

Problem:
TEE not support timer callback, but it is required by customer

Solution:
Implement TEE timer

Verify:
Android O + P212

Change-Id: Ic2fea99ce1570d6d6f83bbaa50e801fea4a64c87
Signed-off-by: Liqiang Jin <liqiang.jin@amlogic.com>
5 years agooptee: fix uninitialized symbol 'parg' [1/1]
Jens Wiklander [Thu, 22 Aug 2019 05:44:06 +0000 (13:44 +0800)]
optee: fix uninitialized symbol 'parg' [1/1]

PD#SWPL-8608

Problem:
** SYNC FROM linaro **
uninitialized symbol 'parg'.

Solution:
Fixes the static checker warning in optee_release().

Verify:
none

Change-Id: Idd3305534a88e6759d9af54a41dd6c6a931c1848

5 years agobuild: fix uninitialized-use when build with prebuilt toolchain [1/1]
Chia-hung Duan [Wed, 3 Jul 2019 06:47:16 +0000 (14:47 +0800)]
build: fix uninitialized-use when build with prebuilt toolchain [1/1]

PD#SWPL-8241

Problem:
** SYNC FROM GOOGLE **
Build failed due to uninitialzed variable

Solution:
Init to reasonable value

Verify:
Build with Android prebuilt toolchain

Change-Id: I41614aa257d4306efe190539e7a54f9756fcb78c

5 years agolog: kernel4.19 compile error [1/1]
Liqiang Jin [Tue, 23 Jul 2019 10:31:25 +0000 (18:31 +0800)]
log: kernel4.19 compile error [1/1]

PD#SWPL-9652

Problem:
init_timer() function not exist in kernel4.19

Solution:
1) use setup_timer() to init timer in kernel4.9
2) use timer_setup() to init timer in kernel4.19

Verify:
Android P + U200

Change-Id: Ie9e12494a9b16eb6432a01cf8b503bae4c019023
Signed-off-by: Liqiang Jin <liqiang.jin@amlogic.com>
5 years agolog: output TEE Errors to KMSG for debugging [2/2]
Liqiang Jin [Tue, 11 Jun 2019 02:14:03 +0000 (10:14 +0800)]
log: output TEE Errors to KMSG for debugging [2/2]

PD#SWPL-9652

Problem:
TEE logs are output to UART and not via kmsg.
Secure OS should support routing TEE logs into kmsg.

Solution:
1) reserve system share-mem as logger mem.
2) add API to support routing TEE logs to REE kmsg.

Verify:
Android P + U200

Change-Id: I7a43827f1d25a2e72ff15082751351bcad7c68f4
Signed-off-by: Liqiang Jin <liqiang.jin@amlogic.com>
5 years agotee: integrate tee module build to android build system [1/2]
Shuide Chen [Tue, 28 May 2019 06:06:41 +0000 (14:06 +0800)]
tee: integrate tee module build to android build system [1/2]

PD#SWPL-9058

Problem:
optee module build trigged at scanning Android.mk stage, it's too early
and the module not depend to kernel, which may introduce very strange
errors, and it customize toolchain and configures, which made the system
very hard to maintain.

Solution:
Rewrite the makefile and structure for the above problem
This CL also support build on Q

Verify:
locally

Change-Id: I8d883735d926c54848a4135518e4be139594a147
Signed-off-by: Shuide Chen <shuide.chen@amlogic.com>
5 years agolinuxdriver: update kernel4.9(4.9.113 -> 4.9.180) compile error [1/1]
Liqiang Jin [Mon, 10 Jun 2019 08:55:22 +0000 (16:55 +0800)]
linuxdriver: update kernel4.9(4.9.113 -> 4.9.180) compile error [1/1]

PD#SWPL-8875

Problem:
macro "u64_to_user_ptr(x)" redefinition

Solution:
delete the macro

Verify:
kernel4.19 + arm64
kernel4.19 + arm
kernel4.9 + arm64
kernel4.9 + arm

Change-Id: Ie2549b1bddbc9fd819511a3c6d1b40c21561ccef
Signed-off-by: Liqiang Jin <liqiang.jin@amlogic.com>
5 years agolinuxdriver: check supplicant status before send message [1/1]
Pengguang Zhu [Thu, 16 May 2019 06:07:13 +0000 (14:07 +0800)]
linuxdriver: check supplicant status before send message [1/1]

PD#TV-5392

Problem:
when playing netflix movies, press power button, TV can not
power down and console hang.
previous commit will check supplicant status, but there is gap
that thread will scheduled and meanwhile the supplicant status
may change.

Solution:
move the status check before wait_for_completion

Verify:
TXLX + Android P

Change-Id: I445619192a1c6cf047a3fe51f3660dad7aa39601
Signed-off-by: Pengguang Zhu <pengguang.zhu@amlogic.com>
5 years agotee: optee: avoid possible double list_del() [1/1]
Zhizhou Zhang [Wed, 21 Nov 2018 03:01:43 +0000 (11:01 +0800)]
tee: optee: avoid possible double list_del() [1/1]

PD#OTT-3799

Problem:
This bug occurs when:

- a new request arrives, one thread(let's call it A) is pending in
  optee_supp_req() with req->busy is initial value false.

- tee-supplicant is killed, then optee_supp_release() is called, this
  function calls list_del(&req->link), and set supp->ctx to NULL. And
  it also wake up process A.

- process A continues, it firstly checks supp->ctx which is NULL,
  then checks req->busy which is false, at last run list_del(&req->link).
  This triggers double list_del() and results kernel panic.

Solution:
For solve this problem, we rename req->busy to req->in_queue, and
associate it with state of whether req is linked to supp->reqs. So we
can just only check req->in_queue to make decision calling list_del()
or not.

Verify:
Android P + S922X

Change-Id: I14a71d1bda933573c7216774954c08fa3161be6c
Signed-off-by: Zhizhou Zhang <zhizhouzhang@asrmicro.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
5 years agolinuxdriver: check supplicant status before send message [1/1]
Pengguang Zhu [Sun, 5 May 2019 09:37:53 +0000 (17:37 +0800)]
linuxdriver: check supplicant status before send message [1/1]

PD#TV-5392

Problem:
when playing netflix movies, press power button, TV can not
power down and console hang.

Solution:
1. check supplicant status before send message

Test: manual - mm

Verify:
TXLX + Android P

Change-Id: Ia4829ba22de97ee06273632f7b824ddfa5909ee4
Signed-off-by: Pengguang Zhu <pengguang.zhu@amlogic.com>
5 years agolinuxdriver: kernel4.19 "struct dma_buf_ops" have changed [1/1]
Liqiang Jin [Wed, 9 Jan 2019 06:44:59 +0000 (14:44 +0800)]
linuxdriver: kernel4.19 "struct dma_buf_ops" have changed [1/1]

PD#SWPL-2814

Problem:
because "struct dma_buf_ops" have changed, so compile failed

Solution:
use "struct dma_buf_ops" according to the kernel version

Verify:
Android P + G12A(U200)

Change-Id: I47573d1cfcdc942e4de2ac2c92938ebc4bc975d9
Signed-off-by: Liqiang Jin <liqiang.jin@amlogic.com>
6 years agolinuxdriver: Change the compiled output directory [1/1]
Chao Liu [Mon, 19 Nov 2018 11:36:47 +0000 (19:36 +0800)]
linuxdriver: Change the compiled output directory [1/1]

PD#SWPL-2236

Problem:
optee.mod.c and optee_armtz.mod.c has no license declaration

Solution:
Switch compilation directory to $(PRODUCT_OUT)/obj/optee_modules

Verify:
Verified on U200

Change-Id: I6d370a35a7324a89d949dc41e3c5175648d85975
Signed-off-by: Chao Liu <chao.liu@amlogic.com>
6 years agolinuxdriver: revert g12b binding a53 [1/1]
Chao Liu [Thu, 25 Oct 2018 06:37:56 +0000 (14:37 +0800)]
linuxdriver: revert g12b binding a53 [1/1]

PD#SWPL-981

Problem:
kernel 3.14 compile failed. and these commits are not required

Solution:
revert g12b binging a53
android o tdk commit: f07bf39d83405d29158fe59f7df6e4d5c9a77e43

Verify:
Android O + g12b_skt

Change-Id: Id30f271a8f858f50be5355d8002fe3d0dc95e2dc
Signed-off-by: Chao Liu <chao.liu@amlogic.com>
6 years agoupdate code to the latest commit of the tdk-v2.4 branch of tdk
Chao Liu [Mon, 8 Oct 2018 07:00:36 +0000 (15:00 +0800)]
update code to the latest commit of the tdk-v2.4 branch of tdk

commit: bca0ab730d6e9701730fdc1f3015ccb0abfe60b9

Change-Id: I42b4bcf14c3a2d6be864d7f31564a40cfc8a6f9c
Signed-off-by: Chao Liu <chao.liu@amlogic.com>
6 years agoInitial empty repository
Lei Qian [Fri, 21 Sep 2018 05:52:47 +0000 (13:52 +0800)]
Initial empty repository