Commit graph

12535 commits

Author SHA1 Message Date
Sona Mathew
e5d9b6f0bf docs(errata_abi): document the errata abi changes
Updated errata ABI feature enable flag and the errata non-arm
interconnect based flag, the default values for when the
feature is not enabled.

Change-Id: Ieb2144a1bc38f4ed684fda8280842a18964ba148
Signed-off-by: Sona Mathew <SonaRebecca.Mathew@arm.com>
2023-05-05 13:24:59 -05:00
Sona Mathew
d3bed15851 feat(fvp): enable errata management interface
Errata ABI feature specific build flag, flag to enable
CPUs in the cpu list, flags to test non-arm interconnect based
errata flags when enabled from a platform level.
Added to the FVP platform makefile to test the errata abi feature
implementation.

The flags to enable CPUs in the cpu list will be removed once
synchronized with the errata framework.

Change-Id: I30877a22ac1348906a6ddfb26f9e8839912d3572
Signed-off-by: Sona Mathew <SonaRebecca.Mathew@arm.com>
2023-05-05 13:24:56 -05:00
Sona Mathew
ab062f0510 fix(cpus): workaround platforms non-arm interconnect
The workarounds for these below mentioned errata are not implemented
in EL3, but the flags can be enabled/disabled at a platform level
based on arm/non-arm interconnect IP. The ABI helps assist the Kernel
in the process of mitigation for the following errata:

Cortex-A715:   erratum 2701951
Neoverse V2:   erratum 2719103
Cortex-A710:   erratum 2701952
Cortex-X2:     erratum 2701952
Neoverse N2:   erratum 2728475
Neoverse V1:   erratum 2701953
Cortex-A78:    erratum 2712571
Cortex-A78AE:  erratum 2712574
Cortex-A78C:   erratum 2712575

EL3 provides an appropriate return value via errata ABI when the
kernel makes an SMC call using the EM_CPU_ERRATUM_FEATURES FID with the
appropriate erratum ID.

Change-Id: I35bd69d812dba37410dd8bc2bbde20d4955b0850
Signed-off-by: Sona Mathew <SonaRebecca.Mathew@arm.com>
2023-05-05 13:23:10 -05:00
Sona Mathew
ef63f5be6d refactor(errata_abi): factor in non-arm interconnect
Workaround to help enable the kernel to query errata status using the
errata abi feature for platforms with a non-arm interconnect.

Change-Id: I47b03eaee5a0a763056ae71883fa30dfacb9b3f7
Signed-off-by: Sona Mathew <SonaRebecca.Mathew@arm.com>
2023-05-05 13:23:10 -05:00
Sona Mathew
ffea3844c0 feat(errata_abi): errata management firmware interface
This patch adds the errata management firmware interface for lower ELs
to discover details about CPU erratum. Based on the CPU erratum
identifier the interface enables the OS to find the mitigation of an
erratum in EL3.

The ABI can only be present in a system that is compliant with SMCCCv1.1
or higher. This implements v1.0 of the errata ABI spec.

For details on all possible return values, refer the design
documentation below:

ABI design documentation:
https://developer.arm.com/documentation/den0100/1-0?lang=en

Signed-off-by: Sona Mathew <SonaRebecca.Mathew@arm.com>
Change-Id: I70f0e2569cf92e6e02ad82e3e77874546232b89a
2023-05-05 13:23:10 -05:00
Manish Pandey
76fef47572 Merge changes from topic "mp/group0_support" into integration
* changes:
  feat(tc): allow secure watchdog timer to trigger periodically
  feat(sbsa): helper api for refreshing watchdog timer
2023-05-04 18:13:00 +02:00
Madhukar Pappireddy
28b2d86cd2 feat(tc): allow secure watchdog timer to trigger periodically
This patch does the following:
  1. Configures SBSA secure watchdog timer as Group0 interrupt for
     TC platform while keeping it as Group1 secure interrupt for
     other CSS based SoCs.
  2. Programs the watchdog timer to trigger periodically
  3. Provides a Group0 interrupt handler for TC platform port to
     deactivate the EL3 interrupt due to expiry of secure watchdog
     timer and refresh it explicitly.

Change-Id: I3847d6eb7347c6ea0e527b97b096119ca1e6701b
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2023-05-04 08:24:12 -05:00
Madhukar Pappireddy
e8166d3e59 feat(sbsa): helper api for refreshing watchdog timer
This patch adds a helper API to explicitly refresh SBSA secure watchdog
timer. Please refer section A.3 of the following spec:

https://developer.arm.com/documentation/den0029/latest/

Change-Id: I2d0943792aea0092bee1e51d74b908348587e66b
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2023-05-04 08:24:12 -05:00
Madhukar Pappireddy
c194aa0c6c Merge "feat(fvp): define ns memory in the SPMC manifest" into integration 2023-05-04 15:21:54 +02:00
Madhukar Pappireddy
e603983d37 Merge changes from topic "allwinner_t507" into integration
* changes:
  feat(allwinner): add support for Allwinner T507 SoC
  feat(allwinner): add function to detect H616 die variant
  feat(allwinner): add extra CPU control registers
  refactor(allwinner): consolidate sunxi_cfg.h files
2023-05-04 15:19:50 +02:00
Sandrine Bailleux
03971a07b9 Merge "fix(tc): only suspend booting after running plat tests" into integration 2023-05-04 11:07:42 +02:00
laurenw-arm
9b266556d3 fix(tc): only suspend booting after running plat tests
1. When doing a normal boot, tc_bl31_common_platform_setup() should
simply configure the platform and return.

2. When we are running the platform tests instead,
tc_bl31_common_platform_setup() should run the tests then suspend
booting (and thus never return).

We were incorreclty suspending the boot in case 1 as well. Put that
code under a preprocessor condition (PLATFORM_TEST_NV_COUNTERS or
PLATFORM_TEST_TFM_TESTSUITE) to fix this.

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: I7d20800e3bcd85261e2cdad325586d184e12a3e3
2023-05-04 10:06:28 +01:00
Olivier Deprez
17f9732da5 Merge changes from topic "mp/group0_support" into integration
* changes:
  docs(spm): support for handling Group0 interrupts
  feat(spmd): introduce platform handler for Group0 interrupt
  feat(spmd): add support for FFA_EL3_INTR_HANDLE_32 ABI
  feat(spmd): register handler for group0 interrupt from NWd
2023-05-03 18:15:40 +02:00
Manish Pandey
73ede2bf19 Merge changes I92826714,I9431f9d1 into integration
* changes:
  build(psci): move `runtime_errata.S` to PSCI
  build: allow BL-specific includes/definitions
2023-05-03 15:47:45 +02:00
Chris Kay
11ccf5d99a build(psci): move runtime_errata.S to PSCI
Move the runtime errata source file into the PSCI library, as PSCI is
the only component directly dependent on it, and it doesn't require
internal access to the CPUs library.

Change-Id: I92826714d49b1b0131f62c158543b4c167ab9aa8
Signed-off-by: Chris Kay <chris.kay@arm.com>
2023-05-03 15:36:08 +02:00
Chris Kay
a123cb143f build: allow BL-specific includes/definitions
This change introduces the `BLx_INCLUDE_DIRS` and `BLx_DEFINES`
Makefile variables, which can be used to append include directories
and preprocessor definitions to specific images created using the
`MAKE_BL` Makefile macro.

Change-Id: I9431f9d1cbde5b0b2624d9ce128a4f043c74c87f
Signed-off-by: Chris Kay <chris.kay@arm.com>
2023-05-03 15:36:08 +02:00
Manish Pandey
f50107d3df Merge changes I9d06e0ee,I6980e84f into integration
* changes:
  feat(tegra): implement 'pwr_domain_off_early' handler
  feat(psci): introduce 'pwr_domain_off_early' hook
2023-05-03 15:10:45 +02:00
J-Alves
7f28179a46 feat(fvp): define ns memory in the SPMC manifest
The SPMC (Hafnium) looks for secure and non-secure ranges
in its manifest.
Those relate with ranges that can be used by SPs in their
FF-A manifests.
The NS memory that is not used by SPs will be assigned
to the NWd, for it to share memory with SPs as needed.
Thus, this limits the memory the NWd can share with SPs,
to prevent NWD VMs from sharing memory that belongs
to other critical components.

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: Iad03eb138a57068fbb18c53141bdf6bf9c171b28
2023-05-03 10:07:12 +01:00
Joanna Farley
837fc96c77 Merge "feat(xilinx): sync copyright format" into integration 2023-05-02 20:53:09 +02:00
Bipin Ravi
fecd243cfa Merge "refactor(cpus): use BIT macro in a consistent manner" into integration 2023-05-02 17:01:02 +02:00
Manish Pandey
d494b0eff5 Merge "feat(el3-runtime): handle traps for IMPDEF registers accesses" into integration 2023-05-02 16:51:14 +02:00
Manish V Badarkhe
fda676d3d2 Merge "build: deprecate Arm rde1edge" into integration 2023-05-02 14:31:01 +02:00
Manish Pandey
607388df19 Merge "fix(sme): disable SME for SPD=spmd" into integration 2023-05-02 13:11:18 +02:00
Sandrine Bailleux
4924667017 Merge changes Ia1142b31,I424f1cde into integration
* changes:
  fix(tc): enable the execution of both platform tests
  fix(tc): update the name of mbedtls config header
2023-05-02 13:09:59 +02:00
Sandrine Bailleux
c89fdb4a51 Merge "refactor(fiptool): move plat_fiptool.mk to tools" into integration 2023-05-02 10:47:15 +02:00
Varun Wadekar
79c310f0d7 Merge "fix(tegra): remove dependency on CPU registers to get boot parameters" into integration 2023-05-02 10:16:53 +02:00
Sandrine Bailleux
e23d442d17 Merge "docs(measured-boot): update the build command" into integration 2023-05-02 09:16:01 +02:00
Madhukar Pappireddy
e601729119 docs(spm): support for handling Group0 interrupts
Please refer the doc update.

Change-Id: Ib79fae1296bc28fa9bd0cd79609d6153bb57519b
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2023-05-01 13:29:48 -05:00
Madhukar Pappireddy
f0b64e507e feat(spmd): introduce platform handler for Group0 interrupt
This patch introduces a handler for FVP platform to triage Group0
secure interrupts. Currently, it is empty but serves as a
placeholder for future Group0 interrupt sources.

Moreover, this patch also provides a dummy implementation of the
above mentioned platform hook for QEMU, corstone100, n1sdp and
hikey960 ports.

Change-Id: I01d3451408f47ac313b0af74046cce89f89b85bb
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2023-05-01 13:29:46 -05:00
Madhukar Pappireddy
6671b3d822 feat(spmd): add support for FFA_EL3_INTR_HANDLE_32 ABI
When Group0 Secure interrupts in secure world get trapped to S-EL2
SPMC, FFA_EL3_INTR_HANDLE ABI is invoked by SPMC to delegate
interrupt handling to EL3 firmware (i.e., SPMD).

SPMD further delegates to platform handler which successfully handles
the Group0 secure interrupt before returning control to SPMC.

Change-Id: I8cc0fec20803b96c81582910ad2668e38b167fb8
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2023-05-01 13:29:12 -05:00
Madhukar Pappireddy
a1e0e871f1 feat(spmd): register handler for group0 interrupt from NWd
SPMD registers a generic handler with the interrupt management
framework to handle Group0 secure interrupt from normal world.
The handler further delegates to the platform for successful
handling of the interrupt.

Change-Id: I9cdc721810b09e01190cdcab42c50830792a26e2
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2023-05-01 13:29:12 -05:00
Varun Wadekar
0ed3be6fc2 feat(el3-runtime): handle traps for IMPDEF registers accesses
This patch introduces support to handle traps from lower ELs for
IMPDEF system register accesses. The actual support is left to the
platforms to implement.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I623d5c432b4ce4328b68f238c15b1c83df97c1e5
2023-04-30 11:04:59 +01:00
Kalyani Chidambaram Vaidyanathan
0b9f05fcae fix(tegra): remove dependency on CPU registers to get boot parameters
Commit 3e14df6f6 removed the code to clear the CPU registers X0 - X3,
which affected the Tegra platforms. Tegra platforms rely on the boot
parameters passed through custom mechanisms and do not use these
general purpose registers, but maintained sanity checks to support
legacy bootloaders. These sanity checks went out of sync due to the
code cleanup from bl31_entrypoint().

This patch removes the checks and calls the SOC specific handlers to
retrieve the boot parameters.

Change-Id: I0cf4d9c0370c33ff7715b48592b6bc0602f3c93e
Signed-off-by: Kalyani Chidambaram Vaidyanathan <kalyanic@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2023-04-30 10:57:06 +01:00
Manish Pandey
48a65ec31a Merge "feat(fvp): introduce PLATFORM_TEST_EA_FFH config" into integration 2023-04-28 18:03:37 +02:00
Jayanth Dodderi Chidanand
2fd2fcedff fix(sme): disable SME for SPD=spmd
SPMD is not compatible with ENABLE_SME_FOR_NS.
Hence disable SME when SPD=spmd

Change-Id: I8bcf2493819718732563f9db69f7186ac7437637
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2023-04-28 16:20:26 +01:00
Manish Pandey
76b225d41d Merge "docs(juno): refer to SCP v2.12.0" into integration 2023-04-28 15:58:05 +02:00
Okash Khawaja
baeaf292ce refactor(cpus): use BIT macro in a consistent manner
In assembly code, BIT macro is used with a preceding hash #. Let's
update Cortex X1 code to follow the same convention. Excluding hash
doesn't cause compilation to fail or emit incorrect code.

Signed-off-by: Okash Khawaja <okash@google.com>
Change-Id: If304cdf90542d2edcab3e2d66cd7e905ff7fd047
2023-04-28 13:18:28 +01:00
Manish Pandey
fe38cc6897 feat(fvp): introduce PLATFORM_TEST_EA_FFH config
FVP currently does not have proper handler to do Firmware First Handling
(FFH) of lower EL External aborts and it ends up in EL3 panic.

To test the scenarios sensibly we need a proper handling when the FVP is
under test so that we do not change the default behavior.

Introduce PLATFORM_TEST_EA_FFH config which will be enabled in CI
scripts and implement a proper handling for Sync EA and SErrors from
lower EL.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: Ib130154206b17f72c49c9f07de2d92f35a97ab0b
2023-04-28 12:50:28 +01:00
Manish V Badarkhe
e31de867a2 Merge "fix(ras): do not put RAS check before esb macro" into integration 2023-04-28 12:08:37 +02:00
Manish V Badarkhe
a49bb6f838 Merge "docs: fix a typo in the glossary" into integration 2023-04-28 12:08:09 +02:00
Manish Pandey
1ff41ba333 Merge "feat(sme): enable SME2 functionality for NS world" into integration 2023-04-28 11:57:25 +02:00
Joanna Farley
7f95003bdb Merge "build(fvp): reduce the number of cpu libraries included by default" into integration 2023-04-28 00:16:11 +02:00
Joanna Farley
b39af24fb7 Merge "style(xilinx): fix AMD copyright format" into integration 2023-04-28 00:13:03 +02:00
Jayanth Dodderi Chidanand
03d3c0d729 feat(sme): enable SME2 functionality for NS world
FEAT_SME2 is an extension of FEAT_SME and an optional feature
from v9.2. Its an extension of SME, wherein it not only
processes matrix operations efficiently, but also provides
outer-product instructions to accelerate matrix operations.
It affords instructions for multi-vector operations.
Further, it adds an 512 bit architectural register ZT0.

This patch implements all the changes introduced with FEAT_SME2
to ensure that the instructions are allowed to access ZT0
register from Non-secure lower exception levels.

Additionally, it adds support to ensure FEAT_SME2 is aligned
with the existing FEATURE DETECTION mechanism, and documented.

Change-Id: Iee0f61943304a9cfc3db8f986047b1321d0a6463
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2023-04-27 16:02:27 +01:00
Manish Pandey
7d5036b8ec fix(ras): do not put RAS check before esb macro
Macro esb used in TF-A executes the instruction "esb" and is kept under
RAS_EXTENSION macro. RAS_EXTENSION, as it stands today, is only enabled
for platforms which wants RAS errors to be handled in Firmware while esb
instruction is available when RAS architecture feature is present
irrespective of its handling.
Currently TF-A does not have mechanism to detect whether RAS is present
or not in HW, define this macro unconditionally.

Its harmless for non-RAS cores as this instruction executes as NOP.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I556f2bcf5669c378bda05909525a0a4f96c7b336
2023-04-27 12:59:39 +01:00
Sandrine Bailleux
6fc9c1cdb9 docs: fix a typo in the glossary
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: I4c76fde5e487ab4b2495f1ea692ae07f8be81d57
2023-04-27 13:29:56 +02:00
Manish V Badarkhe
bb5b2632e1 docs(measured-boot): update the build command
As per recent changes to OPTEE's fvp.mk file, both options
"MEASURED_BOOT" and "MEASURED_BOOT_FTPM" are required for the fTPM
application to be built.

Change-Id: I621113c3fbd47e9f5be015ea65e9b8d0f218e4e8
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-04-27 07:28:41 +01:00
Tamas Ban
657b90ea1a fix(tc): enable the execution of both platform tests
The C preprocessor cannot compare defines against strings.
Such an expression is always evaluated to be true. Therefore,
its usage in a conditional expression results that always the
first branch is taken. Other branches cannot be reached by
any configuration value. The fix removes this string comparison
and instead it introduces distinct defines for all the cases.

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: Ia1142b31b6778686c74e1e882fe4604fe3b6501d
2023-04-27 07:59:44 +02:00
Tamas Ban
d5fc8992c7 fix(tc): update the name of mbedtls config header
Recently mbedtls_cofig.h was renamed to:
 - mbedtls_config-2.h
 - mbedtls_config-3.h

Modify the include order to resolve the
static check failure in the CI.

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I424f1cde199397b8df780a9514f1042e601c6502
2023-04-27 07:59:38 +02:00
Madhukar Pappireddy
69d643c5f4 Merge "fix(ufs): poll UCRDY for all commands" into integration 2023-04-27 00:36:55 +02:00