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