blob: f9d48a5ac2c4bf6718b1585c77795d1be563b157 [file] [log] [blame]
Gyorgy Szingdb9783c2019-04-17 21:08:48 +02001###############################
2Details 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 Balintc7b1b6c2019-04-24 12:38:36 +020010*********************
11Interfacing with TF-M
12*********************
Gyorgy Szingdb9783c2019-04-17 21:08:48 +020013
14platformext/target/tfm_peripherals_def.h
15========================================
16This file should enumerate the hardware peripherals that are available for TF-M
17on the platform. The name of the peripheral used by a service is set in its
18manifest file. The platform have to provide a macro for each of the provided
19peripherals, that is substituted to a pointer to type
20``struct tfm_spm_partition_platform_data_t``. The memory that the pointer points
21to is allocated by the platform code. The pointer gets stored in the partitions
22database in SPM, and it is provided to the SPM HAL functions.
23
24Peripherals 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
35platform/include/tfm_spm_hal.h
36==============================
37This file contains the declarations of functions that a platform implementation
Miklos Balintc7b1b6c2019-04-24 12:38:36 +020038has to provide for TF-M's SPM. For details see the comments in the file.
Gyorgy Szingdb9783c2019-04-17 21:08:48 +020039
Ken Liub8ed8ba2019-07-09 12:52:08 +080040secure_fw/core/include/tfm_platform_core_api.h
41==============================================
Gyorgy Szingdb9783c2019-04-17 21:08:48 +020042This file contains declarations of functions that can be or have to be called
43from platform implementations. For details see the comments in the file.
44
Miklos Balintc7b1b6c2019-04-24 12:38:36 +020045platform/include/tfm_platform_system.h
46======================================
47This file contains the declarations of functions that a platform implementation
48has to provide for TF-M's Platform Service. For details see
49``docs/user_guides/services/tfm_platform_integration_guide.rst``
50
Mate Toth-Pale50af972019-11-22 07:42:44 +010051*****************************
52Debug authentication settings
53*****************************
54
55A platform may provide the option to configure debug authentication. TF-M core
56calls the HAL function ``enum tfm_plat_err_t tfm_spm_hal_init_debug(void)``
57which 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
67The desired debug authentication configuration can be selected by setting one of
68the 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 Szingdb9783c2019-04-17 21:08:48 +020077***********
78Sub-folders
79***********
80
81include
82=======
83This folder contains the interfaces that TF-M expects every target to provide.
84The code in this folder is created as a part of the TF-M project therefore it
85adheres to the BSD 3.0 license.
86
87ext
88===
89This folder contains code that has been imported from other projects so it may
90have licenses other than the BSD 3.0 used by the TF-M project.
91
92Please see the :doc:`readme file the ext folder <ext/readme>` for details.
93
94--------------
95
Mate Toth-Pale50af972019-11-22 07:42:44 +010096*Copyright (c) 2017-2020, Arm Limited. All rights reserved.*