Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 1 | ############################### |
| 2 | Details for the platform folder |
| 3 | ############################### |
| 4 | |
| 5 | .. Warning:: |
| 6 | |
| 7 | This folder and subfolders, especially the target folder, are likely to be |
| 8 | refactored and updated to improve the overall structure of dependencies. |
| 9 | |
Miklos Balint | c7b1b6c | 2019-04-24 12:38:36 +0200 | [diff] [blame] | 10 | ********************* |
| 11 | Interfacing with TF-M |
| 12 | ********************* |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 13 | |
| 14 | platformext/target/tfm_peripherals_def.h |
| 15 | ======================================== |
| 16 | This file should enumerate the hardware peripherals that are available for TF-M |
| 17 | on the platform. The name of the peripheral used by a service is set in its |
| 18 | manifest file. The platform have to provide a macro for each of the provided |
| 19 | peripherals, that is substituted to a pointer to type |
| 20 | ``struct tfm_spm_partition_platform_data_t``. The memory that the pointer points |
| 21 | to is allocated by the platform code. The pointer gets stored in the partitions |
| 22 | database in SPM, and it is provided to the SPM HAL functions. |
| 23 | |
| 24 | Peripherals currently used by the services in TF-M |
| 25 | -------------------------------------------------- |
| 26 | - ``TFM_PERIPHERAL_FPGA_IO`` - FPGA system control and I/O |
| 27 | - ``TFM_PERIPHERAL_UART1``- UART1 |
| 28 | |
| 29 | .. Note:: |
| 30 | |
| 31 | If a platform doesn't support a peripheral, that is used by a service, then |
| 32 | the service cannot be used on the given platform. Using a peripheral in |
| 33 | TF-M that is not supported by the platform results in compile error. |
| 34 | |
| 35 | platform/include/tfm_spm_hal.h |
| 36 | ============================== |
| 37 | This file contains the declarations of functions that a platform implementation |
Miklos Balint | c7b1b6c | 2019-04-24 12:38:36 +0200 | [diff] [blame] | 38 | has to provide for TF-M's SPM. For details see the comments in the file. |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 39 | |
Ken Liu | b8ed8ba | 2019-07-09 12:52:08 +0800 | [diff] [blame] | 40 | secure_fw/core/include/tfm_platform_core_api.h |
| 41 | ============================================== |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 42 | This file contains declarations of functions that can be or have to be called |
| 43 | from platform implementations. For details see the comments in the file. |
| 44 | |
Miklos Balint | c7b1b6c | 2019-04-24 12:38:36 +0200 | [diff] [blame] | 45 | platform/include/tfm_platform_system.h |
| 46 | ====================================== |
| 47 | This file contains the declarations of functions that a platform implementation |
| 48 | has to provide for TF-M's Platform Service. For details see |
| 49 | ``docs/user_guides/services/tfm_platform_integration_guide.rst`` |
| 50 | |
Mate Toth-Pal | e50af97 | 2019-11-22 07:42:44 +0100 | [diff] [blame^] | 51 | ***************************** |
| 52 | Debug authentication settings |
| 53 | ***************************** |
| 54 | |
| 55 | A platform may provide the option to configure debug authentication. TF-M core |
| 56 | calls the HAL function ``enum tfm_plat_err_t tfm_spm_hal_init_debug(void)`` |
| 57 | which configures debug authentication based on the following defines: |
| 58 | |
| 59 | - `DAUTH_NONE`: Debugging the system is not enabled. |
| 60 | - `DAUTH_NS_ONLY`: Invasive and non invasive debugging of non-secure code is |
| 61 | enabled. |
| 62 | - `DAUTH_FULL`: Invasive and non-invasive debugging of non-secure and secure |
| 63 | code is enabled. |
| 64 | - `DAUTH_CHIP_DEFAULT`: The debug authentication options are used that are set |
| 65 | by the chip vendor. |
| 66 | |
| 67 | The desired debug authentication configuration can be selected by setting one of |
| 68 | the options above to the cmake command with the |
| 69 | `-DDEBUG_AUTHENTICATION="<define>"` option. The default value of |
| 70 | `DEBUG_AUTHENTICATION` is `DAUTH_CHIP_DEFAULT`. |
| 71 | |
| 72 | .. Note:: |
| 73 | ``enum tfm_plat_err_t tfm_spm_hal_init_debug(void)`` is called during the |
| 74 | TF-M core initialisation phase, before initialising secure partition. This |
| 75 | means that BL2 runs with the chip default setting. |
| 76 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 77 | *********** |
| 78 | Sub-folders |
| 79 | *********** |
| 80 | |
| 81 | include |
| 82 | ======= |
| 83 | This folder contains the interfaces that TF-M expects every target to provide. |
| 84 | The code in this folder is created as a part of the TF-M project therefore it |
| 85 | adheres to the BSD 3.0 license. |
| 86 | |
| 87 | ext |
| 88 | === |
| 89 | This folder contains code that has been imported from other projects so it may |
| 90 | have licenses other than the BSD 3.0 used by the TF-M project. |
| 91 | |
| 92 | Please see the :doc:`readme file the ext folder <ext/readme>` for details. |
| 93 | |
| 94 | -------------- |
| 95 | |
Mate Toth-Pal | e50af97 | 2019-11-22 07:42:44 +0100 | [diff] [blame^] | 96 | *Copyright (c) 2017-2020, Arm Limited. All rights reserved.* |