diff options
author | Joanna Farley <joanna.farley@arm.com> | 2023-04-04 16:16:04 +0200 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2023-04-04 16:16:04 +0200 |
commit | 42fb812a7525682362096d651a3749787b3bd555 (patch) | |
tree | a1195cd04cf6718a933f1afcdc92b832d69df214 /docs | |
parent | e6faf28289a4051b38723c917b811e5d305de15c (diff) | |
parent | 61ff8f72b2f2da04578aed10843141ae10123ed8 (diff) | |
download | arm-trusted-firmware-42fb812a7525682362096d651a3749787b3bd555.tar.gz |
Merge changes from topic "ethos-n" into integration
* changes:
docs(maintainers): update NPU driver files
docs(ethos-n): update porting-guide.rst for NPU
feat(ethos-n): add separate RO and RW NSAIDs
feat(ethos-n)!: add protected NPU firmware setup
feat(ethos-n): add stream extends and attr support
feat(ethos-n): add reserved memory address support
feat(ethos-n): add event and aux control support
feat(ethos-n): add SMC call to get FW properties
refactor(ethos-n): split up SMC call handling
feat(ethos-n): add NPU firmware validation
feat(ethos-n): add check for NPU in SiP setup
feat(ethos-n)!: load NPU firmware at BL2
feat(juno): support ARM_IO_IN_DTB option for Juno
fix(fconf): fix FCONF_ARM_IO_UUID_NUMBER value
fix(fvp): incorrect UUID name in FVP tb_fw_config
fix(ethos-n): add workaround for erratum 2838783
feat(ethos-n): add support for NPU to cert_create
feat(ethos-n): add NPU support in fiptool
feat(ethos-n): add support to set up NSAID
build(fiptool): add object dependency generation
feat(ethos-n): add NPU sleeping SMC call
feat(ethos-n): add multiple asset allocators
feat(ethos-n): add reset type to reset SMC calls
feat(ethos-n): add protected NPU TZMP1 regions
build(ethos-n): add TZMP1 build flag
Diffstat (limited to 'docs')
-rw-r--r-- | docs/about/maintainers.rst | 4 | ||||
-rw-r--r-- | docs/getting_started/porting-guide.rst | 62 | ||||
-rw-r--r-- | docs/plat/arm/arm-build-options.rst | 10 |
3 files changed, 75 insertions, 1 deletions
diff --git a/docs/about/maintainers.rst b/docs/about/maintainers.rst index 2ae32447f..bffca722f 100644 --- a/docs/about/maintainers.rst +++ b/docs/about/maintainers.rst @@ -179,6 +179,10 @@ Arm® Ethos™-N NPU driver :|G|: `stefanasimion`_ :|F|: drivers/arm/ethosn/ :|F|: include/drivers/arm/ethosn.h +:|F|: include/drivers/arm/ethosn_cert.h +:|F|: include/drivers/arm/ethosn_fip.h +:|F|: include/drivers/arm/ethosn_oid.h +:|F|: plat/arm/board/juno/juno_ethosn_tzmp1_def.h :|F|: plat/arm/common/fconf/fconf_ethosn_getter.c :|F|: include/plat/arm/common/fconf_ethosn_getter.h :|F|: fdts/juno-ethosn.dtsi diff --git a/docs/getting_started/porting-guide.rst b/docs/getting_started/porting-guide.rst index 8d6a2bf23..ae3ffb554 100644 --- a/docs/getting_started/porting-guide.rst +++ b/docs/getting_started/porting-guide.rst @@ -574,6 +574,68 @@ optionally be defined: PLAT_PARTITION_BLOCK_SIZE := 4096 $(eval $(call add_define,PLAT_PARTITION_BLOCK_SIZE)) +If the platform port uses the Arm® Ethos™-N NPU driver, the following +configuration must be performed: + +- The NPU SiP service handler must be hooked up. This consists of both the + initial setup (``ethosn_smc_setup``) and the handler itself + (``ethosn_smc_handler``) + +If the platform port uses the Arm® Ethos™-N NPU driver with TZMP1 support +enabled, the following constants and configuration must also be defined: + +- **ARM_ETHOSN_NPU_PROT_FW_NSAID** + + Defines the Non-secure Access IDentity (NSAID) that the NPU shall use to + access the protected memory that contains the NPU's firmware. + +- **ARM_ETHOSN_NPU_PROT_DATA_RW_NSAID** + + Defines the Non-secure Access IDentity (NSAID) that the NPU shall use for + read/write access to the protected memory that contains inference data. + +- **ARM_ETHOSN_NPU_PROT_DATA_RO_NSAID** + + Defines the Non-secure Access IDentity (NSAID) that the NPU shall use for + read-only access to the protected memory that contains inference data. + +- **ARM_ETHOSN_NPU_NS_RW_DATA_NSAID** + + Defines the Non-secure Access IDentity (NSAID) that the NPU shall use for + read/write access to the non-protected memory. + +- **ARM_ETHOSN_NPU_NS_RO_DATA_NSAID** + + Defines the Non-secure Access IDentity (NSAID) that the NPU shall use for + read-only access to the non-protected memory. + +- **ARM_ETHOSN_NPU_FW_IMAGE_BASE** and **ARM_ETHOSN_NPU_FW_IMAGE_LIMIT** + + Defines the physical address range that the NPU's firmware will be loaded + into and executed from. + +- Configure the platforms TrustZone Controller (TZC) with appropriate regions + of protected memory. At minimum this must include a region for the NPU's + firmware code and a region for protected inference data, and these must be + accessible using the NSAIDs defined above. + +- Include the NPU firmware and certificates in the FIP. + +- Provide FCONF entries to configure the image source for the NPU firmware + and certificates. + +- Add MMU mappings such that: + + - BL2 can write the NPU firmware into the region defined by + ``ARM_ETHOSN_NPU_FW_IMAGE_BASE`` and ``ARM_ETHOSN_NPU_FW_IMAGE_LIMIT`` + - BL31 (SiP service) can read the NPU firmware from the same region + +- Add the firmware image ID ``ARM_ETHOSN_NPU_FW_IMAGE_ID`` to the list of images + loaded by BL2. + +Please see the reference implementation code for the Juno platform as an example. + + The following constant is optional. It should be defined to override the default behaviour of the ``assert()`` function (for example, to save memory). diff --git a/docs/plat/arm/arm-build-options.rst b/docs/plat/arm/arm-build-options.rst index 68eb3ecd6..e7e7ee703 100644 --- a/docs/plat/arm/arm-build-options.rst +++ b/docs/plat/arm/arm-build-options.rst @@ -101,6 +101,14 @@ Arm Platform Build Options the Arm Juno platform has this included in its ``HW_CONFIG`` and the platform only loads the ``HW_CONFIG`` in AArch64 builds. Default is 0. +- ``ARM_ETHOSN_NPU_TZMP1``: boolean option to enable TZMP1 support for the + Arm® Ethos™-N NPU. Requires ``ARM_ETHOSN_NPU_DRIVER`` and + ``TRUSTED_BOARD_BOOT`` to be enabled. + +- ``ARM_ETHOSN_NPU_FW``: location of the NPU firmware binary + (```ethosn.bin```). This firmware image will be included in the FIP and + loaded at runtime. + - ``ARM_SPMC_MANIFEST_DTS`` : path to an alternate manifest file used as the SPMC Core manifest. Valid when ``SPD=spmd`` is selected. @@ -165,4 +173,4 @@ Arm CSS Platform-Specific Build Options .. |FIP in a GPT image| image:: ../../resources/diagrams/FIP_in_a_GPT_image.png -*Copyright (c) 2019-2021, Arm Limited. All rights reserved.* +*Copyright (c) 2019-2023, Arm Limited. All rights reserved.* |