Commit graph

11017 commits

Author SHA1 Message Date
Raghu Krishnamurthy
7c2fe62f13 fix(bl31): allow use of EHF with S-EL2 SPMC
Currently, when SPMC at S-EL2 is used, we cannot use the RAS framework
to handle Group 0 interrupts. This is required on platforms where first
level of triaging needs to occur at EL3, before forwarding RAS handling
to a secure partition running atop an SPMC (hafnium).
The RAS framework depends on EHF and EHF registers for Group 0
interrupts to be trapped to EL3 when execution is both in secure world
and normal world. However, an FF-A compliant SPMC requires secure
interrupts to be trapped by the SPMC when execution is in S-EL0/S-EL1.
Consequently, the SPMC (hafnium) is incompatible with EHF, since it is
not re-entrant, and a Group 0 interrupt trapped to EL3 when execution is
in secure world, cannot be forwarded to an SP running atop SPMC.
This patch changes EHF to only register for Group 0 interrupts to be
trapped to EL3 when execution is in normal world and also makes it a
valid routing model to do so, when EL3_EXCEPTION_HANDLING is set (when
enabling the RAS framework).

Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
Change-Id: I72d4cf4d8ecc549a832d1c36055fbe95866747fe
2022-08-30 08:29:25 -07:00
Madhukar Pappireddy
6a5022278b Merge "fix(errata): workaround for Neoverse-V1 erratum 1618635" into integration 2022-08-11 22:51:42 +02:00
Joanna Farley
53be5274ff Merge "fix(build): discard sections also with SEPARATE_NOBITS_REGION" into integration 2022-08-11 22:27:21 +02:00
Bipin Ravi
5d75d71570 Merge "fix(build): disable default PIE when linking" into integration 2022-08-11 19:08:51 +02:00
Madhukar Pappireddy
8f23476e39 Merge "feat(bl): add interface to query TF-A semantic ver" into integration 2022-08-11 18:02:30 +02:00
Samuel Holland
64207f858f fix(build): discard sections also with SEPARATE_NOBITS_REGION
Some linker sections are discarded since 511046eaa2 ("BL31: discard
.dynsym .dynstr .hash sections to make ENABLE_PIE work"). However, that
logic was placed inside a preprocessor condition, so it only applied to
the !SEPARATE_NOBITS_REGION case. Move the /DISCARD/ block down so it
applies in all cases.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Change-Id: I6604609f2321a2a9c32a25721a697c320108a974
2022-08-10 20:23:12 -05:00
Samuel Holland
7b59241845 fix(build): disable default PIE when linking
Commit f7ec31db2d ("Disable PIE compilation option") allowed building a
non-relocatable firmware with a default-PIE toolchain by disabling PIE
at compilation time. This prevents the compiler from generating
relocations against a GOT.

However, when a default-PIE GCC is used as the linker, the final binary
will still be a PIE, containing an (unused) GOT and dynamic symbol
table. These structures do not affect execution, but they waste space in
the firmware binary. Disable PIE at link time to recover this space.

Change-Id: I2be7ac9c1a957f6db8d75efe6e601e9a5760a925
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-08-10 20:23:12 -05:00
Bipin Ravi
f924258da7 Merge "fix(bl31): pass the EA bit to 'delegate_sync_ea'" into integration 2022-08-10 15:45:55 +02:00
Olivier Deprez
1631f9c75c Merge "feat(sve): support full SVE vector length" into integration 2022-08-09 15:25:57 +02:00
Joanna Farley
4a0d8632dd Merge "docs(juno): fix broken link" into integration 2022-08-08 09:54:02 +02:00
Arthur She
89e4cea14a docs(juno): fix broken link
The URL of the Juno Getting Started Guide has been changed.
Fix the broken link.

Signed-off-by: Arthur She <arthur.she@linaro.org>
Change-Id: I55697f2f1f787c32d1ea7dfcf9eda619906cdb5d
2022-08-08 09:27:59 +02:00
Joanna Farley
000e25bf6f Merge "fix(versal): use only one space for indentation" into integration 2022-08-08 00:00:44 +02:00
Joanna Farley
0da574c1c8 Merge changes from topic "xilinx-versal-coding-style" into integration
* changes:
  fix(versal): fix code indentation issues
  fix(versal): fix macro coding style issues
2022-08-07 23:59:52 +02:00
Juan Pablo Conde
14a6fed5ac fix(errata): workaround for Neoverse-V1 erratum 1618635
Neoverse-V1 erratum 1618635 is a Cat B erratum that applies to
revision r0p0. It is fixed in r1p0.
The workaround is done through the instruction patching
mechanism, which is performed by a write sequence of
IMPLEMENTATION DEFINED registers.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN1401781/latest/

Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
Change-Id: I53e406735cd3a2a930fdc72ebce3bbed97100168
2022-08-05 15:56:30 -04:00
Lauren Wehrmeister
73b73b1af6 Merge "fix: make TF-A use provided OpenSSL binary" into integration 2022-08-04 17:29:24 +02:00
Michal Simek
dee5885913 fix(versal): use only one space for indentation
Trivial patch to remove additional space.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: Ifa33dee81243c0b21ca0f13b8e4d575646818162
2022-08-04 14:08:32 +02:00
Salome Thirot
e95abc4c01 fix: make TF-A use provided OpenSSL binary
Currently Tf-A uses whatever openssl binary is on the system to sign
images. However if OPENSSL_DIR is specified in the build flags this can
lead to linking issues as the system binary can end up being linked
against shared libraries provided in OPENSSL_DIR/lib if both binaries
(the system's and the on in OPENSSL_DIR/bin) are the same version.
This patch ensures that the binary used is always the one given by
OPENSSL_DIR to avoid those link issues.

Signed-off-by: Salome Thirot <salome.thirot@arm.com>
Change-Id: Ib534e06ebc8482e4391e376d3791a87968de4a99
2022-08-04 10:45:46 +01:00
Michal Simek
72583f92e6 fix(versal): fix code indentation issues
Next line should be aligned with the previous code.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: I20d82ba5fa70fa252341b62e57fac265241f3391
2022-08-04 09:21:12 +02:00
Michal Simek
80806aa123 fix(versal): fix macro coding style issues
Use only one space between #define and macro name.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: Ieb9bdd5bcfa56bd265df72692a09c7340fe132cb
2022-08-04 09:21:07 +02:00
Varun Wadekar
df56e9d199 fix(bl31): pass the EA bit to 'delegate_sync_ea'
During a synchronous exception, the 'enter_lower_el_sync_ea' handler
tests the ESR_EL3 EA bit and calls 'report_unhandled_exception', if
it is not set.

EA = 0 and IFSC = SEA, seems to be a contradiction. EA provides further
classification of a synchronous abort. A synchronous abort is determined
by the IFSC value on an instruction fetch synchronous abort. As a result,
EA will never be set to 1 on an instruction fetch synchronous abort and
'report_unhandled_exception' should not be called.

This patch removes this behavior to allow the platform to handle the
exception.

Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I3f004447ad4316d81649063e1ffb3ac644c83ede
2022-08-03 12:01:36 +01:00
laurenw-arm
dddf4283b0 feat(bl): add interface to query TF-A semantic ver
Adding interface for stand-alone semantic version of TF-A
for exporting to RSS attestation, and potentially other areas
as well.

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: Ib4a2c47aa1e42a3b850185e674c90708a05cda53
2022-08-02 16:04:23 -05:00
Bipin Ravi
17e76b5eb7 Merge "feat(plat/qti): fix to support cpu errata" into integration 2022-08-02 21:25:24 +02:00
Lauren Wehrmeister
c152276829 Merge changes from topic "st_fip_uuid" into integration
* changes:
  feat(stm32mp1): retrieve FIP partition by type UUID
  feat(guid-partition): allow to find partition by type UUID
  refactor(stm32mp1): update PLAT_PARTITION_MAX_ENTRIES
2022-08-01 16:45:49 +02:00
Joanna Farley
342a65fb21 Merge "feat(zynqmp): protect eFuses from non-secure access" into integration 2022-08-01 12:05:18 +02:00
Joanna Farley
2461654189 Merge changes from topic "xlnx_misra" into integration
* changes:
  fix(versal): resolve misra 10.1 warnings
  fix(versal): resolve the misra 4.6 warnings
2022-08-01 12:04:04 +02:00
Venkatesh Yadav Abbarapu
19f92c4cfe fix(versal): resolve misra 10.1 warnings
MISRA Violation: MISRA-C: 2012 R.10.1
-The operand to the operator does not have an essentially
unsigned type.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: I4873a620086dfd6f636fe730165a9d13a29e9652
2022-07-31 14:08:53 +05:30
Venkatesh Yadav Abbarapu
f7c48d9e30 fix(versal): resolve the misra 4.6 warnings
MISRA Violation: MISRA-C:2012 R.4.6
- Using basic numerical type int rather than a typedef
that includes size and signedness information.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: Ieff90b5311a3bde8a2cb302ca81c23eeee6d235a
2022-07-31 14:07:11 +05:30
Vesa Jääskeläinen
d0b7286e48 feat(zynqmp): protect eFuses from non-secure access
When configuration option ZYNQMP_SECURE_EFUSES is defined then Xilinx
ZynqMP's PS eFuses can only be accesses from secure state.

This enables eFuses to be reserved and protected only for security use
cases for example in OP-TEE.

Change-Id: I866905e35ce488f50f5f6e1b4667b08a9fa2386d
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
2022-07-29 23:57:18 +03:00
Saurabh Gorecha
6cc743cf0f feat(plat/qti): fix to support cpu errata
fix to support ARM CPU errata based on core used.

Signed-off-by: Saurabh Gorecha <quic_sgorecha@quicinc.com>
Change-Id: If1a438f98f743435a7a0b683a32ccf14164db37e
2022-07-29 18:15:32 +05:30
Joanna Farley
8b06f0a280 Merge "fix(xilinx): miscellaneous fixes for xilinx platforms" into integration 2022-07-28 18:37:45 +02:00
Venkatesh Yadav Abbarapu
bfc514f103 fix(xilinx): miscellaneous fixes for xilinx platforms
This patch gathers miscellaneous minor fixes to the xilinx
platforms like tabs for indentation and misra 10.1 warnings.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: I4cdb89ffec7d5abc64e065ed5b5e5d10b30ab9f9
2022-07-28 08:57:59 +05:30
Madhukar Pappireddy
1d867c14cb Merge "fix(ufs): add retries to ufs_read_capacity" into integration 2022-07-27 16:06:43 +02:00
Madhukar Pappireddy
7cf105f8fc Merge "fix(ufs): point utrlbau to header instead of upiu" into integration 2022-07-27 15:58:39 +02:00
anans
9d3f6c4b60 fix(ufs): point utrlbau to header instead of upiu
utrlbau should point to header and not upiu
this is the case everywhere except for ufs_prepare_cmd

Signed-off-by: anans <anans@google.com>
Change-Id: I02695824c1409124a60e63c3a7ff3278a4dc5fa8
2022-07-26 11:39:23 +00:00
Madhukar Pappireddy
bce8115884 Merge "(feat)n1sdp: add support for OP-TEE SPMC" into integration 2022-07-25 21:36:31 +02:00
Vishnu Banavath
9090fe00aa (feat)n1sdp: add support for OP-TEE SPMC
These changes are to add support for loading and booting
OP-TEE as SPMC running at SEL1 for N1SDP platform.

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Change-Id: I0514db646d4868b6f0c56f1ea60495cb3f7364fd
2022-07-25 15:35:40 +02:00
Madhukar Pappireddy
09acc421e3 Merge "feat(tc): introduce TC2 platform" into integration 2022-07-25 15:09:29 +02:00
Joanna Farley
1ee0eef908 Merge "fix(versal): remove clock related macros" into integration 2022-07-25 13:40:57 +02:00
Joanna Farley
a31903437a Merge "docs(maintainers): switch emails from Xilinx to AMD" into integration 2022-07-25 13:39:57 +02:00
Michal Simek
094b84636c docs(maintainers): switch emails from Xilinx to AMD
Switch emails from Xilinx to AMD after acquisition.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: I5d126dc49e53f2735bb7e103f8f883a9474206fc
2022-07-25 10:26:35 +02:00
Michal Simek
47f8145324 fix(versal): remove clock related macros
TF-A doesn't configure clock on Versal. Setup is done by previous
bootloader (called PLM) that's why there is no need to have macro listed in
headers. Also previous phase can disable access to these registers that's
why better to remove them.

Change-Id: I53ba344ad932c532b0babdce9d2b26e4c2c1b846
Signed-off-by: Michal Simek <michal.simek@amd.com>
2022-07-25 10:16:20 +02:00
Rupinderjit Singh
eebd2c3f61 feat(tc): introduce TC2 platform
Added a platform support to use tc2 specific CPU cores.

Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
Change-Id: Ib76d440e358e9bd1cf80aec5b8591f7a6e47ecbd
2022-07-22 21:13:21 +01:00
Bipin Ravi
b4ce222f42 Merge "fix(psci): fix MISRA failure - Memory - illegal accesses" into integration 2022-07-22 16:03:28 +02:00
Manish V Badarkhe
0551aac563 fix(psci): fix MISRA failure - Memory - illegal accesses
Fixed below MISRA failure -
>>>     CID 379362:  Memory - illegal accesses  (OVERRUN)
>>>     Overrunning array "psci_non_cpu_pd_nodes" of 5 16-byte
>>>     elements at element index 5 (byte offset 95) using index
>>>     "i" (which evaluates to 5).

Change-Id: Ie88fc555e48b06563372bfe4e51f16b13c0a020b
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2022-07-22 13:46:20 +02:00
Manish Pandey
3f9d5c24cf Merge "fix(doc): document missing RMM-EL3 runtime services" into integration 2022-07-22 10:51:41 +02:00
Madhukar Pappireddy
c1d7585d2d Merge "fix(errata): workaround for Cortex-X2 erratum 2371105" into integration 2022-07-21 21:32:22 +02:00
Bipin Ravi
bc0f84de40 fix(errata): workaround for Cortex-X2 erratum 2371105
Cortex-X2 erratum 2371105 is a cat B erratum that applies to
revisions r0p0 - r2p0 and is fixed in r2p1. The workaround is to
set bit[40] of CPUACTLR2_EL1 to disable folding of demand requests
into older prefetches with L2 miss requests outstanding.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN1775100/latest

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: Ib4f0caac36e1ecf049871acdea45526b394b7bad
2022-07-21 14:26:59 -05:00
Lauren Wehrmeister
486ebd681d Merge "fix(errata): workaround for Cortex A78C erratum 2242638" into integration 2022-07-21 20:31:34 +02:00
Manish V Badarkhe
f590094161 Merge "fix(tc): tc2 bl1 start address shifted by one page" into integration 2022-07-21 18:39:28 +02:00
Javier Almansa Sobrino
e50fedbc86 fix(doc): document missing RMM-EL3 runtime services
This patch adds documentation for the missing RMM-EL3
runtime services:

* RMM_RMI_REQ_COMPLETE
* RMM_GTSI_DELEGATE
* RMM_GTSI_UNDELEGATE

This patch also fixes a couple of minor bugs on return codes
for delegate/undelegate internal APIs.

Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: Ic721005e7851e838eebaee7865ba78fadc3309e4
2022-07-21 12:36:45 +01:00