blob: d15dfe951e3504b8f808566e6c911f54fc2e2b23 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001#include <config.h>
2
3#if CONFIG_SERVICE_CLI == 1
4 TASK cli_io_task {
5 AUTOSTART = TRUE;
6 ACTIVATION = 1;
7 PRIORITY = 12;
8 SCHEDULE = FULL;
9 STACK = PRIVATE {
10 SYS_SIZE = 1024;
11 };
12
13 EVENT = EnableEvent;
14 };
15
16 TASK cli_cmd_task {
17 AUTOSTART = TRUE;
18 ACTIVATION = 1;
19 PRIORITY = 13;
20 SCHEDULE = FULL;
21 STACK = PRIVATE {
22 SYS_SIZE = 2048;
23 };
24
25 EVENT = EnableEvent;
26 };
27
28 TASK cli_mbox_task {
29 AUTOSTART = TRUE;
30 ACTIVATION = 1;
31 PRIORITY = 15;
32 SCHEDULE = FULL;
33 STACK = PRIVATE {
34 SYS_SIZE = 1024;
35 };
36
37 EVENT = EnableEvent;
38 };
39
40 EVENT CLI_EVENT_TYPE_IDLE { MASK = 0x1; };
41 EVENT CLI_EVENT_TYPE_RX { MASK = 0x2; };
42 EVENT CLI_EVENT_TYPE_RX_MBOX { MASK = 0x4; };
43 EVENT CLI_EVENT_TYPE_PROCESS { MASK = 0x8; };
44 EVENT CLI_EVENT_TYPE_RX_REQ { MASK = 0x10; };
45 EVENT CLI_EVENT_TYPE_RX_RSP { MASK = 0x20; };
46#endif
47
48#if CONFIG_HSM_MCUWDT == 1
49 TASK mcuwdt_task {
50 AUTOSTART = TRUE;
51 ACTIVATION = 1;
52 PRIORITY = 28;
53 SCHEDULE = FULL;
54 STACK = PRIVATE {
55 SYS_SIZE = 1024;
56 };
57
58 EVENT = EnableEvent;
59 };
60 EVENT MCUWDT_EVENT { MASK = 0x1; };
61
62 ALARM mcuwdt_alm {
63 COUNTER = ostick;
64 ACTION = SETEVENT {
65 TASK = mcuwdt_task;
66 EVENT = MCUWDT_EVENT;
67 };
68 };
69#endif
70
71#if CONFIG_HSM_CRY_AES_SHA == 1
72 TASK aes_sha_task {
73 AUTOSTART = TRUE;
74 ACTIVATION = 1;
75 PRIORITY = 28;
76 SCHEDULE = FULL;
77 STACK = PRIVATE {
78 SYS_SIZE = 8192;
79 };
80 EVENT = EnableEvent;
81#if CONFIG_HSM_CRYPTO_EX == 1
82 RESOURCE = res_crypto;
83#endif
84 };
85 EVENT AES_SHA_EVENT { MASK = 0x1; };
86#endif
87
88#if CONFIG_HSM_CRY_ECC == 1
89 TASK ecc_task {
90 AUTOSTART = TRUE;
91 ACTIVATION = 1;
92 PRIORITY = 28;
93 SCHEDULE = FULL;
94 STACK = PRIVATE {
95 SYS_SIZE = 8192;
96 };
97 EVENT = EnableEvent;
98 };
99 EVENT ECC_EVENT { MASK = 0x1; };
100#endif
101
102#if CONFIG_HSM_CRY_TRNG == 1
103 TASK trng_task {
104 AUTOSTART = TRUE;
105 ACTIVATION = 1;
106 PRIORITY = 28;
107 SCHEDULE = FULL;
108 STACK = PRIVATE {
109 SYS_SIZE = 8192;
110 };
111 EVENT = EnableEvent;
112 };
113 EVENT TRNG_EVENT { MASK = 0x1; };
114#endif
115
116#if CONFIG_HSM_CRYPTO_EX == 1
117 RESOURCE res_crypto { RESOURCEPROPERTY = STANDARD; };
118#endif
119
120#if CONFIG_HSM_KEY_MANAGEMENT == 1
121 TASK km_task {
122 AUTOSTART = TRUE;
123 ACTIVATION = 1;
124 PRIORITY = 28;
125 SCHEDULE = FULL;
126 STACK = PRIVATE {
127 SYS_SIZE = 8192;
128 };
129
130 EVENT = EnableEvent;
131 };
132 EVENT KEY_MANAGEMENT_EVENT { MASK = 0x1; };
133
134#endif