Skip to content

Commit

Permalink
doc: docreview
Browse files Browse the repository at this point in the history
Reviewed RST files.

Signed-off-by: Francesco Servidio <[email protected]>
  • Loading branch information
FrancescoSer authored and rlubos committed Apr 20, 2021
1 parent 615619d commit 646a622
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 61 deletions.
4 changes: 4 additions & 0 deletions doc/nrf/links.txt
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@
.. _`nRF5 SDK Bootloader`: https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_bootloader.html
.. _`nRF5 Bootloader DFU Mode`: https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_bootloader.html#lib_bootloader_dfu_mode

.. _`System Protection Unit`: https://infocenter.nordicsemi.com/topic/ps_nrf9160/spu.html

.. ### Source: devzone.nordicsemi.com

.. _`DevZone`: https://devzone.nordicsemi.com/
Expand Down Expand Up @@ -466,6 +468,8 @@

.. ### Source: other

.. _`ARM TrustZone`: https://developer.arm.com/documentation/100690/0200/ARM-TrustZone-technology?lang=en

.. _`Ninja documentation`: https://ninja-build.org/manual.html

.. _`GCC compiler`: https://gcc.gnu.org/
Expand Down
4 changes: 4 additions & 0 deletions doc/nrf/releases/release-notes-latest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ nRF9160

* Added support for parsing parameters of type unsigned int or unsigned short.

* :ref:`lib_spm` library:

* Added support for the nRF9160 pulse-density modulation (PDM) and inter-IC sound (I2S) peripherals in non-secure applications.

Common
======

Expand Down
133 changes: 72 additions & 61 deletions include/spm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,23 @@ Secure Partition Manager (SPM)
:local:
:depth: 2

The Secure Partition Manager (SPM) provides functionality for the Trusted Execution Environment of the nRF9160 and the nRF5340.
The Secure Partition Manager (SPM) provides functionality for the Trusted Execution Environment of the nRF9160 SiP and the nRF5340 SoC.

Overview
********

The Cortex-M33 CPU in the nRF9160 and nRF5340 devices implements ARM TrustZone, which means it can run a "secure" and a "non-secure" app side by side.
The SPM, being the secure app, is responsible for configuring the permissions and resources of the non-secure app and then booting it.
The Cortex-M33 CPU in the nRF9160 and nRF5340 devices implements `ARM TrustZone`_.
This allows the CPU to run a "secure" and a "non-secure" app side by side.

The SPM runs as a secure app.
It configures the permissions and resources of the non-secure app and then boots it.
Such configuration is required to run non-secure apps.
The SPM also provides the non-secure app with access to features (:ref:`lib_spm_secure_services`) that are normally only available to secure apps.

The SPM also provides the non-secure app with access to features that are normally only available to secure apps.
You can find the feature list on the :ref:`lib_spm_secure_services` page.

.. note::
If your application is using :ref:`TF-M <ug_tfm>`, SPM is not included in the build.
If your application uses :ref:`TF-M <ug_tfm>`, SPM is not included in the build.

The SPM library is used in the :ref:`secure_partition_manager` sample.

Expand All @@ -27,72 +32,78 @@ The SPM library is used in the :ref:`secure_partition_manager` sample.
Configuration
*************

The Secure Partition Manager (SPM) uses the SPU peripheral to configure security attributions for the flash, SRAM, and peripherals.
Note that the SPU peripheral is the nRF version of an IDAU (Implementation-Defined Security Attribution Unit).
The Secure Partition Manager (SPM) uses the `System Protection Unit`_ (SPU) peripheral to set security attributions for the flash memory, the SRAM, and other peripherals.
Security attributions are boolean Kconfig options that configure security settings like, for example, defining a peripheral as secure or non-secure.
The SPU peripheral is the nRF version of an Implementation-Defined Security Attribution Unit (IDAU).

To configure SPM, do the following:

* Use Kconfig to configure the security attributions for the peripherals.
* Modify the source code of the SPM library to configure the security attributions of the SRAM.

Use Kconfig to configure the security attributions for the peripherals.
Modify the source code of the SPM subsystem to configure the security attributions of SRAM.
If Partition Manager is used, the security attributions of the flash regions are deduced from the generated file :file:`pm.config`.
Otherwise, the security attributions of the flash regions are deduced from devicetree information.
If Partition Manager is used, the security attributions of the flash memory regions are taken from the generated :file:`pm.config` file.
Otherwise, they are taken from devicetree information.

For SRAM and peripherals, the following security attribution configuration is applied:
For the SRAM and the peripherals, the following security attribution configuration is applied:

SRAM (256 kB)
* Lower 64 kB: Secure
* Upper 192 kB: Non-Secure

Peripherals configured as Non-Secure
* Common

* CLOCK
* DPPI
* EGU1, EGU2
* FPU
* GPIO (and GPIO pins)
* GPIOTE1
* IPC
* NFCT
* NVMC, VMC
* PWM0-3
* REGULATORS
* RTC0, RTC1
* SAADC
* SPIM3
* TIMER0-2
* TWIM2
* UARTE0, UARTE1
* P0

* nRF9160 Specific

* WDT
* PDM
* I2S

* nRF5340 Specific

* Oscillators
* Reset
* SPIM4
* WDT0-1
* COMP
* LPCOMP
* PDM0
* I2S0
* QSPI
* NFCT
* MUTEX
* QDEC0-1
* USBD
* USB Regulator
* P1
* Lower 64 kB: Secure
* Upper 192 kB: Non-Secure

The following peripherals are configured as Non-Secure:

* Common peripherals:

* CLOCK
* DPPI
* EGU1, EGU2
* FPU
* GPIO (and GPIO pins)
* GPIOTE1
* IPC
* NFCT
* NVMC, VMC
* PWM0-3
* REGULATORS
* RTC0, RTC1
* SAADC
* SPIM3
* TIMER0-2
* TWIM2
* UARTE0, UARTE1
* P0

* nRF9160 SiP specific peripherals:

* WDT
* PDM
* I2S

* nRF5340 SoC specific peripherals:

* Oscillators
* Reset
* SPIM4
* WDT0-1
* COMP
* LPCOMP
* PDM0
* I2S0
* QSPI
* NFCT
* MUTEX
* QDEC0-1
* USBD
* USB Regulator
* P1

.. _lib_spm_secure_services:

Secure Services
***************

The SPM by default provides certain Secure Services to the Non-Secure Firmware. See :ref:`lib_secure_services` for more information.
The SPM provides by default certain Secure Services to the Non-Secure Firmware.
See :ref:`lib_secure_services` for more information.

API documentation
*****************
Expand Down

0 comments on commit 646a622

Please sign in to comment.