blob: 4919205c9dadf44289ea8a8cd5ba2a3085c4d499 [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
Ken Liu172f1e32021-02-05 16:31:03 +080015``struct platform_data_t``. The memory that the pointer points
Gyorgy Szingdb9783c2019-04-17 21:08:48 +020016to 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
Jamie Foxcdfb6cd2020-09-21 21:21:30 +010046**************
47System Startup
48**************
49
50Before calling ``main()``, platform startup code should initialise all system
51clocks, perform runtime initialisation and other steps such as setting the
52vector table. Configuration of the following features is optional as TF-M
53architecture code will check and initialise them:
54
55 - The Security Extension.
56 - The Floating-point Extension.
57
Mate Toth-Pale50af972019-11-22 07:42:44 +010058*****************************
59Debug authentication settings
60*****************************
61
62A platform may provide the option to configure debug authentication. TF-M core
63calls the HAL function ``enum tfm_plat_err_t tfm_spm_hal_init_debug(void)``
64which 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
74The desired debug authentication configuration can be selected by setting one of
75the 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 Szingdb9783c2019-04-17 21:08:48 +020084***********
85Sub-folders
86***********
87
88include
89=======
90This folder contains the interfaces that TF-M expects every target to provide.
91The code in this folder is created as a part of the TF-M project therefore it
92adheres to the BSD 3.0 license.
93
94ext
95===
96This folder contains code that has been imported from other projects so it may
97have licenses other than the BSD 3.0 used by the TF-M project.
98
99Please see the :doc:`readme file the ext folder <ext/readme>` for details.
100
101--------------
102
Mate Toth-Pale50af972019-11-22 07:42:44 +0100103*Copyright (c) 2017-2020, Arm Limited. All rights reserved.*