1fcb1398fSOlivier DeprezSecure Partition Manager 2fcb1398fSOlivier Deprez************************ 3fcb1398fSOlivier Deprez 4fcb1398fSOlivier Deprez.. contents:: 5fcb1398fSOlivier Deprez 6fcb1398fSOlivier DeprezAcronyms 7fcb1398fSOlivier Deprez======== 8fcb1398fSOlivier Deprez 9fcb1398fSOlivier Deprez+--------+-----------------------------------+ 10*b5dd2422SOlivier Deprez| CoT | Chain of Trust | 11*b5dd2422SOlivier Deprez+--------+-----------------------------------+ 124ec3ccb4SMadhukar Pappireddy| DMA | Direct Memory Access | 134ec3ccb4SMadhukar Pappireddy+--------+-----------------------------------+ 14fcb1398fSOlivier Deprez| DTB | Device Tree Blob | 15fcb1398fSOlivier Deprez+--------+-----------------------------------+ 16fcb1398fSOlivier Deprez| DTS | Device Tree Source | 17fcb1398fSOlivier Deprez+--------+-----------------------------------+ 18fcb1398fSOlivier Deprez| EC | Execution Context | 19fcb1398fSOlivier Deprez+--------+-----------------------------------+ 20fcb1398fSOlivier Deprez| FIP | Firmware Image Package | 21fcb1398fSOlivier Deprez+--------+-----------------------------------+ 22*b5dd2422SOlivier Deprez| FF-A | Firmware Framework for Armv8-A | 23fcb1398fSOlivier Deprez+--------+-----------------------------------+ 24fcb1398fSOlivier Deprez| IPA | Intermediate Physical Address | 25fcb1398fSOlivier Deprez+--------+-----------------------------------+ 26fcb1398fSOlivier Deprez| NWd | Normal World | 27fcb1398fSOlivier Deprez+--------+-----------------------------------+ 28fcb1398fSOlivier Deprez| ODM | Original Design Manufacturer | 29fcb1398fSOlivier Deprez+--------+-----------------------------------+ 30fcb1398fSOlivier Deprez| OEM | Original Equipment Manufacturer | 31fcb1398fSOlivier Deprez+--------+-----------------------------------+ 32fcb1398fSOlivier Deprez| PA | Physical Address | 33fcb1398fSOlivier Deprez+--------+-----------------------------------+ 34fcb1398fSOlivier Deprez| PE | Processing Element | 35fcb1398fSOlivier Deprez+--------+-----------------------------------+ 36*b5dd2422SOlivier Deprez| PM | Power Management | 37*b5dd2422SOlivier Deprez+--------+-----------------------------------+ 38fcb1398fSOlivier Deprez| PVM | Primary VM | 39fcb1398fSOlivier Deprez+--------+-----------------------------------+ 404ec3ccb4SMadhukar Pappireddy| SMMU | System Memory Management Unit | 414ec3ccb4SMadhukar Pappireddy+--------+-----------------------------------+ 42fcb1398fSOlivier Deprez| SP | Secure Partition | 43fcb1398fSOlivier Deprez+--------+-----------------------------------+ 44*b5dd2422SOlivier Deprez| SPD | Secure Payload Dispatcher | 45*b5dd2422SOlivier Deprez+--------+-----------------------------------+ 46fcb1398fSOlivier Deprez| SPM | Secure Partition Manager | 47fcb1398fSOlivier Deprez+--------+-----------------------------------+ 48fcb1398fSOlivier Deprez| SPMC | SPM Core | 49fcb1398fSOlivier Deprez+--------+-----------------------------------+ 50fcb1398fSOlivier Deprez| SPMD | SPM Dispatcher | 51fcb1398fSOlivier Deprez+--------+-----------------------------------+ 52fcb1398fSOlivier Deprez| SiP | Silicon Provider | 53fcb1398fSOlivier Deprez+--------+-----------------------------------+ 54fcb1398fSOlivier Deprez| SWd | Secure World | 55fcb1398fSOlivier Deprez+--------+-----------------------------------+ 56fcb1398fSOlivier Deprez| TLV | Tag-Length-Value | 57fcb1398fSOlivier Deprez+--------+-----------------------------------+ 58fcb1398fSOlivier Deprez| TOS | Trusted Operating System | 59fcb1398fSOlivier Deprez+--------+-----------------------------------+ 60fcb1398fSOlivier Deprez| VM | Virtual Machine | 61fcb1398fSOlivier Deprez+--------+-----------------------------------+ 62fcb1398fSOlivier Deprez 63fcb1398fSOlivier DeprezForeword 64fcb1398fSOlivier Deprez======== 65fcb1398fSOlivier Deprez 66fcb1398fSOlivier DeprezTwo implementations of a Secure Partition Manager co-exist in the TF-A codebase: 67fcb1398fSOlivier Deprez 681b17f4f1SOlivier Deprez- SPM based on the FF-A specification `[1]`_. 69fcb1398fSOlivier Deprez- SPM based on the MM interface to communicate with an S-EL0 partition `[2]`_. 70fcb1398fSOlivier Deprez 71fcb1398fSOlivier DeprezBoth implementations differ in their architectures and only one can be selected 72fcb1398fSOlivier Deprezat build time. 73fcb1398fSOlivier Deprez 74fcb1398fSOlivier DeprezThis document: 75fcb1398fSOlivier Deprez 761b17f4f1SOlivier Deprez- describes the FF-A implementation where the Secure Partition Manager 77fcb1398fSOlivier Deprez resides at EL3 and S-EL2 (or EL3 and S-EL1). 78fcb1398fSOlivier Deprez- is not an architecture specification and it might provide assumptions 79fcb1398fSOlivier Deprez on sections mandated as implementation-defined in the specification. 80fcb1398fSOlivier Deprez- covers the implications to TF-A used as a bootloader, and Hafnium 81fcb1398fSOlivier Deprez used as a reference code base for an S-EL2 secure firmware on 82*b5dd2422SOlivier Deprez platforms implementing the FEAT_SEL2 (formerly Armv8.4 Secure EL2) 83*b5dd2422SOlivier Deprez architecture extension. 84fcb1398fSOlivier Deprez 85fcb1398fSOlivier DeprezTerminology 86fcb1398fSOlivier Deprez----------- 87fcb1398fSOlivier Deprez 88*b5dd2422SOlivier Deprez- The term Hypervisor refers to the NS-EL2 component managing Virtual Machines 89*b5dd2422SOlivier Deprez (or partitions) in the normal world. 90*b5dd2422SOlivier Deprez- The term SPMC refers to the S-EL2 component managing secure partitions in 91*b5dd2422SOlivier Deprez the secure world when the FEAT_SEL2 architecture extension is implemented. 92*b5dd2422SOlivier Deprez- Alternatively, SPMC can refer to an S-EL1 component, itself being a secure 93*b5dd2422SOlivier Deprez partition and implementing the FF-A ABI on platforms not implementing the 94*b5dd2422SOlivier Deprez FEAT_SEL2 architecture extension. 95*b5dd2422SOlivier Deprez- The term VM refers to a normal world Virtual Machine managed by an Hypervisor. 96*b5dd2422SOlivier Deprez- The term SP refers to a secure world "Virtual Machine" managed by an SPMC. 97fcb1398fSOlivier Deprez 98fcb1398fSOlivier DeprezSupport for legacy platforms 99fcb1398fSOlivier Deprez---------------------------- 100fcb1398fSOlivier Deprez 101*b5dd2422SOlivier DeprezIn the implementation, the SPM is split into SPMD and SPMC components. 102*b5dd2422SOlivier DeprezThe SPMD is located at EL3 and mainly relays FF-A messages from 103*b5dd2422SOlivier DeprezNWd (Hypervisor or OS kernel) to SPMC located either at S-EL1 or S-EL2. 104fcb1398fSOlivier Deprez 105*b5dd2422SOlivier DeprezHence TF-A supports both cases where the SPMC is located either at: 106fcb1398fSOlivier Deprez 107*b5dd2422SOlivier Deprez- S-EL1 supporting platforms not implementing the FEAT_SEL2 architecture 108*b5dd2422SOlivier Deprez extension. The SPMD relays the FF-A protocol from EL3 to S-EL1. 109*b5dd2422SOlivier Deprez- or S-EL2 supporting platforms implementing the FEAT_SEL2 architecture 110*b5dd2422SOlivier Deprez extension. The SPMD relays the FF-A protocol from EL3 to S-EL2. 111fcb1398fSOlivier Deprez 112*b5dd2422SOlivier DeprezThe same TF-A SPMD component is used to support both configurations. 113*b5dd2422SOlivier DeprezThe SPMC exception level is a build time choice. 114fcb1398fSOlivier Deprez 115fcb1398fSOlivier DeprezSample reference stack 116fcb1398fSOlivier Deprez====================== 117fcb1398fSOlivier Deprez 118*b5dd2422SOlivier DeprezThe following diagram illustrates a possible configuration when the 119*b5dd2422SOlivier DeprezFEAT_SEL2 architecture extension is implemented, showing the SPMD 120*b5dd2422SOlivier Deprezand SPMC, one or multiple secure partitions, with an optional 121*b5dd2422SOlivier DeprezHypervisor: 122fcb1398fSOlivier Deprez 123fcb1398fSOlivier Deprez.. image:: ../resources/diagrams/ff-a-spm-sel2.png 124fcb1398fSOlivier Deprez 125fcb1398fSOlivier DeprezTF-A build options 126fcb1398fSOlivier Deprez================== 127fcb1398fSOlivier Deprez 128*b5dd2422SOlivier DeprezThis section explains the TF-A build options involved in building with 129*b5dd2422SOlivier Deprezsupport for an FF-A based SPM where the SPMD is located at EL3 and the 130*b5dd2422SOlivier DeprezSPMC located at S-EL1 or S-EL2: 131fcb1398fSOlivier Deprez 132*b5dd2422SOlivier Deprez- **SPD=spmd**: this option selects the SPMD component to relay the FF-A 133fcb1398fSOlivier Deprez protocol from NWd to SWd back and forth. It is not possible to 134fcb1398fSOlivier Deprez enable another Secure Payload Dispatcher when this option is chosen. 135*b5dd2422SOlivier Deprez- **SPMD_SPM_AT_SEL2**: this option adjusts the SPMC exception 136fcb1398fSOlivier Deprez level to being S-EL1 or S-EL2. It defaults to enabled (value 1) when 137fcb1398fSOlivier Deprez SPD=spmd is chosen. 138fcb1398fSOlivier Deprez- **CTX_INCLUDE_EL2_REGS**: this option permits saving (resp. 139fcb1398fSOlivier Deprez restoring) the EL2 system register context before entering (resp. 140*b5dd2422SOlivier Deprez after leaving) the SPMC. It is mandatorily enabled when 141*b5dd2422SOlivier Deprez ``SPMD_SPM_AT_SEL2`` is enabled. The context save/restore routine 142*b5dd2422SOlivier Deprez and exhaustive list of registers is visible at `[4]`_. 143*b5dd2422SOlivier Deprez- **SP_LAYOUT_FILE**: this option specifies a text description file 144*b5dd2422SOlivier Deprez providing paths to SP binary images and manifests in DTS format 145*b5dd2422SOlivier Deprez (see `Describing secure partitions`_). It 146fcb1398fSOlivier Deprez is required when ``SPMD_SPM_AT_SEL2`` is enabled hence when multiple 147*b5dd2422SOlivier Deprez secure partitions are to be loaded on behalf of the SPMC. 148fcb1398fSOlivier Deprez 149*b5dd2422SOlivier Deprez+---------------+----------------------+------------------+ 150fcb1398fSOlivier Deprez| | CTX_INCLUDE_EL2_REGS | SPMD_SPM_AT_SEL2 | 151*b5dd2422SOlivier Deprez+---------------+----------------------+------------------+ 152*b5dd2422SOlivier Deprez| SPMC at S-EL1 | 0 | 0 | 153*b5dd2422SOlivier Deprez+---------------+----------------------+------------------+ 154*b5dd2422SOlivier Deprez| SPMC at S-EL2 | 1 | 1 (default when | 155fcb1398fSOlivier Deprez| | | SPD=spmd) | 156*b5dd2422SOlivier Deprez+---------------+----------------------+------------------+ 157fcb1398fSOlivier Deprez 158fcb1398fSOlivier DeprezOther combinations of such build options either break the build or are not 159fcb1398fSOlivier Deprezsupported. 160fcb1398fSOlivier Deprez 161*b5dd2422SOlivier DeprezNotes: 162*b5dd2422SOlivier Deprez 163*b5dd2422SOlivier Deprez- Only Arm's FVP platform is supported to use with the TF-A reference software 164*b5dd2422SOlivier Deprez stack. 165*b5dd2422SOlivier Deprez- The reference software stack uses FEAT_PAuth (formerly Armv8.3-PAuth) and 166*b5dd2422SOlivier Deprez FEAT_BTI (formerly Armv8.5-BTI) architecture extensions by default at EL3 167*b5dd2422SOlivier Deprez and S-EL2. 168*b5dd2422SOlivier Deprez- The ``CTX_INCLUDE_EL2_REGS`` option provides the generic support for 169fcb1398fSOlivier Deprez barely saving/restoring EL2 registers from an Arm arch perspective. As such 170fcb1398fSOlivier Deprez it is decoupled from the ``SPD=spmd`` option. 171*b5dd2422SOlivier Deprez- BL32 option is re-purposed to specify the SPMC image. It can specify either 172*b5dd2422SOlivier Deprez the Hafnium binary path (built for the secure world) or the path to a TEE 173*b5dd2422SOlivier Deprez binary implementing FF-A interfaces. 174*b5dd2422SOlivier Deprez- BL33 option can specify the TFTF binary or a normal world loader 175*b5dd2422SOlivier Deprez such as U-Boot or the UEFI framework. 176fcb1398fSOlivier Deprez 177fcb1398fSOlivier DeprezSample TF-A build command line when SPMC is located at S-EL1 178*b5dd2422SOlivier Deprez(e.g. when the FEAT_EL2 architecture extension is not implemented): 179fcb1398fSOlivier Deprez 180fcb1398fSOlivier Deprez.. code:: shell 181fcb1398fSOlivier Deprez 182fcb1398fSOlivier Deprez make \ 183fcb1398fSOlivier Deprez CROSS_COMPILE=aarch64-none-elf- \ 184fcb1398fSOlivier Deprez SPD=spmd \ 185fcb1398fSOlivier Deprez SPMD_SPM_AT_SEL2=0 \ 186fcb1398fSOlivier Deprez BL32=<path-to-tee-binary> \ 187*b5dd2422SOlivier Deprez BL33=<path-to-bl33-binary> \ 188fcb1398fSOlivier Deprez PLAT=fvp \ 189fcb1398fSOlivier Deprez all fip 190fcb1398fSOlivier Deprez 191*b5dd2422SOlivier DeprezSample TF-A build command line for a FEAT_SEL2 enabled system where the SPMC is 192*b5dd2422SOlivier Deprezlocated at S-EL2: 193fcb1398fSOlivier Deprez 194fcb1398fSOlivier Deprez.. code:: shell 195fcb1398fSOlivier Deprez 196fcb1398fSOlivier Deprez make \ 197fcb1398fSOlivier Deprez CROSS_COMPILE=aarch64-none-elf- \ 198*b5dd2422SOlivier Deprez PLAT=fvp \ 199fcb1398fSOlivier Deprez SPD=spmd \ 200fcb1398fSOlivier Deprez CTX_INCLUDE_EL2_REGS=1 \ 201*b5dd2422SOlivier Deprez ARM_ARCH_MINOR=5 \ 202*b5dd2422SOlivier Deprez BRANCH_PROTECTION=1 \ 203*b5dd2422SOlivier Deprez CTX_INCLUDE_PAUTH_REGS=1 \ 204*b5dd2422SOlivier Deprez BL32=<path-to-hafnium-binary> \ 205*b5dd2422SOlivier Deprez BL33=<path-to-bl33-binary> \ 206fcb1398fSOlivier Deprez SP_LAYOUT_FILE=sp_layout.json \ 207fcb1398fSOlivier Deprez all fip 208fcb1398fSOlivier Deprez 209*b5dd2422SOlivier DeprezSame as above with enabling secure boot in addition: 210fcb1398fSOlivier Deprez 211fcb1398fSOlivier Deprez.. code:: shell 212fcb1398fSOlivier Deprez 213fcb1398fSOlivier Deprez make \ 214fcb1398fSOlivier Deprez CROSS_COMPILE=aarch64-none-elf- \ 215*b5dd2422SOlivier Deprez PLAT=fvp \ 216fcb1398fSOlivier Deprez SPD=spmd \ 217fcb1398fSOlivier Deprez CTX_INCLUDE_EL2_REGS=1 \ 218*b5dd2422SOlivier Deprez ARM_ARCH_MINOR=5 \ 219*b5dd2422SOlivier Deprez BRANCH_PROTECTION=1 \ 220*b5dd2422SOlivier Deprez CTX_INCLUDE_PAUTH_REGS=1 \ 221*b5dd2422SOlivier Deprez BL32=<path-to-hafnium-binary> \ 222*b5dd2422SOlivier Deprez BL33=<path-to-bl33-binary> \ 223*b5dd2422SOlivier Deprez SP_LAYOUT_FILE=sp_layout.json \ 224fcb1398fSOlivier Deprez MBEDTLS_DIR=<path-to-mbedtls-lib> \ 225fcb1398fSOlivier Deprez TRUSTED_BOARD_BOOT=1 \ 226fcb1398fSOlivier Deprez COT=dualroot \ 227fcb1398fSOlivier Deprez ARM_ROTPK_LOCATION=devel_rsa \ 228fcb1398fSOlivier Deprez ROT_KEY=plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem \ 229fcb1398fSOlivier Deprez GENERATE_COT=1 \ 230fcb1398fSOlivier Deprez all fip 231fcb1398fSOlivier Deprez 232*b5dd2422SOlivier DeprezFVP model invocation 233*b5dd2422SOlivier Deprez==================== 234*b5dd2422SOlivier Deprez 235*b5dd2422SOlivier DeprezThe FVP command line needs the following options to exercise the S-EL2 SPMC: 236*b5dd2422SOlivier Deprez 237*b5dd2422SOlivier Deprez+---------------------------------------------------+------------------------------------+ 238*b5dd2422SOlivier Deprez| - cluster0.has_arm_v8-5=1 | Implements FEAT_SEL2, FEAT_PAuth, | 239*b5dd2422SOlivier Deprez| - cluster1.has_arm_v8-5=1 | and FEAT_BTI. | 240*b5dd2422SOlivier Deprez+---------------------------------------------------+------------------------------------+ 241*b5dd2422SOlivier Deprez| - pci.pci_smmuv3.mmu.SMMU_AIDR=2 | Parameters required for the | 242*b5dd2422SOlivier Deprez| - pci.pci_smmuv3.mmu.SMMU_IDR0=0x0046123B | SMMUv3.2 modeling. | 243*b5dd2422SOlivier Deprez| - pci.pci_smmuv3.mmu.SMMU_IDR1=0x00600002 | | 244*b5dd2422SOlivier Deprez| - pci.pci_smmuv3.mmu.SMMU_IDR3=0x1714 | | 245*b5dd2422SOlivier Deprez| - pci.pci_smmuv3.mmu.SMMU_IDR5=0xFFFF0472 | | 246*b5dd2422SOlivier Deprez| - pci.pci_smmuv3.mmu.SMMU_S_IDR1=0xA0000002 | | 247*b5dd2422SOlivier Deprez| - pci.pci_smmuv3.mmu.SMMU_S_IDR2=0 | | 248*b5dd2422SOlivier Deprez| - pci.pci_smmuv3.mmu.SMMU_S_IDR3=0 | | 249*b5dd2422SOlivier Deprez+---------------------------------------------------+------------------------------------+ 250*b5dd2422SOlivier Deprez| - cluster0.has_branch_target_exception=1 | Implements FEAT_BTI. | 251*b5dd2422SOlivier Deprez| - cluster1.has_branch_target_exception=1 | | 252*b5dd2422SOlivier Deprez+---------------------------------------------------+------------------------------------+ 253*b5dd2422SOlivier Deprez| - cluster0.restriction_on_speculative_execution=2 | Required by the EL2 context | 254*b5dd2422SOlivier Deprez| - cluster1.restriction_on_speculative_execution=2 | save/restore routine. | 255*b5dd2422SOlivier Deprez+---------------------------------------------------+------------------------------------+ 256*b5dd2422SOlivier Deprez 257*b5dd2422SOlivier DeprezSample FVP command line invocation: 258*b5dd2422SOlivier Deprez 259*b5dd2422SOlivier Deprez.. code:: shell 260*b5dd2422SOlivier Deprez 261*b5dd2422SOlivier Deprez <path-to-fvp-model>/FVP_Base_RevC-2xAEMv8A -C pctl.startup=0.0.0.0 262*b5dd2422SOlivier Deprez -C cluster0.NUM_CORES=4 -C cluster1.NUM_CORES=4 -C bp.secure_memory=1 \ 263*b5dd2422SOlivier Deprez -C bp.secureflashloader.fname=trusted-firmware-a/build/fvp/debug/bl1.bin \ 264*b5dd2422SOlivier Deprez -C bp.flashloader0.fname=trusted-firmware-a/build/fvp/debug/fip.bin \ 265*b5dd2422SOlivier Deprez -C bp.pl011_uart0.out_file=fvp-uart0.log -C bp.pl011_uart1.out_file=fvp-uart1.log \ 266*b5dd2422SOlivier Deprez -C bp.pl011_uart2.out_file=fvp-uart2.log \ 267*b5dd2422SOlivier Deprez -C cluster0.has_arm_v8-5=1 -C cluster1.has_arm_v8-5=1 -C pci.pci_smmuv3.mmu.SMMU_AIDR=2 \ 268*b5dd2422SOlivier Deprez -C pci.pci_smmuv3.mmu.SMMU_IDR0=0x0046123B -C pci.pci_smmuv3.mmu.SMMU_IDR1=0x00600002 \ 269*b5dd2422SOlivier Deprez -C pci.pci_smmuv3.mmu.SMMU_IDR3=0x1714 -C pci.pci_smmuv3.mmu.SMMU_IDR5=0xFFFF0472 \ 270*b5dd2422SOlivier Deprez -C pci.pci_smmuv3.mmu.SMMU_S_IDR1=0xA0000002 -C pci.pci_smmuv3.mmu.SMMU_S_IDR2=0 \ 271*b5dd2422SOlivier Deprez -C pci.pci_smmuv3.mmu.SMMU_S_IDR3=0 \ 272*b5dd2422SOlivier Deprez -C cluster0.has_branch_target_exception=1 \ 273*b5dd2422SOlivier Deprez -C cluster1.has_branch_target_exception=1 \ 274*b5dd2422SOlivier Deprez -C cluster0.restriction_on_speculative_execution=2 \ 275*b5dd2422SOlivier Deprez -C cluster1.restriction_on_speculative_execution=2 276*b5dd2422SOlivier Deprez 277fcb1398fSOlivier DeprezBoot process 278fcb1398fSOlivier Deprez============ 279fcb1398fSOlivier Deprez 280*b5dd2422SOlivier DeprezLoading Hafnium and secure partitions in the secure world 281fcb1398fSOlivier Deprez--------------------------------------------------------- 282fcb1398fSOlivier Deprez 283*b5dd2422SOlivier DeprezTF-A BL2 is the bootlader for the SPMC and SPs in the secure world. 284fcb1398fSOlivier Deprez 285fcb1398fSOlivier DeprezSPs may be signed by different parties (SiP, OEM/ODM, TOS vendor, etc.). 286*b5dd2422SOlivier DeprezThus they are supplied as distinct signed entities within the FIP flash 287*b5dd2422SOlivier Deprezimage. The FIP image itself is not signed hence this provides the ability 288*b5dd2422SOlivier Deprezto upgrade SPs in the field. 289fcb1398fSOlivier Deprez 290fcb1398fSOlivier DeprezBooting through TF-A 291fcb1398fSOlivier Deprez-------------------- 292fcb1398fSOlivier Deprez 293fcb1398fSOlivier DeprezSP manifests 294fcb1398fSOlivier Deprez~~~~~~~~~~~~ 295fcb1398fSOlivier Deprez 296fcb1398fSOlivier DeprezAn SP manifest describes SP attributes as defined in `[1]`_ 297*b5dd2422SOlivier Deprez(partition manifest at virtual FF-A instance) in DTS format. It is 298*b5dd2422SOlivier Deprezrepresented as a single file associated with the SP. A sample is 299fcb1398fSOlivier Deprezprovided by `[5]`_. A binding document is provided by `[6]`_. 300fcb1398fSOlivier Deprez 301fcb1398fSOlivier DeprezSecure Partition packages 302fcb1398fSOlivier Deprez~~~~~~~~~~~~~~~~~~~~~~~~~ 303fcb1398fSOlivier Deprez 304*b5dd2422SOlivier DeprezSecure partitions are bundled as independent package files consisting 305fcb1398fSOlivier Deprezof: 306fcb1398fSOlivier Deprez 307fcb1398fSOlivier Deprez- a header 308fcb1398fSOlivier Deprez- a DTB 309fcb1398fSOlivier Deprez- an image payload 310fcb1398fSOlivier Deprez 311fcb1398fSOlivier DeprezThe header starts with a magic value and offset values to SP DTB and 312fcb1398fSOlivier Deprezimage payload. Each SP package is loaded independently by BL2 loader 313fcb1398fSOlivier Deprezand verified for authenticity and integrity. 314fcb1398fSOlivier Deprez 315*b5dd2422SOlivier DeprezThe SP package identified by its UUID (matching FF-A uuid property) is 316*b5dd2422SOlivier Deprezinserted as a single entry into the FIP at end of the TF-A build flow 317*b5dd2422SOlivier Deprezas shown: 318fcb1398fSOlivier Deprez 319fcb1398fSOlivier Deprez.. code:: shell 320fcb1398fSOlivier Deprez 321fcb1398fSOlivier Deprez Trusted Boot Firmware BL2: offset=0x1F0, size=0x8AE1, cmdline="--tb-fw" 322fcb1398fSOlivier Deprez EL3 Runtime Firmware BL31: offset=0x8CD1, size=0x13000, cmdline="--soc-fw" 323fcb1398fSOlivier Deprez Secure Payload BL32 (Trusted OS): offset=0x1BCD1, size=0x15270, cmdline="--tos-fw" 324fcb1398fSOlivier Deprez Non-Trusted Firmware BL33: offset=0x30F41, size=0x92E0, cmdline="--nt-fw" 325fcb1398fSOlivier Deprez HW_CONFIG: offset=0x3A221, size=0x2348, cmdline="--hw-config" 326fcb1398fSOlivier Deprez TB_FW_CONFIG: offset=0x3C569, size=0x37A, cmdline="--tb-fw-config" 327fcb1398fSOlivier Deprez SOC_FW_CONFIG: offset=0x3C8E3, size=0x48, cmdline="--soc-fw-config" 328fcb1398fSOlivier Deprez TOS_FW_CONFIG: offset=0x3C92B, size=0x427, cmdline="--tos-fw-config" 329fcb1398fSOlivier Deprez NT_FW_CONFIG: offset=0x3CD52, size=0x48, cmdline="--nt-fw-config" 330fcb1398fSOlivier Deprez B4B5671E-4A90-4FE1-B81F-FB13DAE1DACB: offset=0x3CD9A, size=0xC168, cmdline="--blob" 331fcb1398fSOlivier Deprez D1582309-F023-47B9-827C-4464F5578FC8: offset=0x48F02, size=0xC168, cmdline="--blob" 332fcb1398fSOlivier Deprez 333fcb1398fSOlivier Deprez.. uml:: ../resources/diagrams/plantuml/fip-secure-partitions.puml 334fcb1398fSOlivier Deprez 335*b5dd2422SOlivier DeprezDescribing secure partitions 336*b5dd2422SOlivier Deprez~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 337fcb1398fSOlivier Deprez 338*b5dd2422SOlivier DeprezA json-formatted description file is passed to the build flow specifying paths 339*b5dd2422SOlivier Deprezto the SP binary image and associated DTS partition manifest file. The latter 340*b5dd2422SOlivier Deprezis processed by the dtc compiler to generate a DTB fed into the SP package. 341*b5dd2422SOlivier DeprezThis file also specifies the SP owner (as an optional field) identifying the 342*b5dd2422SOlivier Deprezsigning domain in case of dual root CoT. 343*b5dd2422SOlivier DeprezThe SP owner can either be the silicon or the platform provider. The 344*b5dd2422SOlivier Deprezcorresponding "owner" field value can either take the value of "SiP" or "Plat". 345*b5dd2422SOlivier DeprezIn absence of "owner" field, it defaults to "SiP" owner. 346fcb1398fSOlivier Deprez 347fcb1398fSOlivier Deprez.. code:: shell 348fcb1398fSOlivier Deprez 349fcb1398fSOlivier Deprez { 350fcb1398fSOlivier Deprez "tee1" : { 351fcb1398fSOlivier Deprez "image": "tee1.bin", 3520901d339SManish Pandey "pm": "tee1.dts", 3530901d339SManish Pandey "owner": "SiP" 354fcb1398fSOlivier Deprez }, 355fcb1398fSOlivier Deprez 356fcb1398fSOlivier Deprez "tee2" : { 357fcb1398fSOlivier Deprez "image": "tee2.bin", 3580901d339SManish Pandey "pm": "tee2.dts", 3590901d339SManish Pandey "owner": "Plat" 360fcb1398fSOlivier Deprez } 361fcb1398fSOlivier Deprez } 362fcb1398fSOlivier Deprez 363fcb1398fSOlivier DeprezSPMC manifest 364fcb1398fSOlivier Deprez~~~~~~~~~~~~~ 365fcb1398fSOlivier Deprez 366*b5dd2422SOlivier DeprezThis manifest contains the SPMC *attribute* node consumed by the SPMD at boot 367*b5dd2422SOlivier Depreztime. It implements `[1]`_ (SP manifest at physical FF-A instance) and serves 368*b5dd2422SOlivier Depreztwo different cases: 369fcb1398fSOlivier Deprez 370*b5dd2422SOlivier Deprez- The SPMC resides at S-EL1: the SPMC manifest is used by the SPMD to setup a 371*b5dd2422SOlivier Deprez SP that co-resides with the SPMC and executes at S-EL1 or Secure Supervisor 372*b5dd2422SOlivier Deprez mode. 373*b5dd2422SOlivier Deprez- The SPMC resides at S-EL2: the SPMC manifest is used by the SPMD to setup 374*b5dd2422SOlivier Deprez the environment required by the SPMC to run at S-EL2. SPs run at S-EL1 or 375*b5dd2422SOlivier Deprez S-EL0. 376fcb1398fSOlivier Deprez 377fcb1398fSOlivier Deprez.. code:: shell 378fcb1398fSOlivier Deprez 379fcb1398fSOlivier Deprez attribute { 380fcb1398fSOlivier Deprez spmc_id = <0x8000>; 381fcb1398fSOlivier Deprez maj_ver = <0x1>; 382fcb1398fSOlivier Deprez min_ver = <0x0>; 383fcb1398fSOlivier Deprez exec_state = <0x0>; 384fcb1398fSOlivier Deprez load_address = <0x0 0x6000000>; 385fcb1398fSOlivier Deprez entrypoint = <0x0 0x6000000>; 386fcb1398fSOlivier Deprez binary_size = <0x60000>; 387fcb1398fSOlivier Deprez }; 388fcb1398fSOlivier Deprez 389fcb1398fSOlivier Deprez- *spmc_id* defines the endpoint ID value that SPMC can query through 390fcb1398fSOlivier Deprez ``FFA_ID_GET``. 391fcb1398fSOlivier Deprez- *maj_ver/min_ver*. SPMD checks provided version versus its internal 392fcb1398fSOlivier Deprez version and aborts if not matching. 393*b5dd2422SOlivier Deprez- *exec_state* defines the SPMC execution state (AArch64 or AArch32). 394*b5dd2422SOlivier Deprez Notice Hafnium used as a SPMC only supports AArch64. 395fcb1398fSOlivier Deprez- *load_address* and *binary_size* are mostly used to verify secondary 396fcb1398fSOlivier Deprez entry points fit into the loaded binary image. 397fcb1398fSOlivier Deprez- *entrypoint* defines the cold boot primary core entry point used by 398*b5dd2422SOlivier Deprez SPMD (currently matches ``BL32_BASE``) to enter the SPMC. 399fcb1398fSOlivier Deprez 400fcb1398fSOlivier DeprezOther nodes in the manifest are consumed by Hafnium in the secure world. 401fcb1398fSOlivier DeprezA sample can be found at [7]: 402fcb1398fSOlivier Deprez 403*b5dd2422SOlivier Deprez- The *hypervisor* node describes SPs. *is_ffa_partition* boolean attribute 404*b5dd2422SOlivier Deprez indicates a FF-A compliant SP. The *load_address* field specifies the load 405*b5dd2422SOlivier Deprez address at which TF-A loaded the SP package. 406*b5dd2422SOlivier Deprez- *cpus* node provide the platform topology and allows MPIDR to VMPIDR mapping. 407*b5dd2422SOlivier Deprez Note the primary core is declared first, then secondary core are declared 408*b5dd2422SOlivier Deprez in reverse order. 409*b5dd2422SOlivier Deprez- The *memory* node provides platform information on the ranges of memory 410*b5dd2422SOlivier Deprez available to the SPMC. 411fcb1398fSOlivier Deprez 412fcb1398fSOlivier DeprezSPMC boot 413fcb1398fSOlivier Deprez~~~~~~~~~ 414fcb1398fSOlivier Deprez 415fcb1398fSOlivier DeprezThe SPMC is loaded by BL2 as the BL32 image. 416fcb1398fSOlivier Deprez 417fcb1398fSOlivier DeprezThe SPMC manifest is loaded by BL2 as the ``TOS_FW_CONFIG`` image. 418fcb1398fSOlivier Deprez 419fcb1398fSOlivier DeprezBL2 passes the SPMC manifest address to BL31 through a register. 420fcb1398fSOlivier Deprez 421*b5dd2422SOlivier DeprezAt boot time, the SPMD in BL31 runs from the primary core, initializes the core 422*b5dd2422SOlivier Deprezcontexts and launches the SPMC (BL32) passing the SPMC manifest address through 423*b5dd2422SOlivier Depreza register. 424fcb1398fSOlivier Deprez 425fcb1398fSOlivier DeprezLoading of SPs 426fcb1398fSOlivier Deprez~~~~~~~~~~~~~~ 427fcb1398fSOlivier Deprez 428*b5dd2422SOlivier DeprezAt boot time, BL2 loads SPs sequentially in addition to the SPMC as depicted 429*b5dd2422SOlivier Deprezbelow: 430*b5dd2422SOlivier Deprez 431fcb1398fSOlivier Deprez.. uml:: ../resources/diagrams/plantuml/bl2-loading-sp.puml 432fcb1398fSOlivier Deprez 433*b5dd2422SOlivier DeprezNote this boot flow is an implementation sample on Arm's FVP platform. 434*b5dd2422SOlivier DeprezPlatforms not using TF-A's *Firmware CONFiguration* framework would adjust to a 435*b5dd2422SOlivier Deprezdifferent implementation. 436fcb1398fSOlivier Deprez 437fcb1398fSOlivier DeprezSecure boot 438fcb1398fSOlivier Deprez~~~~~~~~~~~ 439fcb1398fSOlivier Deprez 440fcb1398fSOlivier DeprezThe SP content certificate is inserted as a separate FIP item so that BL2 loads SPMC, 441*b5dd2422SOlivier DeprezSPMC manifest, secure partitions and verifies them for authenticity and integrity. 442fcb1398fSOlivier DeprezRefer to TBBR specification `[3]`_. 443fcb1398fSOlivier Deprez 444*b5dd2422SOlivier DeprezThe multiple-signing domain feature (in current state dual signing domain `[8]`_) allows 445*b5dd2422SOlivier Deprezthe use of two root keys namely S-ROTPK and NS-ROTPK: 446fcb1398fSOlivier Deprez 4470901d339SManish Pandey- SPMC (BL32) and SPMC manifest are signed by the SiP using the S-ROTPK. 448fcb1398fSOlivier Deprez- BL33 may be signed by the OEM using NS-ROTPK. 4490901d339SManish Pandey- An SP may be signed either by SiP (using S-ROTPK) or by OEM (using NS-ROTPK). 450fcb1398fSOlivier Deprez 451*b5dd2422SOlivier DeprezAlso refer to `Describing secure partitions`_ and `TF-A build options`_ sections. 452fcb1398fSOlivier Deprez 453fcb1398fSOlivier DeprezHafnium in the secure world 454fcb1398fSOlivier Deprez=========================== 455fcb1398fSOlivier Deprez 456fcb1398fSOlivier DeprezGeneral considerations 457fcb1398fSOlivier Deprez---------------------- 458fcb1398fSOlivier Deprez 459fcb1398fSOlivier DeprezBuild platform for the secure world 460fcb1398fSOlivier Deprez~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 461fcb1398fSOlivier Deprez 462*b5dd2422SOlivier DeprezIn the Hafnium reference implementation specific code parts are only relevant to 463*b5dd2422SOlivier Deprezthe secure world. Such portions are isolated in architecture specific files 464*b5dd2422SOlivier Deprezand/or enclosed by a ``SECURE_WORLD`` macro. 465fcb1398fSOlivier Deprez 466*b5dd2422SOlivier DeprezSecure partitions CPU scheduling 467fcb1398fSOlivier Deprez~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 468fcb1398fSOlivier Deprez 469*b5dd2422SOlivier DeprezThe FF-A v1.0 specification `[1]`_ provides two ways to relinquinsh CPU time to 470*b5dd2422SOlivier Deprezsecure partitions. For this a VM (Hypervisor or OS kernel), or SP invokes one of: 471fcb1398fSOlivier Deprez 472*b5dd2422SOlivier Deprez- the FFA_MSG_SEND_DIRECT_REQ interface. 473*b5dd2422SOlivier Deprez- the FFA_RUN interface. 474fcb1398fSOlivier Deprez 475fcb1398fSOlivier DeprezPlatform topology 476fcb1398fSOlivier Deprez~~~~~~~~~~~~~~~~~ 477fcb1398fSOlivier Deprez 478*b5dd2422SOlivier DeprezThe *execution-ctx-count* SP manifest field can take the value of one or the 479*b5dd2422SOlivier Depreztotal number of PEs. The FF-A v1.0 specification `[1]`_ recommends the 480fcb1398fSOlivier Deprezfollowing SP types: 481fcb1398fSOlivier Deprez 482*b5dd2422SOlivier Deprez- Pinned MP SPs: an execution context matches a physical PE. MP SPs must 483*b5dd2422SOlivier Deprez implement the same number of ECs as the number of PEs in the platform. 484*b5dd2422SOlivier Deprez- Migratable UP SPs: a single execution context can run and be migrated on any 485*b5dd2422SOlivier Deprez physical PE. Such SP declares a single EC in its SP manifest. An UP SP can 486*b5dd2422SOlivier Deprez receive a direct message request originating from any physical core targeting 487*b5dd2422SOlivier Deprez the single execution context. 488fcb1398fSOlivier Deprez 489fcb1398fSOlivier DeprezParsing SP partition manifests 490fcb1398fSOlivier Deprez------------------------------ 491fcb1398fSOlivier Deprez 492*b5dd2422SOlivier DeprezHafnium consumes SP manifests as defined in `[1]`_ and `SP manifests`_. 493*b5dd2422SOlivier DeprezNote the current implementation may not implement all optional fields. 494fcb1398fSOlivier Deprez 495*b5dd2422SOlivier DeprezThe SP manifest may contain memory and device regions nodes. In case of 496*b5dd2422SOlivier Deprezan S-EL2 SPMC: 497fcb1398fSOlivier Deprez 498*b5dd2422SOlivier Deprez- Memory regions are mapped in the SP EL1&0 Stage-2 translation regime at 499*b5dd2422SOlivier Deprez load time (or EL1&0 Stage-1 for an S-EL1 SPMC). A memory region node can 500*b5dd2422SOlivier Deprez specify RX/TX buffer regions in which case it is not necessary for an SP 501*b5dd2422SOlivier Deprez to explicitly invoke the ``FFA_RXTX_MAP`` interface. 502*b5dd2422SOlivier Deprez- Device regions are mapped in the SP EL1&0 Stage-2 translation regime (or 503*b5dd2422SOlivier Deprez EL1&0 Stage-1 for an S-EL1 SPMC) as peripherals and possibly allocate 504*b5dd2422SOlivier Deprez additional resources (e.g. interrupts). 505fcb1398fSOlivier Deprez 506*b5dd2422SOlivier DeprezFor the S-EL2 SPMC, base addresses for memory and device region nodes are IPAs 507*b5dd2422SOlivier Deprezprovided the SPMC identity maps IPAs to PAs within SP EL1&0 Stage-2 translation 508*b5dd2422SOlivier Deprezregime. 509fcb1398fSOlivier Deprez 510*b5dd2422SOlivier DeprezNote: in the current implementation both VTTBR_EL2 and VSTTBR_EL2 point to the 511*b5dd2422SOlivier Deprezsame set of page tables. It is still open whether two sets of page tables shall 512*b5dd2422SOlivier Deprezbe provided per SP. The memory region node as defined in the specification 513fcb1398fSOlivier Deprezprovides a memory security attribute hinting to map either to the secure or 514*b5dd2422SOlivier Depreznon-secure EL1&0 Stage-2 table if it exists. 515fcb1398fSOlivier Deprez 516fcb1398fSOlivier DeprezPassing boot data to the SP 517fcb1398fSOlivier Deprez--------------------------- 518fcb1398fSOlivier Deprez 519*b5dd2422SOlivier DeprezIn `[1]`_ , the "Protocol for passing data" section defines a method for passing 520*b5dd2422SOlivier Deprezboot data to SPs (not currently implemented). 521fcb1398fSOlivier Deprez 522*b5dd2422SOlivier DeprezProvided that the whole secure partition package image (see 523*b5dd2422SOlivier Deprez`Secure Partition packages`_) is mapped to the SP secure EL1&0 Stage-2 524*b5dd2422SOlivier Depreztranslation regime, an SP can access its own manifest DTB blob and extract its 525*b5dd2422SOlivier Deprezpartition manifest properties. 526fcb1398fSOlivier Deprez 527fcb1398fSOlivier DeprezSP Boot order 528fcb1398fSOlivier Deprez------------- 529fcb1398fSOlivier Deprez 530fcb1398fSOlivier DeprezSP manifests provide an optional boot order attribute meant to resolve 531fcb1398fSOlivier Deprezdependencies such as an SP providing a service required to properly boot 532fcb1398fSOlivier Deprezanother SP. 533fcb1398fSOlivier Deprez 534*b5dd2422SOlivier DeprezIt is possible for an SP to call into another SP through a direct request 535*b5dd2422SOlivier Deprezprovided the latter SP has already been booted. 536*b5dd2422SOlivier Deprez 537fcb1398fSOlivier DeprezBoot phases 538fcb1398fSOlivier Deprez----------- 539fcb1398fSOlivier Deprez 540fcb1398fSOlivier DeprezPrimary core boot-up 541fcb1398fSOlivier Deprez~~~~~~~~~~~~~~~~~~~~ 542fcb1398fSOlivier Deprez 543*b5dd2422SOlivier DeprezUpon boot-up, BL31 hands over to the SPMC (BL32) on the primary boot physical 544*b5dd2422SOlivier Deprezcore. The SPMC performs its platform initializations and registers the SPMC 545*b5dd2422SOlivier Deprezsecondary physical core entry point physical address by the use of the 546*b5dd2422SOlivier DeprezFFA_SECONDARY_EP_REGISTER interface (SMC invocation from the SPMC to the SPMD 547*b5dd2422SOlivier Deprezat secure physical FF-A instance). This interface is implementation-defined in 548*b5dd2422SOlivier Deprezcontext of FF-A v1.0. 549fcb1398fSOlivier Deprez 550*b5dd2422SOlivier DeprezThe SPMC then creates secure partitions based on SP packages and manifests. Each 551*b5dd2422SOlivier Deprezsecure partition is launched in sequence (`SP Boot order`_) on their "primary" 552*b5dd2422SOlivier Deprezexecution context. If the primary boot physical core linear id is N, an MP SP is 553*b5dd2422SOlivier Deprezstarted using EC[N] on PE[N] (see `Platform topology`_). If the partition is a 554*b5dd2422SOlivier DeprezUP SP, it is started using its unique EC0 on PE[N]. 555fcb1398fSOlivier Deprez 556*b5dd2422SOlivier DeprezThe SP primary EC (or the EC used when the partition is booted as described 557*b5dd2422SOlivier Deprezabove): 558fcb1398fSOlivier Deprez 559*b5dd2422SOlivier Deprez- Performs the overall SP boot time initialization, and in case of a MP SP, 560*b5dd2422SOlivier Deprez prepares the SP environment for other execution contexts. 561*b5dd2422SOlivier Deprez- In the case of a MP SP, it invokes the FFA_SECONDARY_EP_REGISTER at secure 562*b5dd2422SOlivier Deprez virtual FF-A instance (SMC invocation from SP to SPMC) to provide the IPA 563*b5dd2422SOlivier Deprez entry point for other execution contexts. 564*b5dd2422SOlivier Deprez- Exits through ``FFA_MSG_WAIT`` to indicate successful initialization or 565*b5dd2422SOlivier Deprez ``FFA_ERROR`` in case of failure. 566fcb1398fSOlivier Deprez 567*b5dd2422SOlivier DeprezSecondary cores boot-up 568*b5dd2422SOlivier Deprez~~~~~~~~~~~~~~~~~~~~~~~ 569fcb1398fSOlivier Deprez 570*b5dd2422SOlivier DeprezOnce the system is started and NWd brought up, a secondary physical core is 571*b5dd2422SOlivier Deprezwoken up by the ``PSCI_CPU_ON`` service invocation. The TF-A SPD hook mechanism 572*b5dd2422SOlivier Deprezcalls into the SPMD on the newly woken up physical core. Then the SPMC is 573*b5dd2422SOlivier Deprezentered at the secondary physical core entry point. 574fcb1398fSOlivier Deprez 575*b5dd2422SOlivier DeprezIn the current implementation, the first SP is resumed on the coresponding EC 576*b5dd2422SOlivier Deprez(the virtual CPU which matches the physical core). The implication is that the 577*b5dd2422SOlivier Deprezfirst SP must be a MP SP. 578fcb1398fSOlivier Deprez 579*b5dd2422SOlivier DeprezIn a linux based system, once secure and normal worlds are booted but prior to 580*b5dd2422SOlivier Depreza NWd FF-A driver has been loaded: 581fcb1398fSOlivier Deprez 582*b5dd2422SOlivier Deprez- The first SP has initialized all its ECs in response to primary core boot up 583*b5dd2422SOlivier Deprez (at system initialization) and secondary core boot up (as a result of linux 584*b5dd2422SOlivier Deprez invoking PSCI_CPU_ON for all secondary cores). 585*b5dd2422SOlivier Deprez- Other SPs have their first execution context initialized as a result of secure 586*b5dd2422SOlivier Deprez world initialization on the primary boot core. Other ECs for those SPs have to 587*b5dd2422SOlivier Deprez be run first through ffa_run to complete their initialization (which results 588*b5dd2422SOlivier Deprez in the EC completing with FFA_MSG_WAIT). 589fcb1398fSOlivier Deprez 590*b5dd2422SOlivier DeprezRefer to `Power management`_ for further details. 591fcb1398fSOlivier Deprez 592fcb1398fSOlivier DeprezMandatory interfaces 593fcb1398fSOlivier Deprez-------------------- 594fcb1398fSOlivier Deprez 595*b5dd2422SOlivier DeprezThe following interfaces are exposed to SPs: 596fcb1398fSOlivier Deprez 597fcb1398fSOlivier Deprez- ``FFA_VERSION`` 598fcb1398fSOlivier Deprez- ``FFA_FEATURES`` 599fcb1398fSOlivier Deprez- ``FFA_RX_RELEASE`` 600fcb1398fSOlivier Deprez- ``FFA_RXTX_MAP`` 601*b5dd2422SOlivier Deprez- ``FFA_RXTX_UNMAP`` (not implemented) 602fcb1398fSOlivier Deprez- ``FFA_PARTITION_INFO_GET`` 603fcb1398fSOlivier Deprez- ``FFA_ID_GET`` 604*b5dd2422SOlivier Deprez- ``FFA_MSG_WAIT`` 605*b5dd2422SOlivier Deprez- ``FFA_MSG_SEND_DIRECT_REQ`` 606*b5dd2422SOlivier Deprez- ``FFA_MSG_SEND_DIRECT_RESP`` 607*b5dd2422SOlivier Deprez- ``FFA_MEM_DONATE`` 608*b5dd2422SOlivier Deprez- ``FFA_MEM_LEND`` 609*b5dd2422SOlivier Deprez- ``FFA_MEM_SHARE`` 610*b5dd2422SOlivier Deprez- ``FFA_MEM_RETRIEVE_REQ`` 611*b5dd2422SOlivier Deprez- ``FFA_MEM_RETRIEVE_RESP`` 612*b5dd2422SOlivier Deprez- ``FFA_MEM_RELINQUISH`` 613*b5dd2422SOlivier Deprez- ``FFA_MEM_RECLAIM`` 614*b5dd2422SOlivier Deprez- ``FFA_SECONDARY_EP_REGISTER`` 615fcb1398fSOlivier Deprez 616fcb1398fSOlivier DeprezFFA_VERSION 617fcb1398fSOlivier Deprez~~~~~~~~~~~ 618fcb1398fSOlivier Deprez 619*b5dd2422SOlivier Deprez``FFA_VERSION`` requires a *requested_version* parameter from the caller. 620*b5dd2422SOlivier DeprezThe returned value depends on the caller: 621fcb1398fSOlivier Deprez 622*b5dd2422SOlivier Deprez- Hypervisor or OS kernel in NS-EL1/EL2: the SPMD returns the SPMC version 623*b5dd2422SOlivier Deprez specified in the SPMC manifest. 624*b5dd2422SOlivier Deprez- SP: the SPMC returns its own implemented version. 625*b5dd2422SOlivier Deprez- SPMC at S-EL1/S-EL2: the SPMD returns its own implemented version. 626fcb1398fSOlivier Deprez 627fcb1398fSOlivier DeprezFFA_FEATURES 628fcb1398fSOlivier Deprez~~~~~~~~~~~~ 629fcb1398fSOlivier Deprez 630*b5dd2422SOlivier DeprezFF-A features supported by the SPMC may be discovered by secure partitions at 631*b5dd2422SOlivier Deprezboot (that is prior to NWd is booted) or run-time. 632fcb1398fSOlivier Deprez 633*b5dd2422SOlivier DeprezThe SPMC calling FFA_FEATURES at secure physical FF-A instance always get 634*b5dd2422SOlivier DeprezFFA_SUCCESS from the SPMD. 635*b5dd2422SOlivier Deprez 636*b5dd2422SOlivier DeprezThe request made by an Hypervisor or OS kernel is forwarded to the SPMC and 637*b5dd2422SOlivier Deprezthe response relayed back to the NWd. 638fcb1398fSOlivier Deprez 639fcb1398fSOlivier DeprezFFA_RXTX_MAP/FFA_RXTX_UNMAP 640fcb1398fSOlivier Deprez~~~~~~~~~~~~~~~~~~~~~~~~~~~ 641fcb1398fSOlivier Deprez 642*b5dd2422SOlivier DeprezWhen invoked from a secure partition FFA_RXTX_MAP maps the provided send and 643*b5dd2422SOlivier Deprezreceive buffers described by their IPAs to the SP EL1&0 Stage-2 translation 644*b5dd2422SOlivier Deprezregime as secure buffers in the MMU descriptors. 645fcb1398fSOlivier Deprez 646*b5dd2422SOlivier DeprezWhen invoked from the Hypervisor or OS kernel, the buffers are mapped into the 647*b5dd2422SOlivier DeprezSPMC EL2 Stage-1 translation regime and marked as NS buffers in the MMU 648*b5dd2422SOlivier Deprezdescriptors. 649*b5dd2422SOlivier Deprez 650*b5dd2422SOlivier DeprezNote: 651*b5dd2422SOlivier Deprez 652*b5dd2422SOlivier Deprez- FFA_RXTX_UNMAP is not implemented. 653fcb1398fSOlivier Deprez 654fcb1398fSOlivier DeprezFFA_PARTITION_INFO_GET 655fcb1398fSOlivier Deprez~~~~~~~~~~~~~~~~~~~~~~ 656fcb1398fSOlivier Deprez 657*b5dd2422SOlivier DeprezPartition info get call can originate: 658fcb1398fSOlivier Deprez 659*b5dd2422SOlivier Deprez- from SP to SPMC 660*b5dd2422SOlivier Deprez- from Hypervisor or OS kernel to SPMC. The request is relayed by the SPMD. 661fcb1398fSOlivier Deprez 662fcb1398fSOlivier DeprezFFA_ID_GET 663fcb1398fSOlivier Deprez~~~~~~~~~~ 664fcb1398fSOlivier Deprez 665*b5dd2422SOlivier DeprezThe FF-A id space is split into a non-secure space and secure space: 666*b5dd2422SOlivier Deprez 667*b5dd2422SOlivier Deprez- FF-A ID with bit 15 clear relates to VMs. 668*b5dd2422SOlivier Deprez- FF-A ID with bit 15 set related to SPs. 669*b5dd2422SOlivier Deprez- FF-A IDs 0, 0xffff, 0x8000 are assigned respectively to the Hypervisor, SPMD 670*b5dd2422SOlivier Deprez and SPMC. 671*b5dd2422SOlivier Deprez 672fcb1398fSOlivier DeprezThe SPMD returns: 673fcb1398fSOlivier Deprez 674*b5dd2422SOlivier Deprez- The default zero value on invocation from the Hypervisor. 675fcb1398fSOlivier Deprez- The ``spmc_id`` value specified in the SPMC manifest on invocation from 676fcb1398fSOlivier Deprez the SPMC (see `SPMC manifest`_) 677fcb1398fSOlivier Deprez 678*b5dd2422SOlivier DeprezThis convention helps the SPMC to determine the origin and destination worlds in 679*b5dd2422SOlivier Deprezan FF-A ABI invocation. In particular the SPMC shall filter unauthorized 680fcb1398fSOlivier Depreztransactions in its world switch routine. It must not be permitted for a VM to 681*b5dd2422SOlivier Deprezuse a secure FF-A ID as origin world by spoofing: 682fcb1398fSOlivier Deprez 683*b5dd2422SOlivier Deprez- A VM-to-SP direct request/response shall set the origin world to be non-secure 684*b5dd2422SOlivier Deprez (FF-A ID bit 15 clear) and destination world to be secure (FF-A ID bit 15 685fcb1398fSOlivier Deprez set). 686*b5dd2422SOlivier Deprez- Similarly, an SP-to-SP direct request/response shall set the FF-A ID bit 15 687*b5dd2422SOlivier Deprez for both origin and destination IDs. 688fcb1398fSOlivier Deprez 689fcb1398fSOlivier DeprezAn incoming direct message request arriving at SPMD from NWd is forwarded to 690fcb1398fSOlivier DeprezSPMC without a specific check. The SPMC is resumed through eret and "knows" the 691fcb1398fSOlivier Deprezmessage is coming from normal world in this specific code path. Thus the origin 692*b5dd2422SOlivier Deprezendpoint ID must be checked by SPMC for being a normal world ID. 693fcb1398fSOlivier Deprez 694fcb1398fSOlivier DeprezAn SP sending a direct message request must have bit 15 set in its origin 695*b5dd2422SOlivier Deprezendpoint ID and this can be checked by the SPMC when the SP invokes the ABI. 696fcb1398fSOlivier Deprez 697fcb1398fSOlivier DeprezThe SPMC shall reject the direct message if the claimed world in origin endpoint 698*b5dd2422SOlivier DeprezID is not consistent: 699fcb1398fSOlivier Deprez 700*b5dd2422SOlivier Deprez- It is either forwarded by SPMD and thus origin endpoint ID must be a "normal 701*b5dd2422SOlivier Deprez world ID", 702*b5dd2422SOlivier Deprez- or initiated by an SP and thus origin endpoint ID must be a "secure world ID". 703fcb1398fSOlivier Deprez 704fcb1398fSOlivier Deprez 705*b5dd2422SOlivier DeprezFFA_MSG_SEND_DIRECT_REQ/FFA_MSG_SEND_DIRECT_RESP 706*b5dd2422SOlivier Deprez~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 707fcb1398fSOlivier Deprez 708*b5dd2422SOlivier DeprezThis is a mandatory interface for secure partitions consisting in direct request 709*b5dd2422SOlivier Deprezand responses with the following rules: 710fcb1398fSOlivier Deprez 711*b5dd2422SOlivier Deprez- An SP can send a direct request to another SP. 712*b5dd2422SOlivier Deprez- An SP can receive a direct request from another SP. 713*b5dd2422SOlivier Deprez- An SP can send a direct response to another SP. 714*b5dd2422SOlivier Deprez- An SP cannot send a direct request to an Hypervisor or OS kernel. 715*b5dd2422SOlivier Deprez- An Hypervisor or OS kernel can send a direct request to an SP. 716*b5dd2422SOlivier Deprez- An SP can send a direct response to an Hypervisor or OS kernel. 717fcb1398fSOlivier Deprez 718*b5dd2422SOlivier DeprezSPMC-SPMD direct requests/responses 719*b5dd2422SOlivier Deprez----------------------------------- 720fcb1398fSOlivier Deprez 721*b5dd2422SOlivier DeprezImplementation-defined FF-A IDs are allocated to the SPMC and SPMD. 722*b5dd2422SOlivier DeprezUsing those IDs in source/destination fields of a direct request/response 723*b5dd2422SOlivier Deprezpermits SPMD to SPMC communication and either way. 724fcb1398fSOlivier Deprez 725*b5dd2422SOlivier Deprez- SPMC to SPMD direct request/response uses SMC conduit. 726*b5dd2422SOlivier Deprez- SPMD to SPMC direct request/response uses ERET conduit. 727fcb1398fSOlivier Deprez 728*b5dd2422SOlivier DeprezPE MMU configuration 729*b5dd2422SOlivier Deprez-------------------- 730fcb1398fSOlivier Deprez 731*b5dd2422SOlivier DeprezWith secure virtualization enabled, two IPA spaces are output from the secure 732*b5dd2422SOlivier DeprezEL1&0 Stage-1 translation (secure and non-secure). The EL1&0 Stage-2 translation 733*b5dd2422SOlivier Deprezhardware is fed by: 734fcb1398fSOlivier Deprez 735*b5dd2422SOlivier Deprez- A single secure IPA space when the SP EL1&0 Stage-1 MMU is disabled. 736*b5dd2422SOlivier Deprez- Two IPA spaces (secure and non-secure) when the SP EL1&0 Stage-1 MMU is 737*b5dd2422SOlivier Deprez enabled. 738fcb1398fSOlivier Deprez 739*b5dd2422SOlivier Deprez``VTCR_EL2`` and ``VSTCR_EL2`` provide configuration bits for controlling the 740*b5dd2422SOlivier DeprezNS/S IPA translations. 741*b5dd2422SOlivier Deprez``VSTCR_EL2.SW`` = 0, ``VSTCR_EL2.SA`` = 0,``VTCR_EL2.NSW`` = 0, ``VTCR_EL2.NSA`` = 1: 742fcb1398fSOlivier Deprez 743*b5dd2422SOlivier Deprez- Stage-2 translations for the NS IPA space access the NS PA space. 744*b5dd2422SOlivier Deprez- Stage-2 translation table walks for the NS IPA space are to the secure PA space. 745fcb1398fSOlivier Deprez 746*b5dd2422SOlivier DeprezSecure and non-secure IPA regions use the same set of Stage-2 page tables within 747*b5dd2422SOlivier Depreza SP. 748fcb1398fSOlivier Deprez 749fcb1398fSOlivier DeprezInterrupt management 750fcb1398fSOlivier Deprez-------------------- 751fcb1398fSOlivier Deprez 752*b5dd2422SOlivier DeprezGIC ownership 753*b5dd2422SOlivier Deprez~~~~~~~~~~~~~ 754fcb1398fSOlivier Deprez 755*b5dd2422SOlivier DeprezThe SPMC owns the GIC configuration. Secure and non-secure interrupts are 756*b5dd2422SOlivier Depreztrapped at S-EL2. The SPMC manages interrupt resources and allocates interrupt 757*b5dd2422SOlivier DeprezIDs based on SP manifests. The SPMC acknowledges physical interrupts and injects 758*b5dd2422SOlivier Deprezvirtual interrupts by setting the use of vIRQ/vFIQ bits before resuming a SP. 759fcb1398fSOlivier Deprez 760*b5dd2422SOlivier DeprezNon-secure interrupt handling 761*b5dd2422SOlivier Deprez~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 762fcb1398fSOlivier Deprez 763*b5dd2422SOlivier DeprezThe following illustrate the scenarios of non secure physical interrupts trapped 764*b5dd2422SOlivier Deprezby the SPMC: 765fcb1398fSOlivier Deprez 766*b5dd2422SOlivier Deprez- The SP handles a managed exit operation: 767*b5dd2422SOlivier Deprez 768*b5dd2422SOlivier Deprez.. image:: ../resources/diagrams/ffa-ns-interrupt-handling-managed-exit.png 769*b5dd2422SOlivier Deprez 770*b5dd2422SOlivier Deprez- The SP is pre-empted without managed exit: 771*b5dd2422SOlivier Deprez 772*b5dd2422SOlivier Deprez.. image:: ../resources/diagrams/ffa-ns-interrupt-handling-sp-preemption.png 773*b5dd2422SOlivier Deprez 774*b5dd2422SOlivier DeprezSecure interrupt handling 775*b5dd2422SOlivier Deprez~~~~~~~~~~~~~~~~~~~~~~~~~ 776*b5dd2422SOlivier Deprez 777*b5dd2422SOlivier DeprezThe current implementation does not support handling of secure interrupts 778*b5dd2422SOlivier Depreztrapped by the SPMC at S-EL2. This is work in progress planned for future 779*b5dd2422SOlivier Deprezreleases. 780fcb1398fSOlivier Deprez 781fcb1398fSOlivier DeprezPower management 782fcb1398fSOlivier Deprez---------------- 783fcb1398fSOlivier Deprez 784*b5dd2422SOlivier DeprezIn platforms with or without secure virtualization: 785fcb1398fSOlivier Deprez 786*b5dd2422SOlivier Deprez- The NWd owns the platform PM policy. 787*b5dd2422SOlivier Deprez- The Hypervisor or OS kernel is the component initiating PSCI service calls. 788*b5dd2422SOlivier Deprez- The EL3 PSCI library is in charge of the PM coordination and control 789*b5dd2422SOlivier Deprez (eventually writing to platform registers). 790*b5dd2422SOlivier Deprez- While coordinating PM events, the PSCI library calls backs into the Secure 791*b5dd2422SOlivier Deprez Payload Dispatcher for events the latter has statically registered to. 792fcb1398fSOlivier Deprez 793*b5dd2422SOlivier DeprezWhen using the SPMD as a Secure Payload Dispatcher: 794fcb1398fSOlivier Deprez 795*b5dd2422SOlivier Deprez- A power management event is relayed through the SPD hook to the SPMC. 796*b5dd2422SOlivier Deprez- In the current implementation only cpu on (svc_on_finish) and cpu off 797*b5dd2422SOlivier Deprez (svc_off) hooks are registered. 798*b5dd2422SOlivier Deprez- The behavior for the cpu on event is described in `Secondary cores boot-up`_. 799*b5dd2422SOlivier Deprez The SPMC is entered through its secondary physical core entry point. 800*b5dd2422SOlivier Deprez- The cpu off event occurs when the NWd calls PSCI_CPU_OFF. The method by which 801*b5dd2422SOlivier Deprez the PM event is conveyed to the SPMC is implementation-defined in context of 802*b5dd2422SOlivier Deprez FF-A v1.0 (`SPMC-SPMD direct requests/responses`_). It consists in a SPMD-to-SPMC 803*b5dd2422SOlivier Deprez direct request/response conveying the PM event details and SPMC response. 804*b5dd2422SOlivier Deprez The SPMD performs a synchronous entry into the SPMC. The SPMC is entered and 805*b5dd2422SOlivier Deprez updates its internal state to reflect the physical core is being turned off. 806*b5dd2422SOlivier Deprez In the current implementation no SP is resumed as a consequence. This behavior 807*b5dd2422SOlivier Deprez ensures a minimal support for CPU hotplug e.g. when initiated by the NWd linux 808*b5dd2422SOlivier Deprez userspace. 809fcb1398fSOlivier Deprez 810*b5dd2422SOlivier DeprezSMMUv3 support in Hafnium 811*b5dd2422SOlivier Deprez========================= 8124ec3ccb4SMadhukar Pappireddy 8134ec3ccb4SMadhukar PappireddyAn SMMU is analogous to an MMU in a CPU. It performs address translations for 8144ec3ccb4SMadhukar PappireddyDirect Memory Access (DMA) requests from system I/O devices. 8154ec3ccb4SMadhukar PappireddyThe responsibilities of an SMMU include: 8164ec3ccb4SMadhukar Pappireddy 8174ec3ccb4SMadhukar Pappireddy- Translation: Incoming DMA requests are translated from bus address space to 8184ec3ccb4SMadhukar Pappireddy system physical address space using translation tables compliant to 8194ec3ccb4SMadhukar Pappireddy Armv8/Armv7 VMSA descriptor format. 8204ec3ccb4SMadhukar Pappireddy- Protection: An I/O device can be prohibited from read, write access to a 8214ec3ccb4SMadhukar Pappireddy memory region or allowed. 8224ec3ccb4SMadhukar Pappireddy- Isolation: Traffic from each individial device can be independently managed. 8234ec3ccb4SMadhukar Pappireddy The devices are differentiated from each other using unique translation 8244ec3ccb4SMadhukar Pappireddy tables. 8254ec3ccb4SMadhukar Pappireddy 8264ec3ccb4SMadhukar PappireddyThe following diagram illustrates a typical SMMU IP integrated in a SoC with 8274ec3ccb4SMadhukar Pappireddyseveral I/O devices along with Interconnect and Memory system. 8284ec3ccb4SMadhukar Pappireddy 8294ec3ccb4SMadhukar Pappireddy.. image:: ../resources/diagrams/MMU-600.png 8304ec3ccb4SMadhukar Pappireddy 8314ec3ccb4SMadhukar PappireddySMMU has several versions including SMMUv1, SMMUv2 and SMMUv3. Hafnium provides 832*b5dd2422SOlivier Deprezsupport for SMMUv3 driver in both normal and secure world. A brief introduction 8334ec3ccb4SMadhukar Pappireddyof SMMUv3 functionality and the corresponding software support in Hafnium is 8344ec3ccb4SMadhukar Pappireddyprovided here. 8354ec3ccb4SMadhukar Pappireddy 8364ec3ccb4SMadhukar PappireddySMMUv3 features 8374ec3ccb4SMadhukar Pappireddy--------------- 8384ec3ccb4SMadhukar Pappireddy 8394ec3ccb4SMadhukar Pappireddy- SMMUv3 provides Stage1, Stage2 translation as well as nested (Stage1 + Stage2) 8404ec3ccb4SMadhukar Pappireddy translation support. It can either bypass or abort incoming translations as 8414ec3ccb4SMadhukar Pappireddy well. 8424ec3ccb4SMadhukar Pappireddy- Traffic (memory transactions) from each upstream I/O peripheral device, 8434ec3ccb4SMadhukar Pappireddy referred to as Stream, can be independently managed using a combination of 8444ec3ccb4SMadhukar Pappireddy several memory based configuration structures. This allows the SMMUv3 to 8454ec3ccb4SMadhukar Pappireddy support a large number of streams with each stream assigned to a unique 8464ec3ccb4SMadhukar Pappireddy translation context. 8474ec3ccb4SMadhukar Pappireddy- Support for Armv8.1 VMSA where the SMMU shares the translation tables with 8484ec3ccb4SMadhukar Pappireddy a Processing Element. AArch32(LPAE) and AArch64 translation table format 8494ec3ccb4SMadhukar Pappireddy are supported by SMMUv3. 8504ec3ccb4SMadhukar Pappireddy- SMMUv3 offers non-secure stream support with secure stream support being 8514ec3ccb4SMadhukar Pappireddy optional. Logically, SMMUv3 behaves as if there is an indepdendent SMMU 8524ec3ccb4SMadhukar Pappireddy instance for secure and non-secure stream support. 8534ec3ccb4SMadhukar Pappireddy- It also supports sub-streams to differentiate traffic from a virtualized 8544ec3ccb4SMadhukar Pappireddy peripheral associated with a VM/SP. 8554ec3ccb4SMadhukar Pappireddy- Additionally, SMMUv3.2 provides support for PEs implementing Armv8.4-A 8564ec3ccb4SMadhukar Pappireddy extensions. Consequently, SPM depends on Secure EL2 support in SMMUv3.2 8574ec3ccb4SMadhukar Pappireddy for providing Secure Stage2 translation support to upstream peripheral 8584ec3ccb4SMadhukar Pappireddy devices. 8594ec3ccb4SMadhukar Pappireddy 8604ec3ccb4SMadhukar PappireddySMMUv3 Programming Interfaces 8614ec3ccb4SMadhukar Pappireddy----------------------------- 8624ec3ccb4SMadhukar Pappireddy 8634ec3ccb4SMadhukar PappireddySMMUv3 has three software interfaces that are used by the Hafnium driver to 8644ec3ccb4SMadhukar Pappireddyconfigure the behaviour of SMMUv3 and manage the streams. 8654ec3ccb4SMadhukar Pappireddy 8664ec3ccb4SMadhukar Pappireddy- Memory based data strutures that provide unique translation context for 8674ec3ccb4SMadhukar Pappireddy each stream. 8684ec3ccb4SMadhukar Pappireddy- Memory based circular buffers for command queue and event queue. 8694ec3ccb4SMadhukar Pappireddy- A large number of SMMU configuration registers that are memory mapped during 8704ec3ccb4SMadhukar Pappireddy boot time by Hafnium driver. Except a few registers, all configuration 8714ec3ccb4SMadhukar Pappireddy registers have independent secure and non-secure versions to configure the 8724ec3ccb4SMadhukar Pappireddy behaviour of SMMUv3 for translation of secure and non-secure streams 8734ec3ccb4SMadhukar Pappireddy respectively. 8744ec3ccb4SMadhukar Pappireddy 8754ec3ccb4SMadhukar PappireddyPeripheral device manifest 8764ec3ccb4SMadhukar Pappireddy-------------------------- 8774ec3ccb4SMadhukar Pappireddy 8784ec3ccb4SMadhukar PappireddyCurrently, SMMUv3 driver in Hafnium only supports dependent peripheral devices. 8794ec3ccb4SMadhukar PappireddyThese devices are dependent on PE endpoint to initiate and receive memory 8804ec3ccb4SMadhukar Pappireddymanagement transactions on their behalf. The acccess to the MMIO regions of 8814ec3ccb4SMadhukar Pappireddyany such device is assigned to the endpoint during boot. Moreover, SMMUv3 driver 8824ec3ccb4SMadhukar Pappireddyuses the same stage 2 translations for the device as those used by partition 8834ec3ccb4SMadhukar Pappireddymanager on behalf of the PE endpoint. This ensures that the peripheral device 8844ec3ccb4SMadhukar Pappireddyhas the same visibility of the physical address space as the endpoint. The 8854ec3ccb4SMadhukar Pappireddydevice node of the corresponding partition manifest (refer to `[1]`_ section 3.2 8864ec3ccb4SMadhukar Pappireddy) must specify these additional properties for each peripheral device in the 8874ec3ccb4SMadhukar Pappireddysystem : 8884ec3ccb4SMadhukar Pappireddy 8894ec3ccb4SMadhukar Pappireddy- smmu-id: This field helps to identify the SMMU instance that this device is 8904ec3ccb4SMadhukar Pappireddy upstream of. 8914ec3ccb4SMadhukar Pappireddy- stream-ids: List of stream IDs assigned to this device. 8924ec3ccb4SMadhukar Pappireddy 8934ec3ccb4SMadhukar Pappireddy.. code:: shell 8944ec3ccb4SMadhukar Pappireddy 8954ec3ccb4SMadhukar Pappireddy smmuv3-testengine { 8964ec3ccb4SMadhukar Pappireddy base-address = <0x00000000 0x2bfe0000>; 8974ec3ccb4SMadhukar Pappireddy pages-count = <32>; 8984ec3ccb4SMadhukar Pappireddy attributes = <0x3>; 8994ec3ccb4SMadhukar Pappireddy smmu-id = <0>; 9004ec3ccb4SMadhukar Pappireddy stream-ids = <0x0 0x1>; 9014ec3ccb4SMadhukar Pappireddy interrupts = <0x2 0x3>, <0x4 0x5>; 9024ec3ccb4SMadhukar Pappireddy exclusive-access; 9034ec3ccb4SMadhukar Pappireddy }; 9044ec3ccb4SMadhukar Pappireddy 9054ec3ccb4SMadhukar PappireddySMMUv3 driver limitations 9064ec3ccb4SMadhukar Pappireddy------------------------- 9074ec3ccb4SMadhukar Pappireddy 9084ec3ccb4SMadhukar PappireddyThe primary design goal for the Hafnium SMMU driver is to support secure 9094ec3ccb4SMadhukar Pappireddystreams. 9104ec3ccb4SMadhukar Pappireddy 9114ec3ccb4SMadhukar Pappireddy- Currently, the driver only supports Stage2 translations. No support for 9124ec3ccb4SMadhukar Pappireddy Stage1 or nested translations. 9134ec3ccb4SMadhukar Pappireddy- Supports only AArch64 translation format. 9144ec3ccb4SMadhukar Pappireddy- No support for features such as PCI Express (PASIDs, ATS, PRI), MSI, RAS, 9154ec3ccb4SMadhukar Pappireddy Fault handling, Performance Monitor Extensions, Event Handling, MPAM. 9164ec3ccb4SMadhukar Pappireddy- No support for independent peripheral devices. 9174ec3ccb4SMadhukar Pappireddy 918fcb1398fSOlivier DeprezReferences 919fcb1398fSOlivier Deprez========== 920fcb1398fSOlivier Deprez 921fcb1398fSOlivier Deprez.. _[1]: 922fcb1398fSOlivier Deprez 9231b17f4f1SOlivier Deprez[1] `Arm Firmware Framework for Armv8-A <https://developer.arm.com/docs/den0077/latest>`__ 924fcb1398fSOlivier Deprez 925fcb1398fSOlivier Deprez.. _[2]: 926fcb1398fSOlivier Deprez 9276844c347SMadhukar Pappireddy[2] :ref:`Secure Partition Manager using MM interface<Secure Partition Manager (MM)>` 928fcb1398fSOlivier Deprez 929fcb1398fSOlivier Deprez.. _[3]: 930fcb1398fSOlivier Deprez 931fcb1398fSOlivier Deprez[3] `Trusted Boot Board Requirements 932*b5dd2422SOlivier DeprezClient <https://developer.arm.com/documentation/den0006/d/>`__ 933fcb1398fSOlivier Deprez 934fcb1398fSOlivier Deprez.. _[4]: 935fcb1398fSOlivier Deprez 936fcb1398fSOlivier Deprez[4] https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/lib/el3_runtime/aarch64/context.S#n45 937fcb1398fSOlivier Deprez 938fcb1398fSOlivier Deprez.. _[5]: 939fcb1398fSOlivier Deprez 940*b5dd2422SOlivier Deprez[5] https://git.trustedfirmware.org/TF-A/tf-a-tests.git/tree/spm/cactus/plat/arm/fvp/fdts/cactus.dts 941fcb1398fSOlivier Deprez 942fcb1398fSOlivier Deprez.. _[6]: 943fcb1398fSOlivier Deprez 9441b17f4f1SOlivier Deprez[6] https://trustedfirmware-a.readthedocs.io/en/latest/components/ffa-manifest-binding.html 945fcb1398fSOlivier Deprez 946fcb1398fSOlivier Deprez.. _[7]: 947fcb1398fSOlivier Deprez 948fcb1398fSOlivier Deprez[7] https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/plat/arm/board/fvp/fdts/fvp_spmc_manifest.dts 949fcb1398fSOlivier Deprez 950fcb1398fSOlivier Deprez.. _[8]: 951fcb1398fSOlivier Deprez 952*b5dd2422SOlivier Deprez[8] https://lists.trustedfirmware.org/pipermail/tf-a/2020-February/000296.html 953fcb1398fSOlivier Deprez 954fcb1398fSOlivier Deprez-------------- 955fcb1398fSOlivier Deprez 9561b17f4f1SOlivier Deprez*Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.* 957