Commit graph

14075 commits

Author SHA1 Message Date
Olivier Deprez
9f9b4814c5 Merge "fix(marvell-tools): include mbedtls/version.h before use" into integration 2024-01-23 10:55:11 +01:00
Girisha Dengi
a773f4121b fix(intel): update nand driver to match GHRD design
Update nand driver to match GHRD design, fix row
address calculation method and other misc updates.

Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I1cb3dda43e767ba243fbe89bfa18818db321c5c2
2024-01-23 00:05:11 +08:00
Joanna Farley
1064bc6c8c Merge changes from topic "idling-during-subsystem-restart" into integration
* changes:
  fix(xilinx): add console_flush() before shutdown
  fix(xilinx): fix sending sgi to linux
  feat(xilinx): add new state to identify cpu power down
  feat(xilinx): request cpu power down from reset
  feat(xilinx): power down all cores on receiving cpu pwrdwn req
  feat(xilinx): add handler for power down req sgi irq
  feat(xilinx): add wrapper to handle cpu power down req
  fix(versal-net): use arm common GIC handlers
  fix(xilinx): rename macros to align with ARM
2024-01-22 16:12:02 +01:00
Joanna Farley
b7e85c7cee Merge "feat(versal): extend platform address space sizes" into integration 2024-01-22 16:07:46 +01:00
Joanna Farley
c0bf07e077 Merge "fix(xilinx): deprecate SiP service count query" into integration 2024-01-22 16:07:03 +01:00
Manish V Badarkhe
99f9aacd20 Merge "docs(threat-model): supply chain threat model TF-A" into integration 2024-01-22 14:45:17 +01:00
Sandrine Bailleux
2109aadd97 Merge "feat(rcar3): enable the stack protection" into integration 2024-01-22 14:31:45 +01:00
Olivier Deprez
81704f5d30 Merge "docs(security): security advisory for CVE-2023-49100" into integration 2024-01-22 10:41:55 +01:00
Xiong Yining
8b7dd8397d feat(qemu-sbsa): handle memory information
As a part of removing DeviceTree from EDK2, we move functions to TF-A:

- counting the number of memory nodes
- checking NUMA node id
- checking the memory address

Signed-off-by: Xiong Yining <xiongyining1480@phytium.com.cn>
Signed-off-by: Chen Baozi <chenbaozi@phytium.com.cn>
Change-Id: Ib7bce3a65c817a5b3bef6c9e0a459c7ce76c7e35
2024-01-22 02:54:47 +00:00
Hieu Nguyen
516a98ef27 feat(rcar3): update IPL and Secure Monitor Rev.4.0.0
Update the version to match release versioning scheme.
No functional change.

Signed-off-by: Hieu Nguyen <hieu.nguyen.dn@renesas.com>
Change-Id: Ib481fade925f74dbea1dd2b39c1abfab888379e4
2024-01-21 15:36:30 +01:00
Toshiyuki Ogasahara
7e06b06753 feat(rcar3): add cache operations to boot process
Add cache operations because BL2 disabled MMU at the end of the boot
process, but did not clean/invalidate for the cache used by MMU.

Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: Id4070b46103ca2b50788b3a99f6961a35df24418
2024-01-21 15:36:30 +01:00
Toshiyuki Ogasahara
5e8c2d8e23 feat(rcar3): change MMU configurations
Always enable MMU and control access protection.

Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: I4ac997cda2985746b2bf97ab9e4e5ace600f43ca
2024-01-21 15:36:30 +01:00
Toshiyuki Ogasahara
cfa466ab73 feat(rcar3): enable the stack protection
This commit changes ENABLE_STACK_PROTECTOR value to "strong" for
enabling the stack protector by canary.

Signed-off-by: Koichi Yamaguchi <koichi.yamaguchi.zb@hitachi.com>
Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: Ice351d23c98daf12737a5e65cef743035d62dabe
2024-01-21 15:36:29 +01:00
laurenw-arm
b908814c74 docs(threat-model): supply chain threat model TF-A
Software supply chain attacks aim to inject malicious code into a
software product. There are several ways a malicious code can be
injected into a software product (open-source project).

These include:
- Malicious code commits
- Malicious dependencies
- Malicious toolchains

This document provides analysis of software supply chain attack
threats for the TF-A project

Change-Id: I03545d65a38dc372f3868a16c725b7378640a771
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2024-01-19 14:50:24 -06:00
Lauren Wehrmeister
57410eebe6 Merge "docs(threat-model): add threat model for PSA FWU and TBBR FWU(recovery)" into integration 2024-01-19 21:39:59 +01:00
Madhukar Pappireddy
0ec25e386a Merge "fix(spm): silence warning in sp_mk_generator" into integration 2024-01-19 17:33:05 +01:00
Madhukar Pappireddy
5abc58be59 Merge changes from topic "kc/dir_msg_req2" into integration
* changes:
  feat(spmd): add FFA_MSG_SEND_DIR_RESP2
  feat(spmd): add FFA_MSG_SEND_DIR_REQ2
2024-01-19 16:22:19 +01:00
Manish Pandey
48461ec939 Merge "style(hooks): copyright year check as per author email" into integration 2024-01-19 14:29:52 +01:00
Akshay Belsare
93d1f4bc74 style(hooks): copyright year check as per author email
Add a check in pre-commit hook to check the
- copyright header is present for the authors organisation.
- the copyright year for the copyright header is updated.

The author email id is parsed to get the organization. Depending upon
the parsed info, the copyright header for the organization is checked
if its present in the file(s) or not.
If the copyright header is present in the file(s) then the copyright
year is checked.

If the copyright header is not present or the copyright year in the
header is not updated it is highlighted to the author
which the user then needs to incorporate in the change accordingly.

To enable this check, the case statement in
.husky/pre-commit.copyright needs to be modified to add the domain
from the email id and corresponding copyright header of the
organisation.

Change-Id: I4dedb68248b3dae997d887dd380155fe326d071d
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
2024-01-19 14:29:29 +01:00
Manish V Badarkhe
3d43bf5580 Merge changes from topic "cca_dtb" into integration
* changes:
  feat(arm): add COT_DESC_IN_DTB option for CCA CoT
  feat(fvp): add CCA CoT in DTB support
  docs(arm): update TBBR CoT dtsi file name in doc
  feat(dt-bindings): introduce CCA CoT, rename TBBR
2024-01-19 11:40:02 +01:00
Manish V Badarkhe
bb4d7d7195 docs(threat-model): add threat model for PSA FWU and TBBR FWU(recovery)
Added a threat model for PSA firmware update as well as TBBR FWU aka
firmware recovery.

Change-Id: I2396e13144076d7294f61f6817e1a8646225c6c2
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2024-01-19 10:23:36 +00:00
Sandrine Bailleux
51ff56e447 Merge "feat(intel): enable SDMMC frontdoor load for ATF->Linux" into integration 2024-01-19 11:08:14 +01:00
Sandrine Bailleux
b3a7396d0e Merge changes Iaa189c54,I8856b495 into integration
* changes:
  feat(intel): enable query of fip offset on RSU
  feat(intel): support query of fip offset using RSU
2024-01-19 10:44:29 +01:00
Sandrine Bailleux
781f9c52a6 Merge changes from topic "cca_dtb" into integration
* changes:
  docs(fconf): update bindings for multi-RoT CoTs
  feat(fconf): support signing-key in root cert node
2024-01-19 10:07:49 +01:00
laurenw-arm
b76a43c938 feat(arm): add COT_DESC_IN_DTB option for CCA CoT
Add support for BL2 to get the CCA chain of trust description
through the Firmware Configuration Framework (FCONF). This makes
it possible to export the part of the CCA chain of trust enforced
by BL2 in BL2's configuration file (TB_FW_CONFIG DTB file). BL2
will parse it when setting up the platform.

This feature can be enabled through the COT_DESC_IN_DTB=1 option.
The default behaviour (COT_DESC_IN_DTB=0) remains to hard-code
the CCA CoT into BL2 image.

Change-Id: Iec4f623d5e42b7c166beeb3ad6b35d918969f7e2
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2024-01-18 13:55:07 -06:00
laurenw-arm
4c79b86ed6 feat(fvp): add CCA CoT in DTB support
Adding support for CCA CoT in DTB. This makes it possible for BL2
to retrieve its chain of trust description from a configuration file
in DTB format. With this, the CoT description may be updated without
rebuilding BL2 image. This feature can be enabled by building BL2
with COT_DESC_IN_DTB=1 and COT=cca. The default behaviour remains to
embed the CoT description into BL2 image.

Change-Id: I5912aad5ae529281a93a76e6b8f4b89d867445fe
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2024-01-18 13:55:07 -06:00
laurenw-arm
dc35bd320c docs(arm): update TBBR CoT dtsi file name in doc
Change-Id: I31ebee7574f5133aadbf2767377fd74a21775ce5
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2024-01-18 13:55:07 -06:00
laurenw-arm
c4b35cebff feat(dt-bindings): introduce CCA CoT, rename TBBR
Add CCA CoT DTB and rename generic CoT DTB to TBBR CoT DTB

This allows CCA platforms to get their chain of trust description
from a configuration file, rather than hard-coding it into the
firmware itself.

Change-Id: I114788a5d21b9a8d625239cfb71b442d204e3654
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2024-01-18 13:54:57 -06:00
laurenw-arm
0de9a12c89 docs(fconf): update bindings for multi-RoT CoTs
Update CoT binding documentation to add the signing-key property
as optional in root-certificates and add rot_keys node

Change-Id: I1d1fbc0394275520cfa43213d5b7006e51990fdd
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2024-01-18 13:53:27 -06:00
Kathleen Capella
0651b7beb7 feat(spmd): add FFA_MSG_SEND_DIR_RESP2
Add handling for FF-A 1.2 FFA_MSG_SEND_DIR_RESP2 interface.

Signed-off-by: Kathleen Capella <kathleen.capella@arm.com>
Change-Id: Ibd0546ecd71d004804e6e18b27a4728a21259fa0
2024-01-18 14:44:50 -05:00
Kathleen Capella
cc6047b3de feat(spmd): add FFA_MSG_SEND_DIR_REQ2
Add handling for FF-A 1.2 FFA_MSG_SEND_DIR_REQ2 interface.
Handler validates security states of sender/receiver pairs
and forwards the call to other world if necessary.

Signed-off-by: Kathleen Capella <kathleen.capella@arm.com>
Change-Id: I02a60362d8d9a50fcc0b6a84753cba274ba5eb1b
2024-01-18 14:44:50 -05:00
laurenw-arm
04ac0b3c27 feat(fconf): support signing-key in root cert node
Until now we have only supported describing chain of trusts through the
CoT DTB with a single ROTPK so the signing key for root certificates was
implicit. Therefore signing key was not a supported property in the
root certificates node.

Now we want to extend that to describe CoTs with mulitiple roots of
trust so we need a way to specify for each root certificate with which
ROTPK it should be verified. For that, we reuse the 'signing-key'
property already in use for the non-root certificates, but we make it
optional for root certificates in single-RoT CoTs and for root
certificates signed with the default ROTPK in multi-RoT CoTs.

Change-Id: I41eb6579e8f1d01eaf10480fe5e224d2eed9c736
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2024-01-18 13:18:09 -06:00
Manish V Badarkhe
9653570e28 Merge "feat(memmap): add RELA section display" into integration 2024-01-18 19:19:56 +01:00
Manish Pandey
d1eb4e2377 docs(security): security advisory for CVE-2023-49100
Reported-by: Christian Lindenmeier <christian.lindenmeier@fau.de>
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I13fa93a65e5017dae6c837e88cd80bda72d4c2a3
2024-01-18 17:40:26 +00:00
Bipin Ravi
a5ea5aa441 Merge "docs(threat-model): provide PSR specification reference" into integration 2024-01-18 17:31:00 +01:00
Chris Kay
1685b42065 build: remove the NM variable
No part of the build system uses the `NM` variable, which is usually
used to dump symbol tables from compiled images. This change removes all
declarations of it.

Change-Id: I796ff365e6a7f97d21678f1c8cf8b59bfbb1ae9c
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-01-18 13:58:04 +00:00
Chris Kay
7e38758925 build: prefer gcc-ar over ar
The `gcc-ar` wrapper exists to make it easier to support LTO on some
versions of GCC. The two commands are compatible, accepting exactly the
same arguments, so this change moves us to `gcc-ar` to ensure that we
are configuring LTO correctly.

Change-Id: I24a4cfaad29d35b09f847299081f83ca9b41aa8a
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-01-18 13:58:03 +00:00
Chris Kay
86e489c190 build: add --no-warn-rwx-segments when linking with GCC
This flag is currently not included when linking with BFD via GCC.
Without it, builds can fail when linking via GCC.

Change-Id: Id37e05f6fb4eea4620861eb1bc8668c41f21ba20
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-01-18 13:58:03 +00:00
Chris Kay
7fc4d77808 build: always use the C compiler to assemble
The ROM library is the only component in the repository that compiles
assembly files using the assembler directly. This change migrates it to
the C compiler instead, like the rest of the project.

Change-Id: I6c50660eeb9be2ca8dcb0e626c37c197466b0fa1
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-01-18 13:58:03 +00:00
Chris Kay
781cb31439 build: always use the C compiler to preprocess
We're a bit inconsistent about which tool we use to preprocess source
files; in some places we use `$(CC) -E` whilst in others we use `cpp`.

This change forces all invocations of the C preprocessor to use the
first scheme, which ensures that the preprocessor behaves the same way
as the C compiler used when compiling C source files.

Change-Id: Iede2f25ff86ea8b43d7a523e32648058d5023832
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-01-18 13:58:03 +00:00
Chris Kay
e068a7ca86 fix(rcar): fix implicit rule invocations in tools
The `rzg_layout_create` and `rcar_layout_create` tools have a rule to
build object files from C files, but it depends on object files in the
parent directory when it should depend on object files in the current
directory. Consequently, the rule is not triggering and the implicit C
compilation rule is executed instead. This rule works, so I have
replaced the broken rule with exactly the same command as what the
implicit rule is executing and fixed the dependency.

Change-Id: Ib8d640361adff8c4d660738dda230e5536bec629
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-01-18 13:58:03 +00:00
Manish V Badarkhe
2c5c394fe7 Merge "refactor(juno): move plat_def_uuid_config to fiptool" into integration 2024-01-18 14:55:11 +01:00
Yann Gautier
a6462e05cf feat(memmap): add RELA section display
When PIE is enabled, it can be handy to display the .rela.dyn section.
Add RELA in the list of symbols parsed, to display this section in
memory map.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Ic40da54ce6fb6e281fb1a6627e9b8830993cfb2c
2024-01-18 14:02:18 +01:00
Manish V Badarkhe
4377ad81ab Merge "fix(memmap): fix memory map dump when SEPARATE_CODE_AND_RODATA=0" into integration 2024-01-18 13:54:22 +01:00
Manish Pandey
22d79f2c7f Merge changes from topic "tl_bl31_bl32" into integration
* changes:
  feat(qemu): enable transfer list to BL31/32
  feat(optee): enable transfer list in opteed
2024-01-18 12:29:53 +01:00
Yann Gautier
88528f5577 feat(stm32mp2-fdts): add board ID OTP in STM32MP257F-EV1
Ad the board ID OTP node for the STM32MP257F-EV1 board.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I394b27f50a8f45c919a1e907e03572b25d958ae4
2024-01-18 11:32:10 +01:00
Yann Gautier
c238a46a76 feat(stm32mp2-fdts): add OTP nodes in STM32MP251 SoC DT file
Add the BSEC node in STM32MP25 device tree file, with the OTP fuses
that will be used by TF-A.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I1ffdbd17829f4adf7b113ae0bec7547a6d1b4bac
2024-01-18 11:32:10 +01:00
Yann Gautier
cb0d6b5b5f fix(stm32mp2): add missing include
Without #include <plat/common/platform.h>, we have the following warning
with sparse:
plat/st/stm32mp2/bl2_plat_setup.c:15:6: warning: symbol
 'bl2_el3_early_platform_setup' was not declared. Should it be static?
plat/st/stm32mp2/bl2_plat_setup.c:23:6: warning: symbol
 'bl2_platform_setup' was not declared. Should it be static?
plat/st/stm32mp2/bl2_plat_setup.c:27:6: warning: symbol
 'bl2_el3_plat_arch_setup' was not declared. Should it be static?

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I18f9265c1eef1f8e8e0eac3d6c37a959e5c9e8b6
2024-01-18 11:32:10 +01:00
Yann Gautier
3007c72844 feat(st): do not directly call BSEC functions in common code
When STM32MP2 boots on Cortex-M33, the Cortex-A35 do no more have access
to BSEC peripheral. New static inline stm32_otp_* wrappers are added,
which just redirect to BSEC functions.

While at it remove a useless bsec.h include.

Change-Id: Ie0f917c02e48acf456634f455dae41805bf6adbf
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
2024-01-18 11:30:42 +01:00
Yann Gautier
189db9486d feat(st): use stm32_get_otp_value_from_idx() in BL31
The shadowing of the OTP is done in BL2.
As for BL32 on AARCH32 systems, stm32_get_otp_value_from_idx()
should also use bsec_read_otp() in BL31.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: Ib406cfc154339e6d3cde3c925bc6e9416d77b689
2024-01-18 11:30:42 +01:00