|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| build/ | | 22-Oct-2025 | - | 1,684 | 1,106 |
| config/ | | 22-Oct-2025 | - | 371 | 365 |
| drivers/ | | 22-Oct-2025 | - | 5,594 | 4,161 |
| figures/ | | 22-Oct-2025 | - | | |
| framework/ | | 22-Oct-2025 | - | 17,672 | 13,005 |
| lib/ | | 22-Oct-2025 | - | 66,840 | 49,457 |
| sample/ | | 22-Oct-2025 | - | 2,496 | 1,487 |
| services/ | | 22-Oct-2025 | - | 14,934 | 11,293 |
| test/ | | 22-Oct-2025 | - | 34,229 | 26,877 |
| LICENSE | D | 22-Oct-2025 | 8.2 KiB | 128 | 70 |
| OAT.xml | D | 22-Oct-2025 | 4.9 KiB | 69 | 22 |
| README.md | D | 22-Oct-2025 | 3.8 KiB | 87 | 73 |
| README_zh.md | D | 22-Oct-2025 | 3.7 KiB | 87 | 73 |
| bundle.json | D | 22-Oct-2025 | 534 | 25 | 24 |
README.md
1# Introduction to tee_tee_os_framework repository #
2
3## Introduction ##
4
5OpenTrustee provides a Trusted Execution Environment (TEE) that runs in a hardware isolated secure area, running simultaneously with regular operating systems such as OpenHarmony but isolated from each other. OpenTrustee has higher security than conventional operating systems and can provide protection for confidential data on devices.
6
7OpenTrustee is a complete TEE solution that includes multiple components. The system architecture is shown in the figure below:
8
9
10
11The tee_tee_os_framework component mainly includes the operating system framework of OpenTrustee, responsible for managing the entire lifecycle of TA (Trusted Application), processing interaction information between CA (Client Application) and TA, and managing drivers. In addition, it also provides core services such as encryption and decryption, secure storage, etc. Below are specific module introductions.
12
13### 1. The specific module introduction of tee_os_framework ###
14<table>
15<th>Name of module</th>
16<th>Functions</th>
17<tr>
18<td> gtask </td><td>TA lifetime control, create and destroy TA process, commication manager, session manager and agent manager of CA2TA, process error information for TA</td>
19</tr><tr>
20<td> teesmcmgr</td><td>dispatch smc command, including CA commands, system suspend and resume command, idle state management</td>
21</tr><tr>
22<td> tarunner</td><td> load,analysis and relocate the elf file of TA/drivers/services</td>
23</tr><tr>
24<td> drvmgr</td><td>management lifetime of drivers, including the create and destroy of drivers, interface permission control, driver process rights management, drivers access control, process incorrect state of drivers</td>
25</tr><tr>
26<td> permission service</td><td>permission management of SEC file</td>
27</tr><tr>
28<td> ssa</td><td>secure storage functions</td>
29</tr><tr>
30<td> huk service</td><td> hardware root key access control</td>
31</tr><tr>
32<td> teemiscdrv</td><td>base driver, get shared information from bootloader</td>
33</tr><tr>
34<td> cryptomgr</td><td>the framework code of encrypt/decrypt drivers </td>
35</tr><tr>
36<td> TEE base API</td><td>base interfaces of TA development, including encrypt/decrypt, secure storage, secure timer and GP interface of TA2TA</td>
37</tr><tr>
38<td> TEE driver API</td><td>interfaces for driver develepment, including interrupt, IO and DMA</td>
39</tr><tr>
40<td> sample</td><td>sample code for TEE load(teeloader) and sample code for ATF-TEE adapt code(tee_atf)</td>
41</tr><tr>
42<td> test</td><td>tee test suit </td>
43</tr>
44
45</table>
46
47### tee_os_framework code directories ###
48```
49base/tee/tee_os_framework
50├── framework
51│ ├── gtask
52│ ├── teesmcmgr
53│ ├── drvmgr
54│ └── tarunner
55├── lib
56│ ├── drvlib # libs for drvmgr and drivers
57│ ├── syslib # libs for TEE internal services
58│ └── teelib # libs for TA and services
59├── drivers
60│ ├── tee_misc_drv
61│ ├── include
62│ └── crypto_mgr
63├── service
64│ ├── permission_service
65│ ├── huk_service
66│ └── ssa
67├── config
68│ ├── release_config # release config macros
69│ └── debug_config # debug config macros
70├── build
71├── test
72└── sample
73```
74
75## Tee_os_framework Construction Guide ##
76The tee_tee_os_framework and tee_tee_os_kernel work together to build TEEOS, and the commands for building them separately are as follows:
77
78```Bash
79./build.sh --product-name rk3568 --build-target tee --ccache
80```
81
82Build the product as a TEEOS image:` base/tee/tee_os_kernel/kernel/bl32.bin`
83
84## Related code repositories ##
85
86[tee_os_kernel](https://gitcode.com/openharmony-sig/tee_tee_os_kernel)
87
README_zh.md
1# tee_tee_os_framework仓介绍 #
2
3## 简介 ##
4
5OpenTrustee提供了一个可信执行环境(Trusted Execution Environment,TEE),运行在受硬件隔离的安全区域中,与常规操作系统如OpenHarmony同时运行但互相隔离。OpenTrustee比常规操作系统拥有更高的安全性,可以为设备上的机密数据提供保护。
6
7OpenTrustee是一套完整的TEE解决方案,包含多个部件,系统架构如图所示:
8
9
10
11tee_tee_os_framework部件主要包含OpenTrustee的操作系统框架部分,负责TA(Trusted Application)整个生命周期的管理、CA(Client Application)与TA交互信息的处理以及驱动的管理。除此以外,还提供了加解密、安全存储等核心服务,下面是具体的模块介绍。
12
13## tee_os_framework部件模块划分 ##
14<table>
15<th>子模块名称</th>
16<th>模块职责</th>
17<tr>
18<td> gtask </td><td>TA进程的生命周期管理,实现TA进程的创建销毁,CA跟TA交互的通信管理、会话管理、Agent交互管理,TA进程异常状态处理</td>
19</tr><tr>
20<td> teesmcmgr</td><td>smc命令消息分发管理,包括CA命令、系统的休眠唤醒命令分发,idle状态管理等</td>
21</tr><tr>
22<td> tarunner</td><td>TA/驱动/服务二进制elf文件加载解析重定位</td>
23</tr><tr>
24<td> drvmgr</td><td>驱动进程的生命周期管理,包括驱动进程的创建及销毁、驱动接口访问控制、驱动进程权限控制,驱动访问管理,驱动进程异常状态处理</td>
25</tr><tr>
26<td> permission service</td><td>SEC文件验签、权限控制等操作</td>
27</tr><tr>
28<td> ssa</td><td>安全存储服务,提供对数据的可信存储,并保证数据机密性、完整性、原子性和不可复制性</td>
29</tr><tr>
30<td> huk service</td><td>硬件根秘钥访问控制管理</td>
31</tr><tr>
32<td> teemiscdrv</td><td>基础驱动,获取bootloader传入的共享内存信息</td>
33</tr><tr>
34<td> cryptomgr</td><td>提供加解密驱动框架 </td>
35</tr><tr>
36<td> TEE基础API</td><td>提供TA开发的API接口支持,包括加解密、安全存储、安全时间及TA2TA GP接口等</td>
37</tr><tr>
38<td> TEE驱动API</td><td>提供驱动开发的API接口支持,包括中断、IO、dma操作等</td>
39</tr><tr>
40<td> sample</td><td>提供加载tee的示例代码teeloader和atf tee适配示例代码tee_atf</td>
41</tr><tr>
42<td> test</td><td>提供tee测试套件 </td>
43</tr>
44
45</table>
46
47## tee_os_framework部件代码目录结构 ##
48```
49base/tee/tee_os_framework
50├── framework
51│ ├── gtask
52│ ├── teesmcmgr
53│ ├── drvmgr
54│ └── tarunner
55├── lib
56│ ├── drvlib # 给驱动和drvmgr提供的lib库
57│ ├── syslib # 只给TEE内部服务使用的lib库
58│ └── teelib # 给TA、服务提供的lib库
59├── drivers
60│ ├── tee_misc_drv
61│ ├── include
62│ └── crypto_mgr
63├── service
64│ ├── permission_service
65│ ├── huk_service
66│ └── ssa
67├── config
68│ ├── release_config # release配置信息,特性宏等
69│ └── debug_config # debug配置信息,特性宏等
70├── build
71├── test
72└── sample
73```
74
75## tee_os_framework构建指导 ##
76tee_tee_os_framework与tee_tee_os_kernel共同构建TEEOS,单独构建命令如下:
77
78```Bash
79./build.sh --product-name rk3568 --build-target tee --ccache
80```
81
82构建产物为TEEOS镜像:`base/tee/tee_os_kernel/kernel/bl32.bin`
83
84## 相关仓
85
86[tee_os_kernel](https://gitcode.com/openharmony-sig/tee_tee_os_kernel)
87