Olivier Deprez | ecb2fe5 | 2020-04-02 15:38:02 +0200 | [diff] [blame] | 1 | Secure Partition Manager (MM) |
| 2 | ***************************** |
| 3 | |
| 4 | Foreword |
| 5 | ======== |
| 6 | |
Olivier Deprez | 370f3a1 | 2023-09-05 09:48:43 +0200 | [diff] [blame] | 7 | This document describes the implementation where the Secure Partition Manager |
| 8 | resides at EL3 and management services run from isolated Secure Partitions at |
| 9 | S-EL0. The communication protocol is established through the Management Mode |
| 10 | (MM) interface. |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 11 | |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 12 | Background |
| 13 | ========== |
| 14 | |
| 15 | In some market segments that primarily deal with client-side devices like mobile |
| 16 | phones, tablets, STBs and embedded devices, a Trusted OS instantiates trusted |
| 17 | applications to provide security services like DRM, secure payment and |
| 18 | authentication. The Global Platform TEE Client API specification defines the API |
| 19 | used by Non-secure world applications to access these services. A Trusted OS |
| 20 | fulfils the requirements of a security service as described above. |
| 21 | |
| 22 | Management services are typically implemented at the highest level of privilege |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 23 | in the system, i.e. EL3 in Trusted Firmware-A (TF-A). The service requirements are |
| 24 | fulfilled by the execution environment provided by TF-A. |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 25 | |
| 26 | The following diagram illustrates the corresponding software stack: |
| 27 | |
| 28 | |Image 1| |
| 29 | |
| 30 | In other market segments that primarily deal with server-side devices (e.g. data |
| 31 | centres and enterprise servers) the secure software stack typically does not |
| 32 | include a Global Platform Trusted OS. Security functions are accessed through |
| 33 | other interfaces (e.g. ACPI TCG TPM interface, UEFI runtime variable service). |
| 34 | |
| 35 | Placement of management and security functions with diverse requirements in a |
| 36 | privileged Exception Level (i.e. EL3 or S-EL1) makes security auditing of |
| 37 | firmware more difficult and does not allow isolation of unrelated services from |
| 38 | each other either. |
| 39 | |
| 40 | Introduction |
| 41 | ============ |
| 42 | |
| 43 | A **Secure Partition** is a software execution environment instantiated in |
| 44 | S-EL0 that can be used to implement simple management and security services. |
| 45 | Since S-EL0 is an unprivileged Exception Level, a Secure Partition relies on |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 46 | privileged firmware (i.e. TF-A) to be granted access to system and processor |
| 47 | resources. Essentially, it is a software sandbox in the Secure world that runs |
| 48 | under the control of privileged software, provides one or more services and |
| 49 | accesses the following system resources: |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 50 | |
| 51 | - Memory and device regions in the system address map. |
| 52 | |
| 53 | - PE system registers. |
| 54 | |
| 55 | - A range of synchronous exceptions (e.g. SMC function identifiers). |
| 56 | |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 57 | Note that currently TF-A only supports handling one Secure Partition. |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 58 | |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 59 | A Secure Partition enables TF-A to implement only the essential secure |
| 60 | services in EL3 and instantiate the rest in a partition in S-EL0. |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 61 | Furthermore, multiple Secure Partitions can be used to isolate unrelated |
| 62 | services from each other. |
| 63 | |
| 64 | The following diagram illustrates the place of a Secure Partition in a typical |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 65 | Armv8-A software stack. A single or multiple Secure Partitions provide secure |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 66 | services to software components in the Non-secure world and other Secure |
| 67 | Partitions. |
| 68 | |
| 69 | |Image 2| |
| 70 | |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 71 | The TF-A build system is responsible for including the Secure Partition image |
| 72 | in the FIP. During boot, BL2 includes support to authenticate and load the |
| 73 | Secure Partition image. A BL31 component called **Secure Partition Manager |
| 74 | (SPM)** is responsible for managing the partition. This is semantically |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 75 | similar to a hypervisor managing a virtual machine. |
| 76 | |
| 77 | The SPM is responsible for the following actions during boot: |
| 78 | |
| 79 | - Allocate resources requested by the Secure Partition. |
| 80 | |
| 81 | - Perform architectural and system setup required by the Secure Partition to |
| 82 | fulfil a service request. |
| 83 | |
| 84 | - Implement a standard interface that is used for initialising a Secure |
| 85 | Partition. |
| 86 | |
| 87 | The SPM is responsible for the following actions during runtime: |
| 88 | |
| 89 | - Implement a standard interface that is used by a Secure Partition to fulfil |
| 90 | service requests. |
| 91 | |
| 92 | - Implement a standard interface that is used by the Non-secure world for |
| 93 | accessing the services exported by a Secure Partition. A service can be |
| 94 | invoked through a SMC. |
| 95 | |
| 96 | Alternatively, a partition can be viewed as a thread of execution running under |
| 97 | the control of the SPM. Hence common programming concepts described below are |
| 98 | applicable to a partition. |
| 99 | |
| 100 | Description |
| 101 | =========== |
| 102 | |
| 103 | The previous section introduced some general aspects of the software |
| 104 | architecture of a Secure Partition. This section describes the specific choices |
| 105 | made in the current implementation of this software architecture. Subsequent |
| 106 | revisions of the implementation will include a richer set of features that |
| 107 | enable a more flexible architecture. |
| 108 | |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 109 | Building TF-A with Secure Partition support |
| 110 | ------------------------------------------- |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 111 | |
| 112 | SPM is supported on the Arm FVP exclusively at the moment. The current |
| 113 | implementation supports inclusion of only a single Secure Partition in which a |
| 114 | service always runs to completion (e.g. the requested services cannot be |
| 115 | preempted to give control back to the Normal world). |
| 116 | |
| 117 | It is not currently possible for BL31 to integrate SPM support and a Secure |
| 118 | Payload Dispatcher (SPD) at the same time; they are mutually exclusive. In the |
| 119 | SPM bootflow, a Secure Partition image executing at S-EL0 replaces the Secure |
| 120 | Payload image executing at S-EL1 (e.g. a Trusted OS). Both are referred to as |
| 121 | BL32. |
| 122 | |
| 123 | A working prototype of a SP has been implemented by re-purposing the EDK2 code |
| 124 | and tools, leveraging the concept of the *Standalone Management Mode (MM)* in |
| 125 | the UEFI specification (see the PI v1.6 Volume 4: Management Mode Core |
| 126 | Interface). This will be referred to as the *Standalone MM Secure Partition* in |
| 127 | the rest of this document. |
| 128 | |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 129 | To enable SPM support in TF-A, the source code must be compiled with the build |
Manish Pandey | 247e5c3 | 2021-11-15 15:29:08 +0000 | [diff] [blame] | 130 | flag ``SPM_MM=1``, along with ``EL3_EXCEPTION_HANDLING=1`` and ``ENABLE_SVE_FOR_NS=0``. |
| 131 | On Arm platforms the build option ``ARM_BL31_IN_DRAM`` must be set to 1. Also, the |
Sughosh Ganu | df4db9c | 2018-11-14 10:40:33 +0530 | [diff] [blame] | 132 | location of the binary that contains the BL32 image |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 133 | (``BL32=path/to/image.bin``) must be specified. |
| 134 | |
| 135 | First, build the Standalone MM Secure Partition. To build it, refer to the |
| 136 | `instructions in the EDK2 repository`_. |
| 137 | |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 138 | Then build TF-A with SPM support and include the Standalone MM Secure Partition |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 139 | image in the FIP: |
| 140 | |
Paul Beesley | 493e349 | 2019-03-13 15:11:04 +0000 | [diff] [blame] | 141 | .. code:: shell |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 142 | |
| 143 | BL32=path/to/standalone/mm/sp BL33=path/to/bl33.bin \ |
Manish Pandey | 247e5c3 | 2021-11-15 15:29:08 +0000 | [diff] [blame] | 144 | make PLAT=fvp SPM_MM=1 EL3_EXCEPTION_HANDLING=1 ENABLE_SVE_FOR_NS=0 ARM_BL31_IN_DRAM=1 all fip |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 145 | |
| 146 | Describing Secure Partition resources |
| 147 | ------------------------------------- |
| 148 | |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 149 | TF-A exports a porting interface that enables a platform to specify the system |
| 150 | resources required by the Secure Partition. Some instructions are given below. |
| 151 | However, this interface is under development and it may change as new features |
| 152 | are implemented. |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 153 | |
| 154 | - A Secure Partition is considered a BL32 image, so the same defines that apply |
| 155 | to BL32 images apply to a Secure Partition: ``BL32_BASE`` and ``BL32_LIMIT``. |
| 156 | |
| 157 | - The following defines are needed to allocate space for the translation tables |
| 158 | used by the Secure Partition: ``PLAT_SP_IMAGE_MMAP_REGIONS`` and |
| 159 | ``PLAT_SP_IMAGE_MAX_XLAT_TABLES``. |
| 160 | |
| 161 | - The functions ``plat_get_secure_partition_mmap()`` and |
| 162 | ``plat_get_secure_partition_boot_info()`` have to be implemented. The file |
| 163 | ``plat/arm/board/fvp/fvp_common.c`` can be used as an example. It uses the |
| 164 | defines in ``include/plat/arm/common/arm_spm_def.h``. |
| 165 | |
| 166 | - ``plat_get_secure_partition_mmap()`` returns an array of mmap regions that |
| 167 | describe the memory regions that the SPM needs to allocate for a Secure |
| 168 | Partition. |
| 169 | |
| 170 | - ``plat_get_secure_partition_boot_info()`` returns a |
Paul Beesley | 45f4028 | 2019-10-15 10:57:42 +0000 | [diff] [blame] | 171 | ``spm_mm_boot_info_t`` struct that is populated by the platform |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 172 | with information about the memory map of the Secure Partition. |
| 173 | |
| 174 | For an example of all the changes in context, you may refer to commit |
| 175 | ``e29efeb1b4``, in which the port for FVP was introduced. |
| 176 | |
| 177 | Accessing Secure Partition services |
| 178 | ----------------------------------- |
| 179 | |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 180 | The `SMC Calling Convention`_ (*Arm DEN 0028B*) describes SMCs as a conduit for |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 181 | accessing services implemented in the Secure world. The ``MM_COMMUNICATE`` |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 182 | interface defined in the `Management Mode Interface Specification`_ (*Arm DEN |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 183 | 0060A*) is used to invoke a Secure Partition service as a Fast Call. |
| 184 | |
| 185 | The mechanism used to identify a service within the partition depends on the |
| 186 | service implementation. It is assumed that the caller of the service will be |
| 187 | able to discover this mechanism through standard platform discovery mechanisms |
| 188 | like ACPI and Device Trees. For example, *Volume 4: Platform Initialisation |
| 189 | Specification v1.6. Management Mode Core Interface* specifies that a GUID is |
| 190 | used to identify a management mode service. A client populates the GUID in the |
| 191 | ``EFI_MM_COMMUNICATE_HEADER``. The header is populated in the communication |
| 192 | buffer shared with the Secure Partition. |
| 193 | |
| 194 | A Fast Call appears to be atomic from the perspective of the caller and returns |
| 195 | when the requested operation has completed. A service invoked through the |
| 196 | ``MM_COMMUNICATE`` SMC will run to completion in the partition on a given CPU. |
| 197 | The SPM is responsible for guaranteeing this behaviour. This means that there |
| 198 | can only be a single outstanding Fast Call in a partition on a given CPU. |
| 199 | |
| 200 | Exchanging data with the Secure Partition |
| 201 | ----------------------------------------- |
| 202 | |
| 203 | The exchange of data between the Non-secure world and the partition takes place |
| 204 | through a shared memory region. The location of data in the shared memory area |
| 205 | is passed as a parameter to the ``MM_COMMUNICATE`` SMC. The shared memory area |
| 206 | is statically allocated by the SPM and is expected to be either implicitly known |
| 207 | to the Non-secure world or discovered through a platform discovery mechanism |
| 208 | e.g. ACPI table or device tree. It is possible for the Non-secure world to |
| 209 | exchange data with a partition only if it has been populated in this shared |
| 210 | memory area. The shared memory area is implemented as per the guidelines |
| 211 | specified in Section 3.2.3 of the `Management Mode Interface Specification`_ |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 212 | (*Arm DEN 0060A*). |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 213 | |
| 214 | The format of data structures used to encapsulate data in the shared memory is |
| 215 | agreed between the Non-secure world and the Secure Partition. For example, in |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 216 | the `Management Mode Interface specification`_ (*Arm DEN 0060A*), Section 4 |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 217 | describes that the communication buffer shared between the Non-secure world and |
| 218 | the Management Mode (MM) in the Secure world must be of the type |
| 219 | ``EFI_MM_COMMUNICATE_HEADER``. This data structure is defined in *Volume 4: |
| 220 | Platform Initialisation Specification v1.6. Management Mode Core Interface*. |
| 221 | Any caller of a MM service will have to use the ``EFI_MM_COMMUNICATE_HEADER`` |
| 222 | data structure. |
| 223 | |
| 224 | Runtime model of the Secure Partition |
| 225 | ===================================== |
| 226 | |
| 227 | This section describes how the Secure Partition interfaces with the SPM. |
| 228 | |
| 229 | Interface with SPM |
| 230 | ------------------ |
| 231 | |
| 232 | In order to instantiate one or more secure services in the Secure Partition in |
| 233 | S-EL0, the SPM should define the following types of interfaces: |
| 234 | |
| 235 | - Interfaces that enable access to privileged operations from S-EL0. These |
| 236 | operations typically require access to system resources that are either shared |
| 237 | amongst multiple software components in the Secure world or cannot be directly |
| 238 | accessed from an unprivileged Exception Level. |
| 239 | |
| 240 | - Interfaces that establish the control path between the SPM and the Secure |
| 241 | Partition. |
| 242 | |
| 243 | This section describes the APIs currently exported by the SPM that enable a |
| 244 | Secure Partition to initialise itself and export its services in S-EL0. These |
| 245 | interfaces are not accessible from the Non-secure world. |
| 246 | |
| 247 | Conduit |
| 248 | ^^^^^^^ |
| 249 | |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 250 | The `SMC Calling Convention`_ (*Arm DEN 0028B*) specification describes the SMC |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 251 | and HVC conduits for accessing firmware services and their availability |
| 252 | depending on the implemented Exception levels. In S-EL0, the Supervisor Call |
| 253 | exception (SVC) is the only architectural mechanism available for unprivileged |
| 254 | software to make a request for an operation implemented in privileged software. |
| 255 | Hence, the SVC conduit must be used by the Secure Partition to access interfaces |
| 256 | implemented by the SPM. |
| 257 | |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 258 | A SVC causes an exception to be taken to S-EL1. TF-A assumes ownership of S-EL1 |
| 259 | and installs a simple exception vector table in S-EL1 that relays a SVC request |
| 260 | from a Secure Partition as a SMC request to the SPM in EL3. Upon servicing the |
John Tsichritzis | 63801cd | 2019-07-05 14:22:12 +0100 | [diff] [blame] | 261 | SMC request, Trusted Firmware-A returns control directly to S-EL0 through an |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 262 | ERET instruction. |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 263 | |
| 264 | Calling conventions |
| 265 | ^^^^^^^^^^^^^^^^^^^ |
| 266 | |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 267 | The `SMC Calling Convention`_ (*Arm DEN 0028B*) specification describes the |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 268 | 32-bit and 64-bit calling conventions for the SMC and HVC conduits. The SVC |
| 269 | conduit introduces the concept of SVC32 and SVC64 calling conventions. The SVC32 |
| 270 | and SVC64 calling conventions are equivalent to the 32-bit (SMC32) and the |
| 271 | 64-bit (SMC64) calling conventions respectively. |
| 272 | |
| 273 | Communication initiated by SPM |
| 274 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 275 | |
| 276 | A service request is initiated from the SPM through an exception return |
| 277 | instruction (ERET) to S-EL0. Later, the Secure Partition issues an SVC |
| 278 | instruction to signal completion of the request. Some example use cases are |
| 279 | given below: |
| 280 | |
| 281 | - A request to initialise the Secure Partition during system boot. |
| 282 | |
| 283 | - A request to handle a runtime service request. |
| 284 | |
| 285 | Communication initiated by Secure Partition |
| 286 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 287 | |
| 288 | A request is initiated from the Secure Partition by executing a SVC instruction. |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 289 | An ERET instruction is used by TF-A to return to S-EL0 with the result of the |
| 290 | request. |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 291 | |
| 292 | For instance, a request to perform privileged operations on behalf of a |
| 293 | partition (e.g. management of memory attributes in the translation tables for |
| 294 | the Secure EL1&0 translation regime). |
| 295 | |
| 296 | Interfaces |
| 297 | ^^^^^^^^^^ |
| 298 | |
| 299 | The current implementation reserves function IDs for Fast Calls in the Standard |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 300 | Secure Service calls range (see `SMC Calling Convention`_ (*Arm DEN 0028B*) |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 301 | specification) for each API exported by the SPM. This section defines the |
| 302 | function prototypes for each function ID. The function IDs specify whether one |
| 303 | or both of the SVC32 and SVC64 calling conventions can be used to invoke the |
| 304 | corresponding interface. |
| 305 | |
| 306 | Secure Partition Event Management |
| 307 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 308 | |
| 309 | The Secure Partition provides an Event Management interface that is used by the |
| 310 | SPM to delegate service requests to the Secure Partition. The interface also |
| 311 | allows the Secure Partition to: |
| 312 | |
| 313 | - Register with the SPM a service that it provides. |
Paul Beesley | 1fbc97b | 2019-01-11 18:26:51 +0000 | [diff] [blame] | 314 | - Indicate completion of a service request delegated by the SPM |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 315 | |
| 316 | Miscellaneous interfaces |
| 317 | ------------------------ |
| 318 | |
Paul Beesley | e9754e6 | 2019-10-15 12:51:55 +0000 | [diff] [blame] | 319 | ``SPM_MM_VERSION_AARCH32`` |
| 320 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 321 | |
| 322 | - Description |
| 323 | |
| 324 | Returns the version of the interface exported by SPM. |
| 325 | |
| 326 | - Parameters |
| 327 | |
| 328 | - **uint32** - Function ID |
| 329 | |
| 330 | - SVC32 Version: **0x84000060** |
| 331 | |
| 332 | - Return parameters |
| 333 | |
| 334 | - **int32** - Status |
| 335 | |
| 336 | On success, the format of the value is as follows: |
| 337 | |
| 338 | - Bit [31]: Must be 0 |
| 339 | - Bits [30:16]: Major Version. Must be 0 for this revision of the SPM |
| 340 | interface. |
| 341 | - Bits [15:0]: Minor Version. Must be 1 for this revision of the SPM |
| 342 | interface. |
| 343 | |
| 344 | On error, the format of the value is as follows: |
| 345 | |
| 346 | - ``NOT_SUPPORTED``: SPM interface is not supported or not available for the |
| 347 | client. |
| 348 | |
| 349 | - Usage |
| 350 | |
| 351 | This function returns the version of the Secure Partition Manager |
| 352 | implementation. The major version is 0 and the minor version is 1. The version |
| 353 | number is a 31-bit unsigned integer, with the upper 15 bits denoting the major |
| 354 | revision, and the lower 16 bits denoting the minor revision. The following |
| 355 | rules apply to the version numbering: |
| 356 | |
| 357 | - Different major revision values indicate possibly incompatible functions. |
| 358 | |
| 359 | - For two revisions, A and B, for which the major revision values are |
| 360 | identical, if the minor revision value of revision B is greater than the |
| 361 | minor revision value of revision A, then every function in revision A must |
| 362 | work in a compatible way with revision B. However, it is possible for |
| 363 | revision B to have a higher function count than revision A. |
| 364 | |
| 365 | - Implementation responsibilities |
| 366 | |
| 367 | If this function returns a valid version number, all the functions that are |
| 368 | described subsequently must be implemented, unless it is explicitly stated |
| 369 | that a function is optional. |
| 370 | |
| 371 | See `Error Codes`_ for integer values that are associated with each return |
| 372 | code. |
| 373 | |
| 374 | Secure Partition Initialisation |
| 375 | ------------------------------- |
| 376 | |
| 377 | The SPM is responsible for initialising the architectural execution context to |
| 378 | enable initialisation of a service in S-EL0. The responsibilities of the SPM are |
| 379 | listed below. At the end of initialisation, the partition issues a |
Paul Beesley | e9754e6 | 2019-10-15 12:51:55 +0000 | [diff] [blame] | 380 | ``MM_SP_EVENT_COMPLETE_AARCH64`` call (described later) to signal readiness for |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 381 | handling requests for services implemented by the Secure Partition. The |
| 382 | initialisation event is executed as a Fast Call. |
| 383 | |
| 384 | Entry point invocation |
| 385 | ^^^^^^^^^^^^^^^^^^^^^^ |
| 386 | |
| 387 | The entry point for service requests that should be handled as Fast Calls is |
| 388 | used as the target of the ERET instruction to start initialisation of the Secure |
| 389 | Partition. |
| 390 | |
| 391 | Architectural Setup |
| 392 | ^^^^^^^^^^^^^^^^^^^ |
| 393 | |
| 394 | At cold boot, system registers accessible from S-EL0 will be in their reset |
| 395 | state unless otherwise specified. The SPM will perform the following |
| 396 | architectural setup to enable execution in S-EL0 |
| 397 | |
| 398 | MMU setup |
| 399 | ^^^^^^^^^ |
| 400 | |
| 401 | The platform port of a Secure Partition specifies to the SPM a list of regions |
| 402 | that it needs access to and their attributes. The SPM validates this resource |
| 403 | description and initialises the Secure EL1&0 translation regime as follows. |
| 404 | |
| 405 | 1. Device regions are mapped with nGnRE attributes and Execute Never |
| 406 | instruction access permissions. |
| 407 | |
| 408 | 2. Code memory regions are mapped with RO data and Executable instruction access |
| 409 | permissions. |
| 410 | |
| 411 | 3. Read Only data memory regions are mapped with RO data and Execute Never |
| 412 | instruction access permissions. |
| 413 | |
| 414 | 4. Read Write data memory regions are mapped with RW data and Execute Never |
| 415 | instruction access permissions. |
| 416 | |
| 417 | 5. If the resource description does not explicitly describe the type of memory |
| 418 | regions then all memory regions will be marked with Code memory region |
| 419 | attributes. |
| 420 | |
| 421 | 6. The ``UXN`` and ``PXN`` bits are set for regions that are not executable by |
| 422 | S-EL0 or S-EL1. |
| 423 | |
| 424 | System Register Setup |
| 425 | ^^^^^^^^^^^^^^^^^^^^^ |
| 426 | |
| 427 | System registers that influence software execution in S-EL0 are setup by the SPM |
| 428 | as follows: |
| 429 | |
| 430 | 1. ``SCTLR_EL1`` |
| 431 | |
| 432 | - ``UCI=1`` |
| 433 | - ``EOE=0`` |
| 434 | - ``WXN=1`` |
| 435 | - ``nTWE=1`` |
| 436 | - ``nTWI=1`` |
| 437 | - ``UCT=1`` |
| 438 | - ``DZE=1`` |
| 439 | - ``I=1`` |
| 440 | - ``UMA=0`` |
| 441 | - ``SA0=1`` |
| 442 | - ``C=1`` |
| 443 | - ``A=1`` |
| 444 | - ``M=1`` |
| 445 | |
| 446 | 2. ``CPACR_EL1`` |
| 447 | |
| 448 | - ``FPEN=b'11`` |
| 449 | |
| 450 | 3. ``PSTATE`` |
| 451 | |
| 452 | - ``D,A,I,F=1`` |
| 453 | - ``CurrentEL=0`` (EL0) |
| 454 | - ``SpSel=0`` (Thread mode) |
| 455 | - ``NRW=0`` (AArch64) |
| 456 | |
| 457 | General Purpose Register Setup |
| 458 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 459 | |
| 460 | SPM will invoke the entry point of a service by executing an ERET instruction. |
| 461 | This transition into S-EL0 is special since it is not in response to a previous |
| 462 | request through a SVC instruction. This is the first entry into S-EL0. The |
| 463 | general purpose register usage at the time of entry will be as specified in the |
| 464 | "Return State" column of Table 3-1 in Section 3.1 "Register use in AArch64 SMC |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 465 | calls" of the `SMC Calling Convention`_ (*Arm DEN 0028B*) specification. In |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 466 | addition, certain other restrictions will be applied as described below. |
| 467 | |
| 468 | 1. ``SP_EL0`` |
| 469 | |
| 470 | A non-zero value will indicate that the SPM has initialised the stack pointer |
| 471 | for the current CPU. |
| 472 | |
| 473 | The value will be 0 otherwise. |
| 474 | |
| 475 | 2. ``X4-X30`` |
| 476 | |
| 477 | The values of these registers will be 0. |
| 478 | |
| 479 | 3. ``X0-X3`` |
| 480 | |
| 481 | Parameters passed by the SPM. |
| 482 | |
| 483 | - ``X0``: Virtual address of a buffer shared between EL3 and S-EL0. The |
| 484 | buffer will be mapped in the Secure EL1&0 translation regime with read-only |
| 485 | memory attributes described earlier. |
| 486 | |
| 487 | - ``X1``: Size of the buffer in bytes. |
| 488 | |
| 489 | - ``X2``: Cookie value (*IMPLEMENTATION DEFINED*). |
| 490 | |
| 491 | - ``X3``: Cookie value (*IMPLEMENTATION DEFINED*). |
| 492 | |
| 493 | Runtime Event Delegation |
| 494 | ------------------------ |
| 495 | |
| 496 | The SPM receives requests for Secure Partition services through a synchronous |
| 497 | invocation (i.e. a SMC from the Non-secure world). These requests are delegated |
| 498 | to the partition by programming a return from the last |
Paul Beesley | e9754e6 | 2019-10-15 12:51:55 +0000 | [diff] [blame] | 499 | ``MM_SP_EVENT_COMPLETE_AARCH64`` call received from the partition. The last call |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 500 | was made to signal either completion of Secure Partition initialisation or |
| 501 | completion of a partition service request. |
| 502 | |
Paul Beesley | e9754e6 | 2019-10-15 12:51:55 +0000 | [diff] [blame] | 503 | ``MM_SP_EVENT_COMPLETE_AARCH64`` |
| 504 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 505 | |
| 506 | - Description |
| 507 | |
| 508 | Signal completion of the last SP service request. |
| 509 | |
| 510 | - Parameters |
| 511 | |
| 512 | - **uint32** - Function ID |
| 513 | |
| 514 | - SVC64 Version: **0xC4000061** |
| 515 | |
| 516 | - **int32** - Event Status Code |
| 517 | |
| 518 | Zero or a positive value indicates that the event was handled successfully. |
| 519 | The values depend upon the original event that was delegated to the Secure |
| 520 | partition. They are described as follows. |
| 521 | |
| 522 | - ``SUCCESS`` : Used to indicate that the Secure Partition was initialised |
| 523 | or a runtime request was handled successfully. |
| 524 | |
| 525 | - Any other value greater than 0 is used to pass a specific Event Status |
| 526 | code in response to a runtime event. |
| 527 | |
| 528 | A negative value indicates an error. The values of Event Status code depend |
| 529 | on the original event. |
| 530 | |
| 531 | - Return parameters |
| 532 | |
| 533 | - **int32** - Event ID/Return Code |
| 534 | |
| 535 | Zero or a positive value specifies the unique ID of the event being |
| 536 | delegated to the partition by the SPM. |
| 537 | |
| 538 | In the current implementation, this parameter contains the function ID of |
| 539 | the ``MM_COMMUNICATE`` SMC. This value indicates to the partition that an |
| 540 | event has been delegated to it in response to an ``MM_COMMUNICATE`` request |
| 541 | from the Non-secure world. |
| 542 | |
| 543 | A negative value indicates an error. The format of the value is as follows: |
| 544 | |
| 545 | - ``NOT_SUPPORTED``: Function was called from the Non-secure world. |
| 546 | |
| 547 | See `Error Codes`_ for integer values that are associated with each return |
| 548 | code. |
| 549 | |
| 550 | - **uint32** - Event Context Address |
| 551 | |
| 552 | Address of a buffer shared between the SPM and Secure Partition to pass |
| 553 | event specific information. The format of the data populated in the buffer |
| 554 | is implementation defined. |
| 555 | |
| 556 | The buffer is mapped in the Secure EL1&0 translation regime with read-only |
| 557 | memory attributes described earlier. |
| 558 | |
| 559 | For the SVC64 version, this parameter is a 64-bit Virtual Address (VA). |
| 560 | |
| 561 | For the SVC32 version, this parameter is a 32-bit Virtual Address (VA). |
| 562 | |
| 563 | - **uint32** - Event context size |
| 564 | |
| 565 | Size of the memory starting at Event Address. |
| 566 | |
| 567 | - **uint32/uint64** - Event Cookie |
| 568 | |
| 569 | This is an optional parameter. If unused its value is SBZ. |
| 570 | |
| 571 | - Usage |
| 572 | |
| 573 | This function signals to the SPM that the handling of the last event delegated |
| 574 | to a partition has completed. The partition is ready to handle its next event. |
| 575 | A return from this function is in response to the next event that will be |
| 576 | delegated to the partition. The return parameters describe the next event. |
| 577 | |
| 578 | - Caller responsibilities |
| 579 | |
Paul Beesley | e9754e6 | 2019-10-15 12:51:55 +0000 | [diff] [blame] | 580 | A Secure Partition must only call ``MM_SP_EVENT_COMPLETE_AARCH64`` to signal |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 581 | completion of a request that was delegated to it by the SPM. |
| 582 | |
| 583 | - Callee responsibilities |
| 584 | |
| 585 | When the SPM receives this call from a Secure Partition, the corresponding |
| 586 | syndrome information can be used to return control through an ERET |
| 587 | instruction, to the instruction immediately after the call in the Secure |
| 588 | Partition context. This syndrome information comprises of general purpose and |
| 589 | system register values when the call was made. |
| 590 | |
| 591 | The SPM must save this syndrome information and use it to delegate the next |
| 592 | event to the Secure Partition. The return parameters of this interface must |
| 593 | specify the properties of the event and be populated in ``X0-X3/W0-W3`` |
| 594 | registers. |
| 595 | |
| 596 | Secure Partition Memory Management |
| 597 | ---------------------------------- |
| 598 | |
| 599 | A Secure Partition executes at S-EL0, which is an unprivileged Exception Level. |
| 600 | The SPM is responsible for enabling access to regions of memory in the system |
| 601 | address map from a Secure Partition. This is done by mapping these regions in |
| 602 | the Secure EL1&0 Translation regime with appropriate memory attributes. |
| 603 | Attributes refer to memory type, permission, cacheability and shareability |
| 604 | attributes used in the Translation tables. The definitions of these attributes |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 605 | and their usage can be found in the `Armv8-A ARM`_ (*Arm DDI 0487*). |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 606 | |
| 607 | All memory required by the Secure Partition is allocated upfront in the SPM, |
| 608 | even before handing over to the Secure Partition for the first time. The initial |
| 609 | access permissions of the memory regions are statically provided by the platform |
| 610 | port and should allow the Secure Partition to run its initialisation code. |
| 611 | |
| 612 | However, they might not suit the final needs of the Secure Partition because its |
| 613 | final memory layout might not be known until the Secure Partition initialises |
| 614 | itself. As the Secure Partition initialises its runtime environment it might, |
| 615 | for example, load dynamically some modules. For instance, a Secure Partition |
| 616 | could implement a loader for a standard executable file format (e.g. an PE-COFF |
| 617 | loader for loading executable files at runtime). These executable files will be |
| 618 | a part of the Secure Partition image. The location of various sections in an |
| 619 | executable file and their permission attributes (e.g. read-write data, read-only |
| 620 | data and code) will be known only when the file is loaded into memory. |
| 621 | |
| 622 | In this case, the Secure Partition needs a way to change the access permissions |
| 623 | of its memory regions. The SPM provides this feature through the |
Paul Beesley | e9754e6 | 2019-10-15 12:51:55 +0000 | [diff] [blame] | 624 | ``MM_SP_MEMORY_ATTRIBUTES_SET_AARCH64`` SVC interface. This interface is |
| 625 | available to the Secure Partition during a specific time window: from the first |
| 626 | entry into the Secure Partition up to the first ``SP_EVENT_COMPLETE`` call that |
| 627 | signals the Secure Partition has finished its initialisation. Once the |
| 628 | initialisation is complete, the SPM does not allow changes to the memory |
| 629 | attributes. |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 630 | |
| 631 | This section describes the standard SVC interface that is implemented by the SPM |
| 632 | to determine and change permission attributes of memory regions that belong to a |
| 633 | Secure Partition. |
| 634 | |
Paul Beesley | e9754e6 | 2019-10-15 12:51:55 +0000 | [diff] [blame] | 635 | ``MM_SP_MEMORY_ATTRIBUTES_GET_AARCH64`` |
| 636 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 637 | |
| 638 | - Description |
| 639 | |
| 640 | Request the permission attributes of a memory region from S-EL0. |
| 641 | |
| 642 | - Parameters |
| 643 | |
| 644 | - **uint32** Function ID |
| 645 | |
| 646 | - SVC64 Version: **0xC4000064** |
| 647 | |
| 648 | - **uint64** Base Address |
| 649 | |
| 650 | This parameter is a 64-bit Virtual Address (VA). |
| 651 | |
| 652 | There are no alignment restrictions on the Base Address. The permission |
| 653 | attributes of the translation granule it lies in are returned. |
| 654 | |
| 655 | - Return parameters |
| 656 | |
| 657 | - **int32** - Memory Attributes/Return Code |
| 658 | |
| 659 | On success the format of the Return Code is as follows: |
| 660 | |
| 661 | - Bits[1:0] : Data access permission |
| 662 | |
| 663 | - b'00 : No access |
| 664 | - b'01 : Read-Write access |
| 665 | - b'10 : Reserved |
| 666 | - b'11 : Read-only access |
| 667 | |
| 668 | - Bit[2]: Instruction access permission |
| 669 | |
| 670 | - b'0 : Executable |
| 671 | - b'1 : Non-executable |
| 672 | |
| 673 | - Bit[30:3] : Reserved. SBZ. |
| 674 | |
| 675 | - Bit[31] : Must be 0 |
| 676 | |
| 677 | On failure the following error codes are returned: |
| 678 | |
| 679 | - ``INVALID_PARAMETERS``: The Secure Partition is not allowed to access the |
| 680 | memory region the Base Address lies in. |
| 681 | |
| 682 | - ``NOT_SUPPORTED`` : The SPM does not support retrieval of attributes of |
| 683 | any memory page that is accessible by the Secure Partition, or the |
| 684 | function was called from the Non-secure world. Also returned if it is |
Paul Beesley | e9754e6 | 2019-10-15 12:51:55 +0000 | [diff] [blame] | 685 | used after ``MM_SP_EVENT_COMPLETE_AARCH64``. |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 686 | |
| 687 | See `Error Codes`_ for integer values that are associated with each return |
| 688 | code. |
| 689 | |
| 690 | - Usage |
| 691 | |
| 692 | This function is used to request the permission attributes for S-EL0 on a |
| 693 | memory region accessible from a Secure Partition. The size of the memory |
| 694 | region is equal to the Translation Granule size used in the Secure EL1&0 |
| 695 | translation regime. Requests to retrieve other memory region attributes are |
| 696 | not currently supported. |
| 697 | |
| 698 | - Caller responsibilities |
| 699 | |
| 700 | The caller must obtain the Translation Granule Size of the Secure EL1&0 |
| 701 | translation regime from the SPM through an implementation defined method. |
| 702 | |
| 703 | - Callee responsibilities |
| 704 | |
| 705 | The SPM must not return the memory access controls for a page of memory that |
| 706 | is not accessible from a Secure Partition. |
| 707 | |
Paul Beesley | e9754e6 | 2019-10-15 12:51:55 +0000 | [diff] [blame] | 708 | ``MM_SP_MEMORY_ATTRIBUTES_SET_AARCH64`` |
| 709 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 710 | |
| 711 | - Description |
| 712 | |
| 713 | Set the permission attributes of a memory region from S-EL0. |
| 714 | |
| 715 | - Parameters |
| 716 | |
| 717 | - **uint32** - Function ID |
| 718 | |
| 719 | - SVC64 Version: **0xC4000065** |
| 720 | |
| 721 | - **uint64** - Base Address |
| 722 | |
| 723 | This parameter is a 64-bit Virtual Address (VA). |
| 724 | |
| 725 | The alignment of the Base Address must be greater than or equal to the size |
| 726 | of the Translation Granule Size used in the Secure EL1&0 translation |
| 727 | regime. |
| 728 | |
| 729 | - **uint32** - Page count |
| 730 | |
| 731 | Number of pages starting from the Base Address whose memory attributes |
| 732 | should be changed. The page size is equal to the Translation Granule Size. |
| 733 | |
| 734 | - **uint32** - Memory Access Controls |
| 735 | |
| 736 | - Bits[1:0] : Data access permission |
| 737 | |
| 738 | - b'00 : No access |
| 739 | - b'01 : Read-Write access |
| 740 | - b'10 : Reserved |
| 741 | - b'11 : Read-only access |
| 742 | |
| 743 | - Bit[2] : Instruction access permission |
| 744 | |
| 745 | - b'0 : Executable |
| 746 | - b'1 : Non-executable |
| 747 | |
| 748 | - Bits[31:3] : Reserved. SBZ. |
| 749 | |
| 750 | A combination of attributes that mark the region with RW and Executable |
| 751 | permissions is prohibited. A request to mark a device memory region with |
| 752 | Executable permissions is prohibited. |
| 753 | |
| 754 | - Return parameters |
| 755 | |
| 756 | - **int32** - Return Code |
| 757 | |
| 758 | - ``SUCCESS``: The Memory Access Controls were changed successfully. |
| 759 | |
| 760 | - ``DENIED``: The SPM is servicing a request to change the attributes of a |
| 761 | memory region that overlaps with the region specified in this request. |
| 762 | |
| 763 | - ``INVALID_PARAMETER``: An invalid combination of Memory Access Controls |
| 764 | has been specified. The Base Address is not correctly aligned. The Secure |
| 765 | Partition is not allowed to access part or all of the memory region |
| 766 | specified in the call. |
| 767 | |
| 768 | - ``NO_MEMORY``: The SPM does not have memory resources to change the |
| 769 | attributes of the memory region in the translation tables. |
| 770 | |
| 771 | - ``NOT_SUPPORTED``: The SPM does not permit change of attributes of any |
| 772 | memory region that is accessible by the Secure Partition. Function was |
| 773 | called from the Non-secure world. Also returned if it is used after |
Paul Beesley | e9754e6 | 2019-10-15 12:51:55 +0000 | [diff] [blame] | 774 | ``MM_SP_EVENT_COMPLETE_AARCH64``. |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 775 | |
| 776 | See `Error Codes`_ for integer values that are associated with each return |
| 777 | code. |
| 778 | |
| 779 | - Usage |
| 780 | |
| 781 | This function is used to change the permission attributes for S-EL0 on a |
| 782 | memory region accessible from a Secure Partition. The size of the memory |
| 783 | region is equal to the Translation Granule size used in the Secure EL1&0 |
| 784 | translation regime. Requests to change other memory region attributes are not |
| 785 | currently supported. |
| 786 | |
| 787 | This function is only available at boot time. This interface is revoked after |
Paul Beesley | e9754e6 | 2019-10-15 12:51:55 +0000 | [diff] [blame] | 788 | the Secure Partition sends the first ``MM_SP_EVENT_COMPLETE_AARCH64`` to |
| 789 | signal that it is initialised and ready to receive run-time requests. |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 790 | |
| 791 | - Caller responsibilities |
| 792 | |
| 793 | The caller must obtain the Translation Granule Size of the Secure EL1&0 |
| 794 | translation regime from the SPM through an implementation defined method. |
| 795 | |
| 796 | - Callee responsibilities |
| 797 | |
| 798 | The SPM must preserve the original memory access controls of the region of |
| 799 | memory in case of an unsuccessful call. The SPM must preserve the consistency |
| 800 | of the S-EL1 translation regime if this function is called on different PEs |
| 801 | concurrently and the memory regions specified overlap. |
| 802 | |
| 803 | Error Codes |
| 804 | ----------- |
| 805 | |
| 806 | .. csv-table:: |
| 807 | :header: "Name", "Value" |
| 808 | |
| 809 | ``SUCCESS``,0 |
| 810 | ``NOT_SUPPORTED``,-1 |
| 811 | ``INVALID_PARAMETER``,-2 |
| 812 | ``DENIED``,-3 |
| 813 | ``NO_MEMORY``,-5 |
| 814 | ``NOT_PRESENT``,-7 |
| 815 | |
| 816 | -------------- |
| 817 | |
Olivier Deprez | 9938c13 | 2021-04-21 11:22:23 +0200 | [diff] [blame] | 818 | *Copyright (c) 2017-2021, Arm Limited and Contributors. All rights reserved.* |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 819 | |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 820 | .. _Armv8-A ARM: https://developer.arm.com/docs/ddi0487/latest/arm-architecture-reference-manual-armv8-for-armv8-a-architecture-profile |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 821 | .. _instructions in the EDK2 repository: https://github.com/tianocore/edk2-staging/blob/AArch64StandaloneMm/HowtoBuild.MD |
| 822 | .. _Management Mode Interface Specification: http://infocenter.arm.com/help/topic/com.arm.doc.den0060a/DEN0060A_ARM_MM_Interface_Specification.pdf |
| 823 | .. _SDEI Specification: http://infocenter.arm.com/help/topic/com.arm.doc.den0054a/ARM_DEN0054A_Software_Delegated_Exception_Interface.pdf |
laurenw-arm | 03e7e61 | 2020-04-16 10:02:17 -0500 | [diff] [blame] | 824 | .. _SMC Calling Convention: https://developer.arm.com/docs/den0028/latest |
Antonio Nino Diaz | 352c852 | 2017-12-15 11:41:17 +0000 | [diff] [blame] | 825 | |
Paul Beesley | 814f8c0 | 2019-03-13 15:49:27 +0000 | [diff] [blame] | 826 | .. |Image 1| image:: ../resources/diagrams/secure_sw_stack_tos.png |
| 827 | .. |Image 2| image:: ../resources/diagrams/secure_sw_stack_sp.png |