Add quick start guides
Adds quick start guides to project docs to cover building and running
tests in PC and FVP environments.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: Iad9a089ffb371fe7a11df11902ecf71c3df6a013
diff --git a/docs/developer/build-instructions.rst b/docs/developer/build-instructions.rst
index d5f23bc..f52fe55 100644
--- a/docs/developer/build-instructions.rst
+++ b/docs/developer/build-instructions.rst
@@ -155,10 +155,10 @@
directly accessible by the target.
* Installed files are incorporated into a third-party build process e.g. OP-TEE.
-The following guides provide instructions on deploying to different environments:
+The following guides provide instructions on deploying services and running programs on FVP:
* :ref:`Deploying trusted services in S-EL0 Secure Partitions under OP-TEE`
-* :ref:`Deploying Programs on FVP`
+* :ref:`Running User-space Programs on FVP`
Batch Building
--------------
diff --git a/docs/environments/secure-partitions/fvp-deployment-guide.rst b/docs/environments/secure-partitions/fvp-deployment-guide.rst
deleted file mode 100644
index eeb9078..0000000
--- a/docs/environments/secure-partitions/fvp-deployment-guide.rst
+++ /dev/null
@@ -1,86 +0,0 @@
-Deploying Programs on FVP
-=========================
-This page explains how to load and run user space programs on a Linux image running in FVP simulation.
-The loaded programs may use any trusted services that are available as part of the image firmware.
-
-To prepare and run an image that includes trusted services running in S-EL0 secure partitions under
-OP-TEE. see:
-:ref:`Deploying trusted services in S-EL0 Secure Partitions under OP-TEE`
-
-Shared directory
-----------------
-The OP-TEE image built for the FVP virtual platform supports directory sharing between the running
-OS and the host computer. This provides a convenient way to transfer files between the host and
-the device simulation. When the FVP is run using the *run-only* target in *fvp.mk*, the shared
-directory is set-up automatically.
-
-On the host, the shared directory is located here::
-
- optee/shared
-
-On the simulated device, running under FVP, a mount is created here::
-
- /mnt
-
-Deploying service level tests
------------------------------
-As an example of how to load and run programs, the *ts-service-test* binary executable is used.
-The build file for the *arm-linux* deployment of *ts-service-test* lives under::
-
- trusted-services/deployments/ts-service-test/arm-linux
-
-The executable includes service level test cases that exercise trusted services via their
-standard interfaces. Test cases use *libts* for locating services and establishing RPC
-sessions. *ts-service-test* provides a useful reference for understanding how *libts* may
-be used for accessing trusted services.
-
-The build file for the *arm-linux* deployment of *libts* lives under::
-
- trusted-services/deployments/libts/arm-linux
-
-Trusted service build instructions are here:
-:ref:`Build Instructions`
-
-Having built *ts-service-test* and *libts* for the *arm-linux* environment, the steps
-are required.
-
-Copy files to share directory
-'''''''''''''''''''''''''''''
-Assuming that the *OP-TEE* and *trusted-services* projects are located under a common
-parent directory, the following files need to be copied from the host using::
-
- cp trusted-services/deployments/libts/arm-linux/build/install/lib/libts.so optee/shared/.
- cp trusted-services/deployments/ts-service-test/arm-linux/build/install/bin/ts-service-test optee/shared/.
-
-Installing libts.so
-'''''''''''''''''''
-Having copied *libts.so* to the shared directory, it needs to be copied to one of the standard
-lib directories so that it is located when a dependent program is started. From the terminal
-command prompt for the booted FVP, use::
-
- cd /mnt
- cp libts.so /usr/lib/.
-
-Running the program executable
-''''''''''''''''''''''''''''''
-The *ts-service-test* program may be run directly from the */mnt* directory using::
-
- ./ts-service-test -v
-
-If all is well, you should see something like::
-
- TEST(E2EcryptoOpTests, generateRandomNumbers) - 3 ms
- TEST(E2EcryptoOpTests, asymEncryptDecrypt) - 8 ms
- TEST(E2EcryptoOpTests, signAndVerifyHash) - 29 ms
- TEST(E2EcryptoOpTests, exportAndImportKeyPair) - 17 ms
- TEST(E2EcryptoOpTests, exportPublicKey) - 10 ms
- TEST(E2EcryptoOpTests, generatePersistentKeys) - 34 ms
- TEST(E2EcryptoOpTests, generateVolatileKeys) - 16 ms
-
- OK (7 tests, 7 ran, 56 checks, 0 ignored, 0 filtered out, 117 ms)
-
---------------
-
-*Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.*
-
-SPDX-License-Identifier: BSD-3-Clause
diff --git a/docs/environments/secure-partitions/index.rst b/docs/environments/secure-partitions/index.rst
index 6534717..9ab70d1 100644
--- a/docs/environments/secure-partitions/index.rst
+++ b/docs/environments/secure-partitions/index.rst
@@ -6,8 +6,8 @@
:caption: Contents:
libsp
- fvp-deployment-guide.rst
- opteesp-deployment-guide.rst
+ userspace-programs-on-fvp
+ opteesp-deployment-guide
--------------
diff --git a/docs/environments/secure-partitions/opteesp-deployment-guide.rst b/docs/environments/secure-partitions/opteesp-deployment-guide.rst
index e71140f..233a189 100644
--- a/docs/environments/secure-partitions/opteesp-deployment-guide.rst
+++ b/docs/environments/secure-partitions/opteesp-deployment-guide.rst
@@ -2,10 +2,8 @@
==================================================================
Trusted services built for the *opteesp* environment may be deployed to run within S-EL0 secure
-partitions, managed by OP-TEE. Secure partitions are loaded and run by OP-TEE using the early-TA
-feature where a set of TAs or SPs are loaded during OP-TEE initialization. This feature relies on
-SP images being incorporated into the *OP-TEE OS* image at build time. It is therefore necessary to
-have access to the OP-TEE build environment and tools in order to deploy SP images.
+partitions, managed by OP-TEE. The current implementation of the OP-TEE SPMC supports booting SPs
+embedded into the OP-TEE OS binary (similar to early-TAs) or from the FIP.
Tool prerequisites and general build instruction for OP-TEE are described here:
`<https://optee.readthedocs.io/en/latest/building/gits/build.html>`_
@@ -13,85 +11,81 @@
Download page for Arm Fixed Virtual Platforms (FVP):
`<https://developer.arm.com/tools-and-software/simulation-models/fixed-virtual-platforms>`_
-Incorporating SP images into the *OP-TEE OS* image
---------------------------------------------------
+
+Embedding SP images into the *OP-TEE OS* image
+----------------------------------------------
The set of SP images to include in the built *OP-TEE OS* image are specified to the *OP-TEE OS*
-build by the EARLY_TA_PATHS make variable. The EARLY_TA_PATHS variable should be assigned a string
-containing a space separated list of file paths for each SP image file to include. SP images
+build by the ``SP_PATHS`` make variable. The ``SP_PATHS`` variable should be assigned a string
+containing a space separated list of file paths for each SP image file to include. SP images
that need to be deployed from the Trusted Services project will be located in the install directory,
specified when the SP images where built i.e.::
- <CMAKE_INSTALL_PREFIX>/bin
+ <CMAKE_INSTALL_PREFIX>/opteesp/bin
-The following example illustrates a setting of the EARLY_TA_PATHS variable to deploy the Secure Storage
+The following example illustrates a setting of the ``SP_PATHS`` variable to deploy the Secure Storage
SP and Crypto SP::
- EARLY_TA_PATHS="ts-install-dir/bin/dc1eef48-b17a-4ccf-ac8b-dfcff7711b14.stripped.elf \
- ts-install-dir/bin/d9df52d5-16a2-4bb2-9aa4-d26d3b84e8c0.stripped.elf"
+ SP_PATHS="ts-install-dir/opteesp/bin/dc1eef48-b17a-4ccf-ac8b-dfcff7711b14.stripped.elf \
+ ts-install-dir/opteesp/bin/d9df52d5-16a2-4bb2-9aa4-d26d3b84e8c0.stripped.elf"
-To help with integration with the OP-TEE build system, the installation step for a deployment to the
-*opteesp* environment includes the generation of a simple makefile that extends the EARLY_TA_PATHS
-variable for the particular deployment. For example, the generated makefile for the crypto SP
-contains::
-
- OPTEE_OS_COMMON_EXTRA_FLAGS+=EARLY_TA_PATHS+=${TS_INSTALL_PREFIX}/bin/d9df52d5-16a2-4bb2-9aa4-d26d3b84e8c0.stripped.elf
-
-The generated makefile is installed to::
-
- <CMAKE_INSTALL_PREFIX>/lib/make
Reference OP-TEE build with PSA RoT Services
--------------------------------------------
-To provide an example integration of OP-TEE with a set of trusted services, a makefile called *fvp_ffa.mk*
-is included in the OP-TEE build repository that builds OP-TEE OS with a set of SP images that provide PSA
-RoT services. SP images are built using the standard trusted services build flow and are automatically
-injected into the *optee_os* build using the early TA feature described above.
-A bootable Linux image is created that is intended to run on the Arm FVP virtual platform. The built image
-includes user space programs that may be used to test and demonstrate the deployed trusted services.
+To provide an example integration of OP-TEE with a set of trusted services, a makefile called
+*fvp-ps-sp.mk* is included in the OP-TEE build repository that builds OP-TEE OS with a set of SP
+images. SP images are built using the standard trusted services build flow and are automatically
+injected into the *optee_os* build using the TA feature described above.
-Setting up the OP-TEE build environment
-'''''''''''''''''''''''''''''''''''''''
-To help setup the OP-TEE build environment, a manifest file called *psa-sp-fvp.xml* is included in OP-TEE
-manifests repository. This may be used with the *repo* tool to manage the set of git repositories. Note
-that this manifest relies on SSH access to *github.com* so ensure that you have installed a suitable public
-key into your *github* account.
+A bootable Linux image is created that is intended to run on the Arm AEM FVP virtual platform. The
+built image includes user space programs that may be used to test and demonstrate the deployed
+trusted services.
-Having created a new directory for the OP-TEE build environment, the required set of git repositories can
-be cloned and fetched using::
- repo init -u https://git.trustedfirmware.org/OP-TEE/manifest.git -b psa-development -m psa-sp-fvp.xml
+Getting build dependencies
+''''''''''''''''''''''''''
+
+To help setup the workspace, a manifest file called *fvp-ts.xml* is included in OP-TEE manifests
+repository. This may be used with the *repo* tool to manage the set of git repositories.
+
+Having created a new directory for the workspace, the required set of git repositories can be cloned
+and fetched using::
+
+ repo init -u https://github.com/OP-TEE/manifest.git -b master -m fvp-ts.xml
repo sync
+
Building the reference OP-TEE image
'''''''''''''''''''''''''''''''''''
-To build the bootable image that includes OP-TEE and the set of secure partition images that hold the
-PSA RoT services, use the following (from your OP-TEE root directory)::
- cd build
- make -f fvp_ffa.mk all
+To build the bootable image that includes OP-TEE and the set of secure partition images that hold the
+PSA RoT services, use the following (from the root directory of the workspace)::
+
+ make -C build
This will take many tens of minutes to complete.
+
Running the reference OP-TEE image on FVP
'''''''''''''''''''''''''''''''''''''''''
+
The fvp makefile includes a *run* and *run-only* target which can be used to start the FVP model and
boot the built image. The example assumes that the FVP model has been installed in the following
directory relative to the OP-TEE build directory::
- ../Foundation_Platformpkg/models/Linux64_GCC-6.4/
+ ../Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3
To boot the built image on FVP without building, use::
- make run-only FVP_PATH=../Foundation_Platformpkg/models/Linux64_GCC-6.4/
+ FVP_PATH=../Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3 make run-only
For information on running user space programs on FVP, see:
-:ref:`Deploying Programs on FVP`
+:ref:`Running User-space Programs on FVP`
--------------
-*Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.*
+*Copyright (c) 2020-2022, Arm Limited and Contributors. All rights reserved.*
SPDX-License-Identifier: BSD-3-Clause
diff --git a/docs/environments/secure-partitions/userspace-programs-on-fvp.rst b/docs/environments/secure-partitions/userspace-programs-on-fvp.rst
new file mode 100644
index 0000000..e364839
--- /dev/null
+++ b/docs/environments/secure-partitions/userspace-programs-on-fvp.rst
@@ -0,0 +1,150 @@
+Running user-space programs on FVP
+==================================
+
+This page explains how to load and run user space programs on a Linux image running in FVP simulation.
+The loaded programs may use any trusted services that are available as part of the image firmware.
+
+To prepare and run an image that includes trusted services running in S-EL0 secure partitions under
+OP-TEE see: :ref:`Deploying trusted services in S-EL0 Secure Partitions under OP-TEE`
+
+The example assumes that the FVP model has been installed in the following
+directory relative to the OP-TEE build directory::
+
+ ../Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3
+
+
+Shared directory
+----------------
+
+The AEM FVP supports directory sharing between the target and the host OS. This provides a
+convenient way to transfer files between the host and the device simulation. When the FVP is run
+using the *run-only* target from the *op-tee/build* repository, the shared directory is set-up
+automatically. The whole "workspace" is shared to the FVP and mounted under ``/mnt/host``.
+
+
+Running service level tests
+---------------------------
+
+Most test and demo applications are integrated into the OP-TEE build flow, and can be build using
+the makefiles in the ``op-tee/build`` repository.
+
+To build all such binaries build the ``ffa-test-all`` target. For available targets please refer to
+fvp-psa-sp.mk_. As an example to build the ``ts-service-test`` application execute the following
+commands from the root of the workspace::
+
+ make -C build ffa-ts-service-test
+
+The executable includes service level test cases that exercise trusted services via their
+standard interfaces. Test cases use *libts* for locating services and establishing RPC
+sessions. *ts-service-test* provides a useful reference for understanding how *libts* may
+be used for accessing trusted services.
+
+Build output will be copied to ``out/ts-install``.
+
+To build the applications without using the ``op-tee/build`` files refer to the instructions here:
+:ref:`Build Instructions`
+
+Run *ts-service-test*
+'''''''''''''''''''''
+
+To start the FVP, from the root directory of the workspace, enter::
+
+ FVP_PATH=../Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3 make -C build run-only
+
+Once it boots to the login prompt, log in as root and from the FVP terminal, enter::
+
+ # Enter the mount target for the shared directory
+ cd /mnt/host
+
+ # Install the shared library and executables
+ cp -vat /usr out/ts-install/arm-linux/lib out/ts-install/arm-linux/bin
+
+ # Load the kernel modules
+ out/linux-arm-ffa-tee/load_module.sh
+ out/linux-arm-ffa-user/load_module.sh
+
+ # Run the test application
+ ts-service-test -v
+
+Use the same flow for other user-space programs. Check the output of the ``cp`` command executed to see
+executables copied under ``/usr/bin``.
+
+If all is well, you should see something like::
+
+ TEST(PsServiceTests, createAndSetExtended) - 0 ms
+ TEST(PsServiceTests, createAndSet) - 0 ms
+ TEST(PsServiceTests, storeNewItem) - 0 ms
+ TEST(ItsServiceTests, storeNewItem) - 0 ms
+ TEST(AttestationProvisioningTests, provisionedIak) - 1 ms
+ TEST(AttestationProvisioningTests, selfGeneratedIak) - 1 ms
+ TEST(AttestationServiceTests, repeatedOperation) - 75 ms
+ TEST(AttestationServiceTests, invalidChallengeLen) - 0 ms
+ TEST(AttestationServiceTests, checkTokenSize) - 2 ms
+ TEST(CryptoKeyDerivationServicePackedcTests, deriveAbort) - 0 ms
+ TEST(CryptoKeyDerivationServicePackedcTests, hkdfDeriveBytes) - 0 ms
+ TEST(CryptoKeyDerivationServicePackedcTests, hkdfDeriveKey) - 0 ms
+ TEST(CryptoMacServicePackedcTests, macAbort) - 0 ms
+ TEST(CryptoMacServicePackedcTests, signAndVerify) - 1 ms
+ TEST(CryptoCipherServicePackedcTests, cipherAbort) - 0 ms
+ TEST(CryptoCipherServicePackedcTests, encryptDecryptRoundtrip) - 0 ms
+ TEST(CryptoHashServicePackedcTests, hashAbort) - 0 ms
+ TEST(CryptoHashServicePackedcTests, hashAndVerify) - 0 ms
+ TEST(CryptoHashServicePackedcTests, calculateHash) - 0 ms
+ TEST(CryptoServicePackedcTests, generateRandomNumbers) - 0 ms
+ TEST(CryptoServicePackedcTests, asymEncryptDecryptWithSalt) - 14 ms
+ TEST(CryptoServicePackedcTests, asymEncryptDecrypt) - 1 ms
+ TEST(CryptoServicePackedcTests, signAndVerifyEat) - 4 ms
+ TEST(CryptoServicePackedcTests, signAndVerifyMessage) - 4 ms
+ TEST(CryptoServicePackedcTests, signAndVerifyHash) - 4 ms
+ TEST(CryptoServicePackedcTests, exportAndImportKeyPair) - 1 ms
+ TEST(CryptoServicePackedcTests, exportPublicKey) - 1 ms
+ TEST(CryptoServicePackedcTests, purgeKey) - 0 ms
+ TEST(CryptoServicePackedcTests, copyKey) - 1 ms
+ TEST(CryptoServicePackedcTests, generatePersistentKeys) - 1 ms
+ TEST(CryptoServicePackedcTests, generateVolatileKeys) - 0 ms
+ TEST(CryptoServiceProtobufTests, generateRandomNumbers) - 1 ms
+ TEST(CryptoServiceProtobufTests, asymEncryptDecryptWithSalt) - 15 ms
+ TEST(CryptoServiceProtobufTests, asymEncryptDecrypt) - 1 ms
+ TEST(CryptoServiceProtobufTests, signAndVerifyMessage) - 4 ms
+ TEST(CryptoServiceProtobufTests, signAndVerifyHash) - 4 ms
+ TEST(CryptoServiceProtobufTests, exportAndImportKeyPair) - 1 ms
+ TEST(CryptoServiceProtobufTests, exportPublicKey) - 0 ms
+ TEST(CryptoServiceProtobufTests, generatePersistentKeys) - 1 ms
+ TEST(CryptoServiceProtobufTests, generateVolatileKeys) - 1 ms
+ TEST(CryptoServiceLimitTests, volatileRsaKeyPairLimit) - 99 ms
+ TEST(CryptoServiceLimitTests, volatileEccKeyPairLimit) - 22 ms
+ TEST(DiscoveryServiceTests, checkServiceInfo) - 0 ms
+ TEST(SmmVariableAttackTests, getCheckPropertyWithMaxSizeName) - 0 ms
+ TEST(SmmVariableAttackTests, getCheckPropertyWithOversizeName) - 0 ms
+ TEST(SmmVariableAttackTests, setCheckPropertyWithMaxSizeName) - 0 ms
+ TEST(SmmVariableAttackTests, setCheckPropertyWithOversizeName) - 0 ms
+ TEST(SmmVariableAttackTests, enumerateWithSizeMaxNameSize) - 0 ms
+ TEST(SmmVariableAttackTests, enumerateWithOversizeName) - 0 ms
+ TEST(SmmVariableAttackTests, setAndGetWithSizeMaxNameSize) - 0 ms
+ TEST(SmmVariableAttackTests, setAndGetWithOversizeName) - 0 ms
+ TEST(SmmVariableAttackTests, setWithSizeMaxNameSize) - 0 ms
+ TEST(SmmVariableAttackTests, setWithOversizeName) - 0 ms
+ TEST(SmmVariableAttackTests, setWithSizeMaxDataSize) - 0 ms
+ TEST(SmmVariableAttackTests, setWithOversizeData) - 0 ms
+ TEST(SmmVariableServiceTests, checkMaxVariablePayload) - 0 ms
+ TEST(SmmVariableServiceTests, setSizeConstraint) - 0 ms
+ TEST(SmmVariableServiceTests, enumerateStoreContents) - 0 ms
+ TEST(SmmVariableServiceTests, getVarSizeNv) - 0 ms
+ TEST(SmmVariableServiceTests, getVarSize) - 0 ms
+ TEST(SmmVariableServiceTests, setAndGetNv) - 1 ms
+ TEST(SmmVariableServiceTests, setAndGet) - 0 ms
+ TEST(TestRunnerServiceTests, runSpecificTest) - 0 ms
+ TEST(TestRunnerServiceTests, runConfigTests) - 0 ms
+ TEST(TestRunnerServiceTests, listPlatformTests) - 0 ms
+ TEST(TestRunnerServiceTests, runAllTests) - 0 ms
+ TEST(TestRunnerServiceTests, listAllTests) - 0 ms
+
+ OK (67 tests, 67 ran, 977 checks, 0 ignored, 0 filtered out, 261 ms)
+
+--------------
+
+.. _fvp-psa-sp.mk :https://github.com/OP-TEE/build/blob/master/fvp-psa-sp.mk
+
+*Copyright (c) 2020-2022, Arm Limited and Contributors. All rights reserved.*
+
+SPDX-License-Identifier: BSD-3-Clause
diff --git a/docs/index.rst b/docs/index.rst
index 2b68e20..c6cd80a 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -23,6 +23,13 @@
<p></p>
</li>
<li class="grid-item">
+ <a href="quickstart/index.html">
+ <img alt="" src="_static/images/tfm-documentation.png"/>
+ <h2>Quick Start Guides</h2>
+ </a>
+ <p></p>
+ </li>
+ <li class="grid-item">
<a href="services/index.html">
<img alt="" src="_static/images/tfm-integration.png"/>
<h2>Services</h2>
@@ -66,6 +73,7 @@
overview/index
project/index
+ quickstart/index
developer/index
services/index
environments/index
diff --git a/docs/quickstart/index.rst b/docs/quickstart/index.rst
new file mode 100644
index 0000000..73a3660
--- /dev/null
+++ b/docs/quickstart/index.rst
@@ -0,0 +1,18 @@
+Quick Start Guides
+==================
+
+The following quick start guides provide step-by-step instructions for performing common tasks when
+working with the Trusted Services project.
+
+.. toctree::
+ :maxdepth: 1
+ :caption: Contents:
+
+ pc-testing
+ optee-testing
+
+--------------
+
+*Copyright (c) 2022, Arm Limited and Contributors. All rights reserved.*
+
+SPDX-License-Identifier: BSD-3-Clause
diff --git a/docs/quickstart/optee-testing.rst b/docs/quickstart/optee-testing.rst
new file mode 100644
index 0000000..85e2053
--- /dev/null
+++ b/docs/quickstart/optee-testing.rst
@@ -0,0 +1,61 @@
+Build and run tests on OP-TEE reference integration for FVP
+===========================================================
+
+The Linux based build maintained by the OP-TEE project is used as the reference integration for testing
+trusted service deployments on a simulated hardware platform. Service providers deployed within secure partitions
+are tested using test executables that run as user-space programs under Linux. Test cases interact with trusted
+service providers using standard service access protocols, carried by FF-A based messages.
+
+The test executables most often used for service level testing on hardware platforms are:
+
+ - *ts-service-test* - contains a set of service-level end-to-end tests. Discovers and communicates
+ with service providers using libts.
+ - *psa-api-test* - PSA functional API conformance tests (from external project). Also uses libts.
+
+This method uses the makefiles from the ``op-tee/build`` repository.
+
+
+Before you start
+----------------
+
+Before attempting to run tests on the FVP simulation, the OP-TEE reference integration needs to be
+built and run. Read the following guides to understand how to do this:
+
+ - OP-TEE build and run instructions, see:
+ :ref:`Deploying trusted services in S-EL0 Secure Partitions under OP-TEE`
+
+ - Instructions for loading and running user-space programs on FVP:
+ :ref:`Running user-space programs on FVP`
+
+
+Build the linux application binaries
+------------------------------------
+
+From the root directory of the workspace, enter the following to build the test applications::
+
+ make -C build ffa-test-all
+
+
+Run *ts-service-test*
+---------------------
+
+From the root directory of the workspace, enter::
+
+ FVP_PATH=../Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3 make -C build run-only
+
+Once it boots to the login prompt, log in as root and from the FVP terminal, enter::
+
+ cd /mnt/host
+ cp -vat /usr out/ts-install/arm-linux/lib out/ts-install/arm-linux/bin
+ out/linux-arm-ffa-tee/load_module.sh
+ out/linux-arm-ffa-user/load_module.sh
+ ts-service-test -v
+
+Use the same flow for other user-space programs. Check the output of the ``cp`` command executed to see
+executables copied under ``/usr/bin``.
+
+--------------
+
+*Copyright (c) 2022, Arm Limited and Contributors. All rights reserved.*
+
+SPDX-License-Identifier: BSD-3-Clause
diff --git a/docs/quickstart/pc-testing.rst b/docs/quickstart/pc-testing.rst
new file mode 100644
index 0000000..9b887be
--- /dev/null
+++ b/docs/quickstart/pc-testing.rst
@@ -0,0 +1,66 @@
+Build and run PC based tests
+============================
+
+Many components within the Trusted Services project may be built and tested within a native PC environment.
+PC based testing is an important part of the development flow and can provide a straight-forward way to check
+for regressions and debug problems. PC based tests range from small unit tests up to end-to-end service tests.
+All test cases in the Trusted Services project are written for the CppUTest test framework.
+
+The test executables most often used for PC based testing of Trusted Services components are:
+
+ - *component-test* - a PC executable that runs many component level tests.
+ - *ts-service-test* - contains a set of service-level end-to-end tests. For PC build, service providers
+ are included in the libts library.
+ - *psa-api-test* - PSA functional API conformance tests (from external project).
+
+
+Before you start
+----------------
+Before attempting to run any builds, ensure that all necessary tools are installed. See: :ref:`Software Requirements`
+
+
+Build and run *component-test*
+------------------------------
+
+From the root directory of the checked-out TS project, enter the following::
+
+ cmake -B build-ct -S deployments/component-test/linux-pc
+ make -C build-ct install
+ build-ct/install/linux-pc/bin/component-test -v
+
+
+Build and run *ts-service-test*
+-------------------------------
+
+From the root directory of the checked-out TS project, enter the following::
+
+ cmake -B build-ts -S deployments/ts-service-test/linux-pc
+ make -C build-ts install
+ LD_PRELOAD=build-ts/install/linux-pc/lib/libts.so build-ts/install/linux-pc/bin/ts-service-test -v
+
+Build and run *psa-api-test*
+----------------------------
+Tests for each API are built as separate executables. Test are available for the following APIs::
+
+ crypto
+ initial_attestation
+ internal_trusted_storage
+ protected_storage
+
+To build and run tests for the Crypto API, enter the following (use the same flow for other APIs)::
+
+ cmake -B build-pa deployments/psa-api-test/crypto/linux-pc
+ make -C build-pa install
+ LD_PRELOAD=build-pa/install/linux-pc/lib/libts.so build-pa/install/linux-pc/bin/psa-crypto-api-test
+
+More information
+----------------
+For more information about deployments and building, see: :ref:`Build Instructions`
+
+PSA functional API conformance tests git location: https://github.com/ARM-software/psa-arch-tests.git
+
+--------------
+
+*Copyright (c) 2022, Arm Limited and Contributors. All rights reserved.*
+
+SPDX-License-Identifier: BSD-3-Clause