Commit Graph

28 Commits

Author SHA1 Message Date
Elon Zhang 396e3049bd rochchip: board: only map op-tee share memory as dcache enabled
The cache fixup is for the data coherence when communication
between U-Boot and OP-TEE. And data abort exception appeares on
OP-TEE V1 32bit platform due to unknown reason.
So only the share memory need be mapped as dcache enabled.

Signed-off-by: Elon Zhang <zhangzj@rock-chips.com>
Change-Id: I92b62ef5fbdf47adc0328a14034a5861e8e77fed
2020-08-14 15:39:42 +08:00
Hisping Lin 74eb602743 lib: optee_client: update to new optee msg for optee v1 platform
optee v1 smc message is deprecated and update to new optee msg,
api revision smc call is add in init func to check capcibility.

Change-Id: Ia54a1257050b5e3776a00b6b76ca608c939bb401
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
Signed-off-by: Elon Zhang <zhangzj@rock-chips.com>
2020-08-04 14:38:23 +08:00
Hisping Lin df538e29bd lib: optee_client v2: support RKFS version 2
1.use get_rkss_version function to get rkss version,
  if security partition have data with rkss version 1, then
  we choice rkss version 1, if security partition is empty,
  then we choice rkss version 2
2.rkss version 2 support dual backup mechanism,
  security partition total use 1M
3.rkss version 2 R&W 256k data one time

Change-Id: I2f17b22d6a442df84be0d94a808b03465dc6fefe
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2020-06-24 11:45:46 +08:00
Hisping Lin d079c1a5ed lib: optee_client v1: support RKFS version 2
1.use get_rkss_version function to get rkss version,
  if security partition have data with rkss version 1, then
  we choice rkss version 1, if security partition is empty,
  then we choice rkss version 2
2.rkss version 2 support dual backup mechanism,
  security partition total use 1M
3.rkss version 2 R&W 256k data one time

Change-Id: I4103b6600666dffccf473ec4ed8854776a46da31
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2020-06-24 11:45:46 +08:00
Hisping Lin b4a0434fc9 lib: optee_client: do not init RK FS if security not exist
Change-Id: I91e780448cee7884c7477cb0b5720f962b2df00d
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2019-03-15 15:28:38 +08:00
Hisping Lin f4e1db9544 lib: optee_client: add judgment of return value
Change-Id: If616f89ffb2c3ea30afb7bced56a1ca28b1232b2
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2019-03-06 18:44:39 +08:00
Jason Zhu 564654eb9c lib: optee_client: add read&wite permanent attributes certificate
Change-Id: I83321afcf9d89b0cde0bcc78f1f02c847f85a115
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-01-28 20:42:54 +08:00
Jian Qiu c2ba77d93f lib: optee_client: Extract keymaster CA module
Extract keymaster CA module from OpteeClientInterface
refactoring code for keymaster reads and writes form caller module

Change-Id: I1069fce0d29d9d9815f71e7f3b4d231754382acd
Signed-off-by: Jian Qiu <qiujian@rock-chips.com>
2019-01-18 09:09:34 +08:00
Tony Xu dfbf26e839 lib: optee_client: move keybox code to write_keybox.c
Change-Id: Ifcd9962a8b802ee2bcbdbd0e88effb4485e5963a
Signed-off-by: Tony Xu <tony.xu@rock-chips.com>
2019-01-16 18:10:16 +08:00
Hisping Lin d8100d74a0 lib: optee_client: remove widevine ta from uboot
Change-Id: I9e6e4d6743d0a8e9787c2b01e535d920d4f93008
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2018-12-06 09:17:57 +08:00
Hisping Lin 9983001913 lib: optee_client: remove keymaster ta from uboot
keymaster ta is too large, so we change store data
to static ta and remove keymaster ta

Change-Id: Icdb694138caf005d2cb2821714a8526d0391b18b
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2018-11-13 11:51:51 +08:00
tony.xu b5359c85d5 include: optee_include: add declarations for write_keybox_to_secure_storage
Change-Id: I78349eaf54ee32e06e34b89f333e4b89db1008fd
Signed-off-by: tony.xu <tony.xu@rock-chips.com>
2018-08-20 09:43:34 +08:00
tony.xu a7df48681a load keybox to secure storage thtough u-boot: u-boot->ca->ta
Change-Id: Ifdf237ec235c791565d2da1b5881df2f1499d422
Signed-off-by: tony.xu <tony.xu@rock-chips.com>
2018-08-15 15:29:43 +08:00
Hisping Lin 981b79162b lib: optee_client: get share memory config to init
Change-Id: I92fff248650ff239e050fb058ee095e9bed231c6
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2018-06-06 09:19:41 +08:00
qiujian 78ef5fbdb9 lib: optee_client: add oem unlock status func
Change-Id: If92c59650994bd2ab8e689f063acf1d65dc08e48
Signed-off-by: Qiu Jian <qiujian@rock-chips.com>
2018-04-03 10:30:56 +08:00
Hisping Lin 3251364c8e lib: optee_client: support rk file system for optee v2
uboot can secure store data to nand or emmc "security"
partition for optee v2

Change-Id: I85abbfb3970a2fa3f46f540d3f16dfc7ca605317
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2018-03-21 16:18:53 +08:00
Jason Zhu 2e40c2c11f fastboot: update fastboot commands
1. cb_oem.
2. cb_flashing.
3. cd_flash.

Change-Id: I6348c53c992b794f37d6d1813be04bd3dc63d1b5
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-03-05 20:40:00 +08:00
Hisping Lin 1f25ada2a8 lib: optee_client: support new optee message
Change-Id: I83e8da2252f1fef6dff7d388d12e6fb7972cf79e
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2018-02-24 15:41:54 +08:00
Andy Ye 4aa617558f lib: optee_client: add attestation protocol support using optee
support attestation commands:
at-attest-dh,at-attest-uuid,at-get-ca-request,at-set-ca-request

Change-Id: I3fe94befa57a131e89dbe136c065a948b1631756
Signed-off-by: Andy Ye <andy.ye@rock-chips.com>
2017-11-20 10:32:54 +08:00
Hisping Lin 468df3b26a lib: optee_client: add read vboot key flag func
Change-Id: Id0405cc2b695f00b5d7586d01bd0b66279b24430
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2017-11-14 10:55:55 +08:00
Hisping Lin 095e2a8236 lib: optee_client: add R&W attribute flag support.
Change-Id: I682e1d9133c005022351c540f843f383703c7c65
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2017-11-14 10:55:54 +08:00
Hisping Lin 2cd27853d2 lib: optee_client: add R&W vboot key hash func
uboot can read vboot key hash from efuse and write
vboot key hash to efuse, secure boot will be enable
after you write vboot key hash.

Change-Id: Ibe7b2a5778a3f38e13a241261617f1be8537c88e
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2017-11-14 10:55:54 +08:00
Hisping Lin 165396163e lib: optee_client: notify optee when uboot end
trusty_notify_optee_uboot_end() function is used before uboot
jump into kernel, then optee will free memery and denied
call some tipc functions, denied call read write attribute hash.

Change-Id: I96b5687e1afd5bfdf1780ed1641f5fff2fc17eee
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2017-11-14 10:55:54 +08:00
Hisping Lin 7b9ee69be5 lib: optee_client: add macro definition
Change-Id: If6791e63a70190273b09c3cfa7f61490d7f5f0cd
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2017-11-14 10:55:53 +08:00
Hisping Lin 6ef445a4c2 lib: optee_client: add support for R&W efuse
Change-Id: I8b06523c5379f253994c3ad89aa3b354d79b4c45
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2017-11-14 10:55:53 +08:00
Hisping Lin ae8ec5e139 lib: optee_client: change file name
change OpteeClientTest.c to OpteeClientInterface.c

Change-Id: I68b32a2a4757af655bd4eaa723067f024ff112ef
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2017-11-14 10:55:53 +08:00
Jason Zhu ccc0859168 tipc: add read/write flashing lock state
The new fastboot cmd need to store the flashing
lock state in order to prevent flash. And the state
is stored in rpmb. So the tipc provide the functions
to read/write the flash_lock_state.

Change-Id: Idf6eb7de7aff1b3257fcd70d0fc87ac7634de4d0
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2017-11-14 10:55:52 +08:00
hisping abdd243750 lib: add tipc functions
tipc functions is used for uboot communicate
with TEE. uboot can request service for secure
store or secure algorithm.

Change-Id: Ie44095aff4c044feceb5f362abf6e3d24ceb8d4c
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2017-11-14 10:55:49 +08:00