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