Docs: Update FP support document
Signed-off-by: Feder Liang <Feder.Liang@arm.com>
Change-Id: Ia14c7b1c7283af2b8376322ecc23b700670dd91d
diff --git a/docs/integration_guide/tfm_fpu_support.rst b/docs/integration_guide/tfm_fpu_support.rst
index 0884418..ed4052d 100644
--- a/docs/integration_guide/tfm_fpu_support.rst
+++ b/docs/integration_guide/tfm_fpu_support.rst
@@ -3,28 +3,38 @@
######################
TF-M adds several configuration flags to control Floating point (FP) [1]_
-support in TF-M Secure Processing Environment (SPE).
-Non Secure Processing Environment (NSPE) is not allowed to access Floating
-Point Unit (FPU) [2]_ when FP support is enabled in SPE at current stage.
+support in TF-M Secure Processing Environment (SPE) and Non Secure Processing
+Environment (NSPE).
-* Support GNU Arm Embedded Toolchain [3]_.
-* Support FP Application Binary Interface (ABI) [4]_ types: software, hybird,
- hardware.
-* Support lazy stacking on/off.
+* Support FP in SPE or NSPE.
+* Support FP Application Binary Interface (ABI) [2]_ types: software, hardware.
+ SPE and NSPE shall use the same FP ABI type.
+* Support lazy stacking enable/disable in SPE only, NSPE is not allowed to
+ enable/disable this feature.
+* Support GNU Arm Embedded Toolchain [3]_. ``GNU Arm Embedded Toolchain 10.3-
+ 2021.10`` and later version shall be used to mitigate VLLDM instruction
+ security vulnerability [4]_.
* Support Inter-Process Communication (IPC) [5]_ model in TF-M, and doesn't
support LIBRARY or SFN model.
-* Support Armv8-M [6]_ mainline or later.
+* Support Armv8.0-M mainline.
* Support isolation level 1,2,3.
-* Does not support use FPU in First-Level Interrupt Handling (FLIH) [7]_ at
+* Does not support use FPU in First-Level Interrupt Handling (FLIH) [6]_ at
current stage.
-Please refer to Arm musca S1 [8]_ platform as a reference implementation when
+Please refer to Arm musca S1 [7]_ platform as a reference implementation when
you enable FP support on your platforms.
-Secure libraries are compiled with ``COMPILER_CP_FLAG`` and linked with
-``LINKER_CP_OPTION`` for different FP ABI types. All those libraries shall be
-built with the same FP ABI type. Otherwise, linking errors may occur due to FP
-ABI type conflicts.
+============================
+FP ABI type for SPE and NSPE
+============================
+FP design in Armv8.0-M [8]_ architecture requires consistent FP ABI types
+between SPE and NSPE. Furthermore, both sides shall set up CPACR individually
+when FPU is used. Otherwise, No Coprocessor (NOCP) usage fault will be asserted
+during FP context switch between security states.
+
+Secure and non-secure libraries are compiled with ``COMPILER_CP_FLAG`` and
+linked with ``LINKER_CP_OPTION`` for different FP ABI types. All those
+libraries shall be built with ``COMPLIER_CP_FLAG``.
If FP ABI types mismatch error is generated during build, pleae check whether
the library is compiled with ``COMPILER_CP_FLAG``.
@@ -42,26 +52,27 @@
===================================
The following CMake configurations configure ``COMPILER_CP_FLAG`` in TF-M SPE.
-* ``CONFIG_TFM_SPE_FP`` are used to configure FP ABI type for secure side.
+* ``CONFIG_TFM_FP`` are used to configure FP ABI type for secure and non-secure
+ side both.
+-------------------+---------------------------+
- | CONFIG_TFM_SPE_FP | FP ABI type [2]_ [3]_ |
+ | CONFIG_TFM_FP | FP ABI type [2]_ [3]_ |
+===================+===========================+
- | 0 (default) | Software |
+ | soft (default) | Software |
+-------------------+---------------------------+
- | 1 | Hybird |
- +-------------------+---------------------------+
- | 2 | Hardware |
+ | hard | Hardware |
+-------------------+---------------------------+
- FP software ABI type is default for secure side in TF-M (mfloat-abi=soft).
+ FP software ABI type is default in TF-M.
-* ``CONFIG_TFM_LAZY_STACKING_SPE`` is used to enable/disable lazy stacking
- feature from secure side. This feature is only valid for FP hardware or
- hybird option.
+* ``CONFIG_TFM_LAZY_STACKING`` is used to enable/disable lazy stacking
+ feature. This feature is only valid for FP hardware ABI type.
+ NSPE is not allowed to enable/disable this feature. Let SPE decide the
+ secure/non-secure shared setting of lazy stacking to avoid the possible
+ side-path brought by flexibility.
+------------------------------+---------------------------+
- | CONFIG_TFM_LAZY_STACKING_SPE | Description |
+ | CONFIG_TFM_LAZY_STACKING | Description |
+==============================+===========================+
| 0FF | Disable lazy stacking |
+------------------------------+---------------------------+
@@ -69,7 +80,7 @@
+------------------------------+---------------------------+
* ``CONFIG_TFM_FP_ARCH`` specifies which FP architecture is available on the
- target, valid for FP hardware or hybird option.
+ target, valid for FP hardware ABI type.
FP architecture is processor dependent. For GNUARM compiler, example value
are: auto, fpv5-d16, fpv5-sp-d16, etc.
@@ -86,20 +97,19 @@
*********
.. [1] `High-Performance Hardware Support for Floating-Point Operations <https://www.arm.com/why-arm/technologies/floating-point>`_
-.. [2] `Cortex-M4 Technical Reference Manual <https://developer.arm.com/documentation/ddi0439/b/Floating-Point-Unit/About-the-FPU>`_
+.. [2] `Float Point ABI <https://www.keil.com/support/man/docs/armclang_ref/armclang_ref_chr1417451577871.htm>`_
.. [3] `GNU Arm Embedded Toolchain <https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm>`_
-.. [4] `Float Point ABI <https://www.keil.com/support/man/docs/armclang_ref/armclang_ref_chr1417451577871.htm>`_
+.. [4] `VLLDM instruction Security Vulnerability <https://developer.arm.com/support/arm-security-updates/vlldm-instruction-security-vulnerability>`_
-.. [5] :doc:`TF-M Inter-Process Communication </docs/technical_references/design_docs/tfm_psa_inter_process_communication>`
+.. [5] `Arm® Platform Security Architecture Firmware Framework 1.0 <https://armkeil.blob.core.windows.net/developer/Files/pdf/PlatformSecurityArchitecture/Architect/DEN0063-PSA_Firmware_Framework-1.0.0-2.pdf>`_
-.. [6] `Armv8-M Architecture Reference Manual <https://developer.arm.com/documentation/ddi0553/latest>`_
+.. [6] :doc:`Secure Interrupt Integration Guide </docs/integration_guide/tfm_secure_irq_integration_guide>`
-.. [7] :doc:`Secure Interrupt Integration Guide </docs/integration_guide/tfm_secure_irq_integration_guide>`
+.. [7] `Musca-S1 Test Chip Board <https://developer.arm.com/tools-and-software/development-boards/iot-test-chips-and-boards/musca-s1-test-chip-board>`_
-.. [8] `Musca-S1 Test Chip Board <https://developer.arm.com/tools-and-software/development-boards/iot-test-chips-and-boards/musca-s1-test-chip-board>`_
-
+.. [8] `Armv8-M Architecture Reference Manual <https://developer.arm.com/documentation/ddi0553/latest>`_
--------------