Skip to content

Commit 3d7654d

Browse files
committed
optee: update README file.
Signed-off-by: guibing <guibing@nucleisys.com>
1 parent f3905ee commit 3d7654d

2 files changed

Lines changed: 46 additions & 42 deletions

File tree

optee/README.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,22 @@ RISC-V OPTEE系统的运行架构如下图:
2727
```mermaid
2828
sequenceDiagram
2929
autonumber
30-
participant Ree
30+
participant REE
3131
participant Monitor
32-
participant Tee
33-
Ree ->> Ree: process
34-
Ree ->> Monitor: request tee service
32+
participant TEE
33+
REE ->> REE: process
34+
REE ->> Monitor: request tee service
3535
Monitor ->> Monitor: save REE CTX
3636
Monitor ->> Monitor: restore TEE CTX
3737
Monitor ->> Monitor: switch CTX
38-
Monitor -->> Tee: mret
39-
Tee ->> Tee: process request
40-
Tee -->> Monitor: ecall with result
38+
Monitor -->> TEE: mret
39+
TEE ->> TEE: process request
40+
TEE -->> Monitor: ecall with result
4141
Monitor ->> Monitor: save TEE CTX
4242
Monitor ->> Monitor: restore REE CTX
4343
Monitor ->> Monitor: switch CTX
44-
Monitor -->> Ree: mret
45-
Ree ->> Ree: continue to process
44+
Monitor -->> REE: mret
45+
REE ->> REE: continue to process
4646
```
4747

4848
## 中断处理
@@ -53,27 +53,29 @@ REE对应Linux os,Monitor对应opensbi,TEE对应optee_os
5353
```mermaid
5454
sequenceDiagram
5555
autonumber
56-
participant Ree
56+
participant REE
5757
participant Monitor
58-
participant Tee
59-
note over Ree,Tee : running in NSecure World
60-
Ree ->> Ree: process
61-
note over Ree,Tee : M recv SIntr, masked. NSInt to S, unmasked.
58+
participant TEE
59+
note over REE,TEE : running in NSecure World
60+
REE ->> REE: process
61+
note over REE,TEE : M recv SIntr, masked. NSInt to S, unmasked.
62+
Monitor ->> Monitor: claim Plic intr num
6263
Monitor ->> Monitor: save REE CTX
6364
Monitor ->> Monitor: restore TEE CTX
6465
Monitor ->> Monitor: M disable Intr, SIntr to S
66+
Monitor ->> Monitor: set the intr source pending
6567
Monitor ->> Monitor: switch CTX
66-
Monitor -->> Tee: mret to fiq_entry
67-
note over Ree,Tee: M Intr masked, SInt to S, unmasked
68-
Tee ->> Tee: process received fiq interrupt
69-
Tee -->> Monitor: ecall with fiq_done
68+
Monitor -->> TEE: mret to fiq_entry
69+
note over REE,TEE: M Intr masked, SInt to S, unmasked
70+
TEE ->> TEE: process received fiq interrupt
71+
TEE -->> Monitor: ecall with fiq_done
7072
7173
Monitor ->> Monitor: restore REE CTX
7274
Monitor ->> Monitor: SIntr to M, unmasked. NSIntr to S, unmasked.
7375
Monitor ->> Monitor: switch CTX
74-
Monitor -->> Ree: mret
75-
note over Ree,Tee: SIntr to M, unmasked. NSInt to S, unmasked.
76-
Ree ->> Ree: continue to process
76+
Monitor -->> REE: mret
77+
note over REE,TEE: SIntr to M, unmasked. NSInt to S, unmasked.
78+
REE ->> REE: continue to process
7779
```
7880

7981

optee/README_en.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,22 @@ The following figure shows the general tee service request process. In the figur
2828
```mermaid
2929
sequenceDiagram
3030
autonumber
31-
participant Ree
31+
participant REE
3232
participant Monitor
33-
participant Tee
34-
Ree ->> Ree: process
35-
Ree ->> Monitor: request tee service
33+
participant TEE
34+
REE ->> REE: process
35+
REE ->> Monitor: request tee service
3636
Monitor ->> Monitor: save REE CTX
3737
Monitor ->> Monitor: restore TEE CTX
3838
Monitor ->> Monitor: switch CTX
39-
Monitor -->> Tee: mret
40-
Tee ->> Tee: process request
41-
Tee -->> Monitor: ecall with result
39+
Monitor -->> TEE: mret
40+
TEE ->> TEE: process request
41+
TEE -->> Monitor: ecall with result
4242
Monitor ->> Monitor: save TEE CTX
4343
Monitor ->> Monitor: restore REE CTX
4444
Monitor ->> Monitor: switch CTX
45-
Monitor -->> Ree: mret
46-
Ree ->> Ree: continue to process
45+
Monitor -->> REE: mret
46+
REE ->> REE: continue to process
4747
```
4848

4949
## Interrupt Management
@@ -58,27 +58,29 @@ TEE is Secure software stack, like OPTEE;
5858
```mermaid
5959
sequenceDiagram
6060
autonumber
61-
participant Ree
61+
participant REE
6262
participant Monitor
63-
participant Tee
64-
note over Ree,Tee : running in NSecure World
65-
Ree ->> Ree: process
66-
note over Ree,Tee : M recv SIntr, masked. NSInt to S, unmasked.
63+
participant TEE
64+
note over REE,TEE : running in NSecure World
65+
REE ->> REE: process
66+
note over REE,TEE : M recv SIntr, masked. NSInt to S, unmasked.
67+
Monitor ->> Monitor: claim Plic intr num
6768
Monitor ->> Monitor: save REE CTX
6869
Monitor ->> Monitor: restore TEE CTX
6970
Monitor ->> Monitor: M disable Intr, SIntr to S
71+
Monitor ->> Monitor: set the intr source pending
7072
Monitor ->> Monitor: switch CTX
71-
Monitor -->> Tee: mret to fiq_entry
72-
note over Ree,Tee: M Intr masked, SInt to S, unmasked
73-
Tee ->> Tee: process received fiq interrupt
74-
Tee -->> Monitor: ecall with fiq_done
73+
Monitor -->> TEE: mret to fiq_entry
74+
note over REE,TEE: M Intr masked, SInt to S, unmasked
75+
TEE ->> TEE: process received fiq interrupt
76+
TEE -->> Monitor: ecall with fiq_done
7577
7678
Monitor ->> Monitor: restore REE CTX
7779
Monitor ->> Monitor: SIntr to M, unmasked. NSIntr to S, unmasked.
7880
Monitor ->> Monitor: switch CTX
79-
Monitor -->> Ree: mret
80-
note over Ree,Tee: SIntr to M, unmasked. NSInt to S, unmasked.
81-
Ree ->> Ree: continue to process
81+
Monitor -->> REE: mret
82+
note over REE,TEE: SIntr to M, unmasked. NSInt to S, unmasked.
83+
REE ->> REE: continue to process
8284
```
8385

8486
## Secure PLIC interrupt configuration

0 commit comments

Comments
 (0)