blob: 550e64c930be981bdb274342662ab753ae56408f [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--------------------------------------------------
Gyorgy Szingdb9783c2019-04-17 21:08:48 +020021- ``TFM_PERIPHERAL_UART1``- UART1
22
23.. Note::
24
25 If a platform doesn't support a peripheral, that is used by a service, then
26 the service cannot be used on the given platform. Using a peripheral in
27 TF-M that is not supported by the platform results in compile error.
28
29platform/include/tfm_spm_hal.h
30==============================
31This file contains the declarations of functions that a platform implementation
Miklos Balintc7b1b6c2019-04-24 12:38:36 +020032has to provide for TF-M's SPM. For details see the comments in the file.
Gyorgy Szingdb9783c2019-04-17 21:08:48 +020033
Ken Liub8ed8ba2019-07-09 12:52:08 +080034secure_fw/core/include/tfm_platform_core_api.h
35==============================================
Gyorgy Szingdb9783c2019-04-17 21:08:48 +020036This file contains declarations of functions that can be or have to be called
37from platform implementations. For details see the comments in the file.
38
Miklos Balintc7b1b6c2019-04-24 12:38:36 +020039platform/include/tfm_platform_system.h
40======================================
41This file contains the declarations of functions that a platform implementation
42has to provide for TF-M's Platform Service. For details see
43``docs/user_guides/services/tfm_platform_integration_guide.rst``
44
Jamie Foxcdfb6cd2020-09-21 21:21:30 +010045**************
46System Startup
47**************
48
49Before calling ``main()``, platform startup code should initialise all system
50clocks, perform runtime initialisation and other steps such as setting the
51vector table. Configuration of the following features is optional as TF-M
52architecture code will check and initialise them:
53
54 - The Security Extension.
55 - The Floating-point Extension.
56
Mate Toth-Pale50af972019-11-22 07:42:44 +010057*****************************
58Debug authentication settings
59*****************************
60
61A platform may provide the option to configure debug authentication. TF-M core
Kevin Pengab8fa292021-09-15 15:46:22 +080062calls the HAL function ``enum tfm_hal_status_t tfm_hal_platform_init(void)``
63in which debug authentication is configured based on the following defines:
Mate Toth-Pale50af972019-11-22 07:42:44 +010064
65 - `DAUTH_NONE`: Debugging the system is not enabled.
66 - `DAUTH_NS_ONLY`: Invasive and non invasive debugging of non-secure code is
67 enabled.
68 - `DAUTH_FULL`: Invasive and non-invasive debugging of non-secure and secure
69 code is enabled.
70 - `DAUTH_CHIP_DEFAULT`: The debug authentication options are used that are set
71 by the chip vendor.
72
73The desired debug authentication configuration can be selected by setting one of
74the options above to the cmake command with the
75`-DDEBUG_AUTHENTICATION="<define>"` option. The default value of
76`DEBUG_AUTHENTICATION` is `DAUTH_CHIP_DEFAULT`.
77
78.. Note::
Kevin Pengab8fa292021-09-15 15:46:22 +080079 ``enum tfm_hal_status_t tfm_hal_platform_init(void)`` is called during the
Mate Toth-Pale50af972019-11-22 07:42:44 +010080 TF-M core initialisation phase, before initialising secure partition. This
81 means that BL2 runs with the chip default setting.
82
Gyorgy Szingdb9783c2019-04-17 21:08:48 +020083***********
84Sub-folders
85***********
86
87include
88=======
89This folder contains the interfaces that TF-M expects every target to provide.
90The code in this folder is created as a part of the TF-M project therefore it
91adheres to the BSD 3.0 license.
92
93ext
94===
95This folder contains code that has been imported from other projects so it may
96have licenses other than the BSD 3.0 used by the TF-M project.
97
98Please see the :doc:`readme file the ext folder <ext/readme>` for details.
99
100--------------
101
Mate Toth-Pale50af972019-11-22 07:42:44 +0100102*Copyright (c) 2017-2020, Arm Limited. All rights reserved.*