You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/documents/lib/lib_description.doc
+44-2Lines changed: 44 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,21 @@ System resources are resources that are not isolated and protected by MPU, e.g.,
70
70
System resources APIs are used by normal containers to access secure system resources. Because secure containers have secure privilege level, then can access secure system resources directly.
71
71
72
72
### Container Interfaces
73
-
A container can provide services to other containers through an interface. An interface is a C function with parameters and return value registered in an access control table
73
+
A container can provide services to other containers through an interface. An interface is a C function with parameters and return value registered in an access control table.
74
+
75
+
As shown below, a container can call the interface of another container through container call. The container interface will be executed in the context of callee container.
Background container has no interfaces as it is a global shared container, i.e., regular C function calls can be performed.
74
88
75
89
### Resources of a container
76
90
A container has implicit resources: code sections (.text, .rodata, .bss, .data) and stack; as well as explicit resources defined in an access control table, e.g., memory mapped resources, system resources and container interfaces
According to this access control table, the container is allocated the peripheral area of PIN_MUX, a 0x1000 bytes ram region starting from 0x10000, a GPIO interrupt (INTNO_GPIO), an auxiliary-register area starting from 0x21 with a size of 03. The container also has an interface (tst_func4) to provide the service with 4 arguments in the interface handler function
107
121
108
-
The resource type describes the kind of resource, such as interrupt, register, or memory. The access-control attribute describes how it is accessed: secure or normal, read/write/execute. The detailed definitions of resource type and access-control attribute can be found in secureshield_vmpu_exports.h.
122
+
The resource type describes the kind of resource, such as interrupt, register, or memory. The access-control attribute describes how it is accessed: secure or normal, read/write/execute. The detailed definitions of resource type and access-control attribute is listed as follow.
| SECURESHIELD_AC_SIZE_ROUND_UP | the resource size should be rounded up |
145
+
| SECURESHIELD_AC_SIZE_ROUND_DOWN | the resource size should be rounded down |
146
+
| SECURESHIELD_AC_SHARED | the resource is a shared resource (no implementation now) |
147
+
| SECURESHIELD_AC_SECURE | the resource is a secure resource |
148
+
| SECURESHIELD_AC_NORMAL | the resource is a normal resource |
149
+
150
+
More details can be found in secureshield_vmpu_exports.h. For some resources, there are pre-defined CONTAINER_AC, e.g., SECURESHIELD_ACDEF_U/KROM, SECURESHIELD_ACDEF_U/KRAM.
109
151
110
152
## Secure Call
111
153
In SecureShield, a secure call is implemented as a section of assembly code and invoked as a normal function call. The secure call is the only communication interface for a container to call the SecureShield runtime services. The following SecureShield runtime services are provided:
0 commit comments