blob: b3290d65ec47a7b77ef2410c1ebdb92d1d37d42e [file] [log] [blame]
Gyorgy Szingdb9783c2019-04-17 21:08:48 +02001###############################
2Details for the platform folder
3###############################
4
Miklos Balintc7b1b6c2019-04-24 12:38:36 +02005*********************
6Interfacing with TF-M
7*********************
Gyorgy Szingdb9783c2019-04-17 21:08:48 +02008
Minos Galanakisfc6804e2020-03-10 11:03:34 +00009platform/ext/target/tfm_peripherals_def.h
10=========================================
Gyorgy Szingdb9783c2019-04-17 21:08:48 +020011This file should enumerate the hardware peripherals that are available for TF-M
12on the platform. The name of the peripheral used by a service is set in its
13manifest file. The platform have to provide a macro for each of the provided
14peripherals, that is substituted to a pointer to type
15``struct tfm_spm_partition_platform_data_t``. The memory that the pointer points
16to is allocated by the platform code. The pointer gets stored in the partitions
17database in SPM, and it is provided to the SPM HAL functions.
18
19Peripherals 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
30platform/include/tfm_spm_hal.h
31==============================
32This file contains the declarations of functions that a platform implementation
Miklos Balintc7b1b6c2019-04-24 12:38:36 +020033has to provide for TF-M's SPM. For details see the comments in the file.
Gyorgy Szingdb9783c2019-04-17 21:08:48 +020034
Ken Liub8ed8ba2019-07-09 12:52:08 +080035secure_fw/core/include/tfm_platform_core_api.h
36==============================================
Gyorgy Szingdb9783c2019-04-17 21:08:48 +020037This file contains declarations of functions that can be or have to be called
38from platform implementations. For details see the comments in the file.
39
Miklos Balintc7b1b6c2019-04-24 12:38:36 +020040platform/include/tfm_platform_system.h
41======================================
42This file contains the declarations of functions that a platform implementation
43has to provide for TF-M's Platform Service. For details see
44``docs/user_guides/services/tfm_platform_integration_guide.rst``
45
Mate Toth-Pale50af972019-11-22 07:42:44 +010046*****************************
47Debug authentication settings
48*****************************
49
50A platform may provide the option to configure debug authentication. TF-M core
51calls the HAL function ``enum tfm_plat_err_t tfm_spm_hal_init_debug(void)``
52which configures debug authentication based on the following defines:
53
54 - `DAUTH_NONE`: Debugging the system is not enabled.
55 - `DAUTH_NS_ONLY`: Invasive and non invasive debugging of non-secure code is
56 enabled.
57 - `DAUTH_FULL`: Invasive and non-invasive debugging of non-secure and secure
58 code is enabled.
59 - `DAUTH_CHIP_DEFAULT`: The debug authentication options are used that are set
60 by the chip vendor.
61
62The desired debug authentication configuration can be selected by setting one of
63the options above to the cmake command with the
64`-DDEBUG_AUTHENTICATION="<define>"` option. The default value of
65`DEBUG_AUTHENTICATION` is `DAUTH_CHIP_DEFAULT`.
66
67.. Note::
68 ``enum tfm_plat_err_t tfm_spm_hal_init_debug(void)`` is called during the
69 TF-M core initialisation phase, before initialising secure partition. This
70 means that BL2 runs with the chip default setting.
71
Gyorgy Szingdb9783c2019-04-17 21:08:48 +020072***********
73Sub-folders
74***********
75
76include
77=======
78This folder contains the interfaces that TF-M expects every target to provide.
79The code in this folder is created as a part of the TF-M project therefore it
80adheres to the BSD 3.0 license.
81
82ext
83===
84This folder contains code that has been imported from other projects so it may
85have licenses other than the BSD 3.0 used by the TF-M project.
86
87Please see the :doc:`readme file the ext folder <ext/readme>` for details.
88
89--------------
90
Mate Toth-Pale50af972019-11-22 07:42:44 +010091*Copyright (c) 2017-2020, Arm Limited. All rights reserved.*