xref: /aosp_15_r20/external/arm-trusted-firmware/docs/plat/arm/arm-build-options.rst (revision 54fd6939e177f8ff529b10183254802c76df6d08)
1*54fd6939SJiyong ParkArm Development Platform Build Options
2*54fd6939SJiyong Park======================================
3*54fd6939SJiyong Park
4*54fd6939SJiyong ParkArm Platform Build Options
5*54fd6939SJiyong Park--------------------------
6*54fd6939SJiyong Park
7*54fd6939SJiyong Park-  ``ARM_BL31_IN_DRAM``: Boolean option to select loading of BL31 in TZC secured
8*54fd6939SJiyong Park   DRAM. By default, BL31 is in the secure SRAM. Set this flag to 1 to load
9*54fd6939SJiyong Park   BL31 in TZC secured DRAM. If TSP is present, then setting this option also
10*54fd6939SJiyong Park   sets the TSP location to DRAM and ignores the ``ARM_TSP_RAM_LOCATION`` build
11*54fd6939SJiyong Park   flag.
12*54fd6939SJiyong Park
13*54fd6939SJiyong Park-  ``ARM_CONFIG_CNTACR``: boolean option to unlock access to the ``CNTBase<N>``
14*54fd6939SJiyong Park   frame registers by setting the ``CNTCTLBase.CNTACR<N>`` register bits. The
15*54fd6939SJiyong Park   frame number ``<N>`` is defined by ``PLAT_ARM_NSTIMER_FRAME_ID``, which
16*54fd6939SJiyong Park   should match the frame used by the Non-Secure image (normally the Linux
17*54fd6939SJiyong Park   kernel). Default is true (access to the frame is allowed).
18*54fd6939SJiyong Park
19*54fd6939SJiyong Park-  ``ARM_DISABLE_TRUSTED_WDOG``: boolean option to disable the Trusted Watchdog.
20*54fd6939SJiyong Park   By default, Arm platforms use a watchdog to trigger a system reset in case
21*54fd6939SJiyong Park   an error is encountered during the boot process (for example, when an image
22*54fd6939SJiyong Park   could not be loaded or authenticated). The watchdog is enabled in the early
23*54fd6939SJiyong Park   platform setup hook at BL1 and disabled in the BL1 prepare exit hook. The
24*54fd6939SJiyong Park   Trusted Watchdog may be disabled at build time for testing or development
25*54fd6939SJiyong Park   purposes.
26*54fd6939SJiyong Park
27*54fd6939SJiyong Park-  ``ARM_LINUX_KERNEL_AS_BL33``: The Linux kernel expects registers x0-x3 to
28*54fd6939SJiyong Park   have specific values at boot. This boolean option allows the Trusted Firmware
29*54fd6939SJiyong Park   to have a Linux kernel image as BL33 by preparing the registers to these
30*54fd6939SJiyong Park   values before jumping to BL33. This option defaults to 0 (disabled). For
31*54fd6939SJiyong Park   AArch64 ``RESET_TO_BL31`` and for AArch32 ``RESET_TO_SP_MIN`` must be 1 when
32*54fd6939SJiyong Park   using it. If this option is set to 1, ``ARM_PRELOADED_DTB_BASE`` must be set
33*54fd6939SJiyong Park   to the location of a device tree blob (DTB) already loaded in memory. The
34*54fd6939SJiyong Park   Linux Image address must be specified using the ``PRELOADED_BL33_BASE``
35*54fd6939SJiyong Park   option.
36*54fd6939SJiyong Park
37*54fd6939SJiyong Park-  ``ARM_PLAT_MT``: This flag determines whether the Arm platform layer has to
38*54fd6939SJiyong Park   cater for the multi-threading ``MT`` bit when accessing MPIDR. When this flag
39*54fd6939SJiyong Park   is set, the functions which deal with MPIDR assume that the ``MT`` bit in
40*54fd6939SJiyong Park   MPIDR is set and access the bit-fields in MPIDR accordingly. Default value of
41*54fd6939SJiyong Park   this flag is 0. Note that this option is not used on FVP platforms.
42*54fd6939SJiyong Park
43*54fd6939SJiyong Park-  ``ARM_RECOM_STATE_ID_ENC``: The PSCI1.0 specification recommends an encoding
44*54fd6939SJiyong Park   for the construction of composite state-ID in the power-state parameter.
45*54fd6939SJiyong Park   The existing PSCI clients currently do not support this encoding of
46*54fd6939SJiyong Park   State-ID yet. Hence this flag is used to configure whether to use the
47*54fd6939SJiyong Park   recommended State-ID encoding or not. The default value of this flag is 0,
48*54fd6939SJiyong Park   in which case the platform is configured to expect NULL in the State-ID
49*54fd6939SJiyong Park   field of power-state parameter.
50*54fd6939SJiyong Park
51*54fd6939SJiyong Park-  ``ARM_ROTPK_LOCATION``: used when ``TRUSTED_BOARD_BOOT=1``. It specifies the
52*54fd6939SJiyong Park   location of the ROTPK hash returned by the function ``plat_get_rotpk_info()``
53*54fd6939SJiyong Park   for Arm platforms. Depending on the selected option, the proper private key
54*54fd6939SJiyong Park   must be specified using the ``ROT_KEY`` option when building the Trusted
55*54fd6939SJiyong Park   Firmware. This private key will be used by the certificate generation tool
56*54fd6939SJiyong Park   to sign the BL2 and Trusted Key certificates. Available options for
57*54fd6939SJiyong Park   ``ARM_ROTPK_LOCATION`` are:
58*54fd6939SJiyong Park
59*54fd6939SJiyong Park   -  ``regs`` : return the ROTPK hash stored in the Trusted root-key storage
60*54fd6939SJiyong Park      registers.
61*54fd6939SJiyong Park   -  ``devel_rsa`` : return a development public key hash embedded in the BL1
62*54fd6939SJiyong Park      and BL2 binaries. This hash has been obtained from the RSA public key
63*54fd6939SJiyong Park      ``arm_rotpk_rsa.der``, located in ``plat/arm/board/common/rotpk``. To use
64*54fd6939SJiyong Park      this option, ``arm_rotprivk_rsa.pem`` must be specified as ``ROT_KEY``
65*54fd6939SJiyong Park      when creating the certificates.
66*54fd6939SJiyong Park   -  ``devel_ecdsa`` : return a development public key hash embedded in the BL1
67*54fd6939SJiyong Park      and BL2 binaries. This hash has been obtained from the ECDSA public key
68*54fd6939SJiyong Park      ``arm_rotpk_ecdsa.der``, located in ``plat/arm/board/common/rotpk``. To
69*54fd6939SJiyong Park      use this option, ``arm_rotprivk_ecdsa.pem`` must be specified as
70*54fd6939SJiyong Park      ``ROT_KEY`` when creating the certificates.
71*54fd6939SJiyong Park
72*54fd6939SJiyong Park-  ``ARM_ROTPK_HASH``: used when ``ARM_ROTPK_LOCATION=devel_*``. Specifies the
73*54fd6939SJiyong Park   location of the ROTPK hash. Not expected to be a build option. This defaults to
74*54fd6939SJiyong Park   ``plat/arm/board/common/rotpk/*_sha256.bin`` depending on the specified algorithm.
75*54fd6939SJiyong Park   Providing ``ROT_KEY`` enforces generation of the hash from the ``ROT_KEY`` and
76*54fd6939SJiyong Park   overwrites the default hash file.
77*54fd6939SJiyong Park
78*54fd6939SJiyong Park-  ``ARM_TSP_RAM_LOCATION``: location of the TSP binary. Options:
79*54fd6939SJiyong Park
80*54fd6939SJiyong Park   -  ``tsram`` : Trusted SRAM (default option when TBB is not enabled)
81*54fd6939SJiyong Park   -  ``tdram`` : Trusted DRAM (if available)
82*54fd6939SJiyong Park   -  ``dram`` : Secure region in DRAM (default option when TBB is enabled,
83*54fd6939SJiyong Park      configured by the TrustZone controller)
84*54fd6939SJiyong Park
85*54fd6939SJiyong Park-  ``ARM_XLAT_TABLES_LIB_V1``: boolean option to compile TF-A with version 1
86*54fd6939SJiyong Park   of the translation tables library instead of version 2. It is set to 0 by
87*54fd6939SJiyong Park   default, which selects version 2.
88*54fd6939SJiyong Park
89*54fd6939SJiyong Park-  ``ARM_CRYPTOCELL_INTEG`` : bool option to enable TF-A to invoke Arm®
90*54fd6939SJiyong Park   TrustZone® CryptoCell functionality for Trusted Board Boot on capable Arm
91*54fd6939SJiyong Park   platforms. If this option is specified, then the path to the CryptoCell
92*54fd6939SJiyong Park   SBROM library must be specified via ``CCSBROM_LIB_PATH`` flag.
93*54fd6939SJiyong Park
94*54fd6939SJiyong Park-  ``ARM_ETHOSN_NPU_DRIVER``: boolean option to enable a SiP service that can
95*54fd6939SJiyong Park   configure an Arm Ethos-N NPU. To use this service the target platform's
96*54fd6939SJiyong Park   ``HW_CONFIG`` must include the device tree nodes for the NPU. Currently, only
97*54fd6939SJiyong Park   the Arm Juno platform has this included in its ``HW_CONFIG`` and the platform
98*54fd6939SJiyong Park   only loads the ``HW_CONFIG`` in AArch64 builds. Default is 0.
99*54fd6939SJiyong Park
100*54fd6939SJiyong Park-  ``ARM_SPMC_MANIFEST_DTS`` : path to an alternate manifest file used as the
101*54fd6939SJiyong Park   SPMC Core manifest. Valid when ``SPD=spmd`` is selected.
102*54fd6939SJiyong Park
103*54fd6939SJiyong Park-  ``ARM_BL2_SP_LIST_DTS``: Path to DTS file snippet to override the hardcoded
104*54fd6939SJiyong Park   SP nodes in tb_fw_config.
105*54fd6939SJiyong Park
106*54fd6939SJiyong Park-  ``OPTEE_SP_FW_CONFIG``: DTC build flag to include OP-TEE as SP in tb_fw_config
107*54fd6939SJiyong Park   device tree. This flag is defined only when ``ARM_SPMC_MANIFEST_DTS`` manifest
108*54fd6939SJiyong Park   file name contains pattern optee_sp.
109*54fd6939SJiyong Park
110*54fd6939SJiyong Park-  ``TS_SP_FW_CONFIG``: DTC build flag to include Trusted Services (Crypto and
111*54fd6939SJiyong Park   internal-trusted-storage) as SP in tb_fw_config device tree.
112*54fd6939SJiyong Park
113*54fd6939SJiyong Park-  ``ARM_GPT_SUPPORT``: Enable GPT parser to get the entry address and length of
114*54fd6939SJiyong Park   the various partitions present in the GPT image. This support is available
115*54fd6939SJiyong Park   only for the BL2 component, and it is disabled by default.
116*54fd6939SJiyong Park   The following diagram shows the view of the FIP partition inside the GPT
117*54fd6939SJiyong Park   image:
118*54fd6939SJiyong Park
119*54fd6939SJiyong Park   |FIP in a GPT image|
120*54fd6939SJiyong Park
121*54fd6939SJiyong ParkFor a better understanding of these options, the Arm development platform memory
122*54fd6939SJiyong Parkmap is explained in the :ref:`Firmware Design`.
123*54fd6939SJiyong Park
124*54fd6939SJiyong Park.. _build_options_arm_css_platform:
125*54fd6939SJiyong Park
126*54fd6939SJiyong ParkArm CSS Platform-Specific Build Options
127*54fd6939SJiyong Park---------------------------------------
128*54fd6939SJiyong Park
129*54fd6939SJiyong Park-  ``CSS_DETECT_PRE_1_7_0_SCP``: Boolean flag to detect SCP version
130*54fd6939SJiyong Park   incompatibility. Version 1.7.0 of the SCP firmware made a non-backwards
131*54fd6939SJiyong Park   compatible change to the MTL protocol, used for AP/SCP communication.
132*54fd6939SJiyong Park   TF-A no longer supports earlier SCP versions. If this option is set to 1
133*54fd6939SJiyong Park   then TF-A will detect if an earlier version is in use. Default is 1.
134*54fd6939SJiyong Park
135*54fd6939SJiyong Park-  ``CSS_LOAD_SCP_IMAGES``: Boolean flag, which when set, adds SCP_BL2 and
136*54fd6939SJiyong Park   SCP_BL2U to the FIP and FWU_FIP respectively, and enables them to be loaded
137*54fd6939SJiyong Park   during boot. Default is 1.
138*54fd6939SJiyong Park
139*54fd6939SJiyong Park-  ``CSS_USE_SCMI_SDS_DRIVER``: Boolean flag which selects SCMI/SDS drivers
140*54fd6939SJiyong Park   instead of SCPI/BOM driver for communicating with the SCP during power
141*54fd6939SJiyong Park   management operations and for SCP RAM Firmware transfer. If this option
142*54fd6939SJiyong Park   is set to 1, then SCMI/SDS drivers will be used. Default is 0.
143*54fd6939SJiyong Park
144*54fd6939SJiyong Park - ``CSS_SGI_CHIP_COUNT``: Configures the number of chips on a SGI/RD platform
145*54fd6939SJiyong Park   which supports multi-chip operation. If ``CSS_SGI_CHIP_COUNT`` is set to any
146*54fd6939SJiyong Park   valid value greater than 1, the platform code performs required configuration
147*54fd6939SJiyong Park   to support multi-chip operation.
148*54fd6939SJiyong Park
149*54fd6939SJiyong Park- ``CSS_SGI_PLATFORM_VARIANT``: Selects the variant of a SGI/RD platform. A
150*54fd6939SJiyong Park    particular SGI/RD platform may have multiple variants which may differ in
151*54fd6939SJiyong Park    core count, cluster count or other peripherals. This build option is used
152*54fd6939SJiyong Park    to select the appropriate platform variant for the build. The range of
153*54fd6939SJiyong Park    valid values is platform specific.
154*54fd6939SJiyong Park
155*54fd6939SJiyong Park--------------
156*54fd6939SJiyong Park
157*54fd6939SJiyong Park.. |FIP in a GPT image| image:: ../../resources/diagrams/FIP_in_a_GPT_image.png
158*54fd6939SJiyong Park
159*54fd6939SJiyong Park*Copyright (c) 2019-2021, Arm Limited. All rights reserved.*
160