]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
18 months agofeat(sbsa): helper api for refreshing watchdog timer
Madhukar Pappireddy [Wed, 22 Mar 2023 20:27:22 +0000 (15:27 -0500)]
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>
18 months agoMerge "feat(fvp): define ns memory in the SPMC manifest" into integration
Madhukar Pappireddy [Thu, 4 May 2023 13:21:54 +0000 (15:21 +0200)]
Merge "feat(fvp): define ns memory in the SPMC manifest" into integration

18 months agoMerge changes from topic "allwinner_t507" into integration
Madhukar Pappireddy [Thu, 4 May 2023 13:19:50 +0000 (15:19 +0200)]
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

18 months agoMerge "fix(tc): only suspend booting after running plat tests" into integration
Sandrine Bailleux [Thu, 4 May 2023 09:07:42 +0000 (11:07 +0200)]
Merge "fix(tc): only suspend booting after running plat tests" into integration

18 months agofix(tc): only suspend booting after running plat tests
laurenw-arm [Wed, 3 May 2023 17:48:55 +0000 (12:48 -0500)]
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

18 months agoMerge changes from topic "mp/group0_support" into integration
Olivier Deprez [Wed, 3 May 2023 16:15:40 +0000 (18:15 +0200)]
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

18 months agoMerge changes I92826714,I9431f9d1 into integration
Manish Pandey [Wed, 3 May 2023 13:47:45 +0000 (15:47 +0200)]
Merge changes I92826714,I9431f9d1 into integration

* changes:
  build(psci): move `runtime_errata.S` to PSCI
  build: allow BL-specific includes/definitions

18 months agobuild(psci): move `runtime_errata.S` to PSCI
Chris Kay [Tue, 28 Mar 2023 16:38:02 +0000 (17:38 +0100)]
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>
18 months agobuild: allow BL-specific includes/definitions
Chris Kay [Wed, 22 Mar 2023 15:42:32 +0000 (15:42 +0000)]
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>
18 months agoMerge changes I9d06e0ee,I6980e84f into integration
Manish Pandey [Wed, 3 May 2023 13:10:45 +0000 (15:10 +0200)]
Merge changes I9d06e0ee,I6980e84f into integration

* changes:
  feat(tegra): implement 'pwr_domain_off_early' handler
  feat(psci): introduce 'pwr_domain_off_early' hook

18 months agofeat(fvp): define ns memory in the SPMC manifest
J-Alves [Thu, 16 Mar 2023 15:26:52 +0000 (15:26 +0000)]
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

18 months agoMerge "feat(xilinx): sync copyright format" into integration
Joanna Farley [Tue, 2 May 2023 18:53:09 +0000 (20:53 +0200)]
Merge "feat(xilinx): sync copyright format" into integration

18 months agoMerge "refactor(cpus): use BIT macro in a consistent manner" into integration
Bipin Ravi [Tue, 2 May 2023 15:01:02 +0000 (17:01 +0200)]
Merge "refactor(cpus): use BIT macro in a consistent manner" into integration

18 months agoMerge "feat(el3-runtime): handle traps for IMPDEF registers accesses" into integration
Manish Pandey [Tue, 2 May 2023 14:51:14 +0000 (16:51 +0200)]
Merge "feat(el3-runtime): handle traps for IMPDEF registers accesses" into integration

18 months agoMerge "build: deprecate Arm rde1edge" into integration
Manish V Badarkhe [Tue, 2 May 2023 12:31:01 +0000 (14:31 +0200)]
Merge "build: deprecate Arm rde1edge" into integration

18 months agoMerge "fix(sme): disable SME for SPD=spmd" into integration
Manish Pandey [Tue, 2 May 2023 11:11:18 +0000 (13:11 +0200)]
Merge "fix(sme): disable SME for SPD=spmd" into integration

18 months agoMerge changes Ia1142b31,I424f1cde into integration
Sandrine Bailleux [Tue, 2 May 2023 11:09:59 +0000 (13:09 +0200)]
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

18 months agoMerge "refactor(fiptool): move plat_fiptool.mk to tools" into integration
Sandrine Bailleux [Tue, 2 May 2023 08:47:15 +0000 (10:47 +0200)]
Merge "refactor(fiptool): move plat_fiptool.mk to tools" into integration

18 months agoMerge "fix(tegra): remove dependency on CPU registers to get boot parameters" into...
Varun Wadekar [Tue, 2 May 2023 08:16:53 +0000 (10:16 +0200)]
Merge "fix(tegra): remove dependency on CPU registers to get boot parameters" into integration

18 months agoMerge "docs(measured-boot): update the build command" into integration
Sandrine Bailleux [Tue, 2 May 2023 07:16:01 +0000 (09:16 +0200)]
Merge "docs(measured-boot): update the build command" into integration

18 months agodocs(spm): support for handling Group0 interrupts
Madhukar Pappireddy [Fri, 3 Mar 2023 20:24:24 +0000 (14:24 -0600)]
docs(spm): support for handling Group0 interrupts

Please refer the doc update.

Change-Id: Ib79fae1296bc28fa9bd0cd79609d6153bb57519b
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
18 months agofeat(spmd): introduce platform handler for Group0 interrupt
Madhukar Pappireddy [Thu, 2 Mar 2023 22:33:25 +0000 (16:33 -0600)]
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>
18 months agofeat(spmd): add support for FFA_EL3_INTR_HANDLE_32 ABI
Madhukar Pappireddy [Thu, 2 Mar 2023 22:04:38 +0000 (16:04 -0600)]
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>
18 months agofeat(spmd): register handler for group0 interrupt from NWd
Madhukar Pappireddy [Thu, 2 Mar 2023 21:34:05 +0000 (15:34 -0600)]
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>
18 months agofeat(el3-runtime): handle traps for IMPDEF registers accesses
Varun Wadekar [Thu, 13 Apr 2023 20:06:18 +0000 (21:06 +0100)]
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

18 months agofix(tegra): remove dependency on CPU registers to get boot parameters
Kalyani Chidambaram Vaidyanathan [Mon, 24 Apr 2023 20:32:05 +0000 (13:32 -0700)]
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>
18 months agoMerge "feat(fvp): introduce PLATFORM_TEST_EA_FFH config" into integration
Manish Pandey [Fri, 28 Apr 2023 16:03:37 +0000 (18:03 +0200)]
Merge "feat(fvp): introduce PLATFORM_TEST_EA_FFH config" into integration

18 months agofix(sme): disable SME for SPD=spmd
Jayanth Dodderi Chidanand [Fri, 28 Apr 2023 14:14:27 +0000 (15:14 +0100)]
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>
18 months agoMerge "docs(juno): refer to SCP v2.12.0" into integration
Manish Pandey [Fri, 28 Apr 2023 13:58:05 +0000 (15:58 +0200)]
Merge "docs(juno): refer to SCP v2.12.0" into integration

18 months agorefactor(cpus): use BIT macro in a consistent manner
Okash Khawaja [Fri, 28 Apr 2023 12:18:28 +0000 (13:18 +0100)]
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

18 months agofeat(fvp): introduce PLATFORM_TEST_EA_FFH config
Manish Pandey [Mon, 24 Apr 2023 09:46:21 +0000 (10:46 +0100)]
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

18 months agoMerge "fix(ras): do not put RAS check before esb macro" into integration
Manish V Badarkhe [Fri, 28 Apr 2023 10:08:37 +0000 (12:08 +0200)]
Merge "fix(ras): do not put RAS check before esb macro" into integration

18 months agoMerge "docs: fix a typo in the glossary" into integration
Manish V Badarkhe [Fri, 28 Apr 2023 10:08:09 +0000 (12:08 +0200)]
Merge "docs: fix a typo in the glossary" into integration

18 months agoMerge "feat(sme): enable SME2 functionality for NS world" into integration
Manish Pandey [Fri, 28 Apr 2023 09:57:25 +0000 (11:57 +0200)]
Merge "feat(sme): enable SME2 functionality for NS world" into integration

18 months agoMerge "build(fvp): reduce the number of cpu libraries included by default" into integ...
Joanna Farley [Thu, 27 Apr 2023 22:16:11 +0000 (00:16 +0200)]
Merge "build(fvp): reduce the number of cpu libraries included by default" into integration

18 months agoMerge "style(xilinx): fix AMD copyright format" into integration
Joanna Farley [Thu, 27 Apr 2023 22:13:03 +0000 (00:13 +0200)]
Merge "style(xilinx): fix AMD copyright format" into integration

18 months agofeat(sme): enable SME2 functionality for NS world
Jayanth Dodderi Chidanand [Tue, 8 Nov 2022 10:31:07 +0000 (10:31 +0000)]
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>
18 months agofix(ras): do not put RAS check before esb macro
Manish Pandey [Thu, 27 Apr 2023 09:02:35 +0000 (10:02 +0100)]
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

18 months agodocs: fix a typo in the glossary
Sandrine Bailleux [Thu, 27 Apr 2023 11:29:13 +0000 (13:29 +0200)]
docs: fix a typo in the glossary

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: I4c76fde5e487ab4b2495f1ea692ae07f8be81d57

18 months agodocs(measured-boot): update the build command
Manish V Badarkhe [Tue, 25 Apr 2023 10:08:16 +0000 (11:08 +0100)]
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>
18 months agofix(tc): enable the execution of both platform tests
Tamas Ban [Fri, 21 Apr 2023 07:31:48 +0000 (09:31 +0200)]
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

18 months agofix(tc): update the name of mbedtls config header
Tamas Ban [Fri, 21 Apr 2023 07:27:51 +0000 (09:27 +0200)]
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

18 months agoMerge "fix(ufs): poll UCRDY for all commands" into integration
Madhukar Pappireddy [Wed, 26 Apr 2023 22:36:55 +0000 (00:36 +0200)]
Merge "fix(ufs): poll UCRDY for all commands" into integration

18 months agofeat(tegra): implement 'pwr_domain_off_early' handler
Varun Wadekar [Tue, 25 Apr 2023 13:58:33 +0000 (14:58 +0100)]
feat(tegra): implement 'pwr_domain_off_early' handler

This patch implements the pwr_domain_off_early handler for
Tegra platforms.

Powering off the boot core on some Tegra platforms is not
allowed and the SOC specific helper functions for Tegra194,
Tegra210 and Tegra186 implement this restriction.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I9d06e0eee12314764adb0422e023a5bec6ed9c1e

18 months agoMerge changes from topic "ti-sci-cleanup" into integration
Madhukar Pappireddy [Wed, 26 Apr 2023 18:36:31 +0000 (20:36 +0200)]
Merge changes from topic "ti-sci-cleanup" into integration

* changes:
  feat(ti): synchronize access to secure proxy threads
  refactor(ti): remove inline directive from ti_sci and sec_proxy drivers
  refactor(ti): refactor ti_sci_{setup,do}_xfer to allow zero size response
  feat(ti): add sub and patch version number support

18 months agofeat(allwinner): add support for Allwinner T507 SoC
Mikhail Kalashnikov [Mon, 27 Mar 2023 15:36:14 +0000 (18:36 +0300)]
feat(allwinner): add support for Allwinner T507 SoC

The Allwinner T507 SoC is using the same die as the H616, but in a
different package. On top of this, there is at least one different die
revision out there, which uses a different CPU cluster control block.
The same die revision has been spotted in some, but not all, H313 SoCs.

Apart from that IP block, the rest of the SoC seems the same, so we can
support them using the existing H616 port. The die revision can be
auto-detected, so there is no extra build option or knowledge needed.

Provide the deviating CPU power up/down sequence for the die variant.
The new IP block uses per-core instead of per-cluster registers, but
follows the same pattern otherwise.

Since the CPU ops code is shared among all Allwinner SoCs, we need to
dummy-define the new register names for the older SoCs. The actual new
code is guarded by a predicate function, that is hard coded to return
true on the other SoCs. Since this is a static inline function in a
header file, the compiler will optimise away the unneeded branch there,
so the generated code for the other SoCs stays the same.

Change-Id: Ib5ade99d34b4ccb161ccde0e34f280ca6bd16ecd
Signed-off-by: Mikhail Kalashnikov <iuncuim@gmail.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
18 months agofeat(allwinner): add function to detect H616 die variant
Andre Przywara [Mon, 3 Apr 2023 20:33:45 +0000 (21:33 +0100)]
feat(allwinner): add function to detect H616 die variant

Allwinner provides a number of SoCs that use the same die as the H616.
Some of those chips apparently use a slight variation of that die, that
differs in the way the CPU cores' power and reset controls are handled.
This die variation can be detected by reading the SRAM version register.

Provide a predicate function that returns false if that die variant is
used. Since the CPU power control code is shared for all supported SoCs,
we provide an instance of this function for each SoC, as a static
inline, and return true on all other SoCs. This allows to always use
this function, and still let the compiler optimise away the unneeded
branch for those older SoCs.

This function is unused for now, but is needed in the next patch.

Change-Id: I49e014b895b7e2f55b4e7dc2b3d8aa31cee711b5
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
18 months agofeat(allwinner): add extra CPU control registers
Mikhail Kalashnikov [Fri, 9 Dec 2022 01:56:20 +0000 (01:56 +0000)]
feat(allwinner): add extra CPU control registers

The die used in several variants of the Allwinner H616 SoC (H313, T507)
seems to produced in at least two revisions. The newer one differs from
the original by using a different CPU control register IP block.

Add those newly used register offsets to the respective header file. The
MMIO block itself is actually present in both variants, though the
registers are different. The new registers tend to use one register per
core, in contrast to one register per cluster in the older revisions.

Change-Id: Ifbda1bdc67a6a16fbb901dbc83996e4a148b7602
Signed-off-by: Mikhail Kalashnikov <iuncuim@gmail.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
18 months agorefactor(allwinner): consolidate sunxi_cfg.h files
Andre Przywara [Thu, 8 Dec 2022 00:41:07 +0000 (00:41 +0000)]
refactor(allwinner): consolidate sunxi_cfg.h files

The header files describing the CPU cluster configuration IP block for
the H6 and H616 are actually identical, so merge them into one file and
move that to a common location. There is an upcoming SoC which will
similarly share a header file with the R329 SoC, so move that to the
same location already. In Allwinner's BSP source those two SoC groups
are typically called "NCAT" and "NCAT2", so use those names for the
shared header files. No functional change.

Change-Id: I98318373577344dbe228a81fa331ce660df32b5f
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
18 months agoMerge "docs: patch Poetry build instructions" into integration
Joanna Farley [Wed, 26 Apr 2023 14:45:02 +0000 (16:45 +0200)]
Merge "docs: patch Poetry build instructions" into integration

18 months agobuild(fvp): reduce the number of cpu libraries included by default
Boyan Karatotev [Thu, 6 Apr 2023 09:31:09 +0000 (10:31 +0100)]
build(fvp): reduce the number of cpu libraries included by default

The fvp build includes a very large number of cpus so that it can run on
a wide range of models. One config (HW_ASSISTED_COHERENCY=1
CTX_INCLUDE_AARCH32_REGS=0) includes an unusually large number of cpus.
Well, the list is quite arbitrary and incomplete. As we're currently out
of BL31 space on the fvp, remove all that are not routinely run in the
CI to buy us some time.

Also use the opportunity to reorder the list into something searchable.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I8c6cad41327451edf0d3a0e92c43d6c72c254aac

18 months agoMerge changes from topics "sb/deprecate-cryptocell", "sb/deprecation-policy" into...
Sandrine Bailleux [Wed, 26 Apr 2023 11:39:28 +0000 (13:39 +0200)]
Merge changes from topics "sb/deprecate-cryptocell", "sb/deprecation-policy" into integration

* changes:
  docs: deprecate CryptoCell-712/713 drivers
  docs: split deprecated interfaces and drivers
  docs: extend deprecation policy

18 months agoMerge changes from topic "align-sections" into integration
Joanna Farley [Wed, 26 Apr 2023 11:20:23 +0000 (13:20 +0200)]
Merge changes from topic "align-sections" into integration

* changes:
  build(trp): sort sections by alignment by default
  build(tsp): sort sections by alignment by default
  build(sp-min): sort sections by alignment by default
  build(bl31): sort sections by alignment by default
  build(bl2u): sort sections by alignment by default
  build(bl2): sort sections by alignment by default

18 months agodocs(juno): refer to SCP v2.12.0
Chris Kay [Wed, 26 Apr 2023 11:07:50 +0000 (12:07 +0100)]
docs(juno): refer to SCP v2.12.0

Change-Id: I2844fb569abcc403525982162484dc0aa7e5a9d6
Signed-off-by: Chris Kay <chris.kay@arm.com>
18 months agoMerge "docs(juno): update SCP downloads link" into integration
Manish Pandey [Wed, 26 Apr 2023 10:59:41 +0000 (12:59 +0200)]
Merge "docs(juno): update SCP downloads link" into integration

18 months agoMerge "build(bl1): sort sections by alignment by default" into integration
Manish Pandey [Wed, 26 Apr 2023 10:56:57 +0000 (12:56 +0200)]
Merge "build(bl1): sort sections by alignment by default" into integration

18 months agofeat(psci): introduce 'pwr_domain_off_early' hook
Varun Wadekar [Tue, 25 Apr 2023 13:03:27 +0000 (14:03 +0100)]
feat(psci): introduce 'pwr_domain_off_early' hook

This patch introduces the 'pwr_domain_off_early'  hook for
platforms wanting to perform housekeeping steps before the
PSCI framework starts the CPU power off sequence. Platforms
might also want to use ths opportunity to ensure that the
CPU off sequence can proceed.

The PSCI framework expects a return code of PSCI_E_DENIED,
if the platform wants to halt the CPU off sequence.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I6980e84fc4d6cb80537a178d0d3d26fb28a13853

18 months agofeat(xilinx): sync copyright format
Michal Simek [Tue, 25 Apr 2023 12:14:06 +0000 (14:14 +0200)]
feat(xilinx): sync copyright format

Use the same format in all files 's/Copyright (C)/Copyright (c)/g'.

Change-Id: I0e200eb135e7369d0e6b3b694acd406ec10ca9e7
Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agoMerge "fix: add missing click dependency" into integration
Madhukar Pappireddy [Tue, 25 Apr 2023 16:30:29 +0000 (18:30 +0200)]
Merge "fix: add missing click dependency" into integration

19 months agofix(ufs): poll UCRDY for all commands
Rohit Ner [Tue, 25 Apr 2023 07:14:41 +0000 (00:14 -0700)]
fix(ufs): poll UCRDY for all commands

Host must only set UICCMD if HCS.UCRDY is set to 1.
At present, SW polls for UCRDY only before sending DME_GET.
Generalise this behaviour for DME_SET, DME_LINKSTARTUP,
DME_HIBERNATE_EXIT by moving polling logic inside ufshc_send_uic_cmd.

Signed-off-by: Rohit Ner <rohitner@google.com>
Change-Id: Iece777f803a660fdd144a073834c221e889371a6

19 months agoMerge "refactor(cpufeat): enable FEAT_DIT for FEAT_STATE_CHECKED" into integration
Manish Pandey [Tue, 25 Apr 2023 16:09:29 +0000 (18:09 +0200)]
Merge "refactor(cpufeat): enable FEAT_DIT for FEAT_STATE_CHECKED" into integration

19 months agodocs: patch Poetry build instructions
Harrison Mutai [Mon, 24 Apr 2023 08:58:17 +0000 (09:58 +0100)]
docs: patch Poetry build instructions

Some parts of the documentation referring to Poetry provides incorrect
build instructions and has some minor formatting errors. Reformat the
bits that require formatting, and fix the build instructions. These
were originally part of the patch stack that added Poetry support but
were accidentally reverted prior to merge.

Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
Change-Id: I336d3a7bbe99f75262430ae436f8ebc2cb050d2c

19 months agorefactor(cpufeat): enable FEAT_DIT for FEAT_STATE_CHECKED
Andre Przywara [Thu, 26 Jan 2023 16:47:52 +0000 (16:47 +0000)]
refactor(cpufeat): enable FEAT_DIT for FEAT_STATE_CHECKED

At the moment we only support FEAT_DIT to be either unconditionally
compiled in, or to be not supported at all.

Add support for runtime detection (ENABLE_DIT=2), by splitting
is_armv8_4_dit_present() into an ID register reading function and a
second function to report the support status. That function considers
both build time settings and runtime information (if needed).

We use ENABLE_DIT in two occassions in assembly code, where we just set
the DIT bit in the DIT system register.
Protect those two cases by reading the CPU ID register when ENABLE_DIT
is set to 2.

Change the FVP platform default to the now supported dynamic
option (=2), so the right decision can be made by the code at runtime.

Change-Id: I506d352f18e23c60db8cdf08edb449f60adbe098
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
19 months agoMerge "refactor(morello): remove duplication of platform information struct" into...
Manish V Badarkhe [Tue, 25 Apr 2023 12:27:26 +0000 (14:27 +0200)]
Merge "refactor(morello): remove duplication of platform information struct" into integration

19 months agoMerge "feat(tcr2): add FEAT_TCR2 to the changelog" into integration
Manish Pandey [Tue, 25 Apr 2023 12:04:22 +0000 (14:04 +0200)]
Merge "feat(tcr2): add FEAT_TCR2 to the changelog" into integration

19 months agoMerge "fix(cpus): do not put RAS check before using esb" into integration
Manish Pandey [Tue, 25 Apr 2023 08:18:34 +0000 (10:18 +0200)]
Merge "fix(cpus): do not put RAS check before using esb" into integration

19 months agoMerge "docs(threat-model): add a notes related to the Measured Boot" into integration
Sandrine Bailleux [Tue, 25 Apr 2023 06:58:50 +0000 (08:58 +0200)]
Merge "docs(threat-model): add a notes related to the Measured Boot" into integration

19 months agoMerge "feat(gcs): support guarded control stack" into integration
Bipin Ravi [Tue, 25 Apr 2023 05:50:22 +0000 (07:50 +0200)]
Merge "feat(gcs): support guarded control stack" into integration

19 months agoMerge "docs(maintainers): make Jimmy Brisson a code owner" into integration
Bipin Ravi [Mon, 24 Apr 2023 19:49:39 +0000 (21:49 +0200)]
Merge "docs(maintainers): make Jimmy Brisson a code owner" into integration

19 months agofix: add missing click dependency
Harrison Mutai [Mon, 24 Apr 2023 16:13:07 +0000 (17:13 +0100)]
fix: add missing click dependency

Click is used in parts of the CI scripts (see run_config/fvp-linux.tc
for instance), add it back as part of a new dependency group. Future
dependencies that are required only in CI should be added to the
``ci`` dependency group.

Change-Id: I5da7fea703495dd4006d86334626f126a850bb10
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
19 months agofix(cpus): do not put RAS check before using esb
Manish Pandey [Wed, 29 Mar 2023 14:20:32 +0000 (15:20 +0100)]
fix(cpus): do not put RAS check before using esb

If RAS Extension is not implemented esb instruction executes as a NOP.
No need to have a check for RAS presence in the code.
Also, The handler is related to a synchronous exceptions which
implicitly is part of BL31 image only, so remove that check too.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: If4264504cba9f0642b7b9c581ae66cd4deace32b

19 months agoMerge "fix(fvp): correct ehf priority for SPM_MM" into integration
Manish Pandey [Mon, 24 Apr 2023 15:54:40 +0000 (17:54 +0200)]
Merge "fix(fvp): correct ehf priority for SPM_MM" into integration

19 months agofix(fvp): correct ehf priority for SPM_MM
Manish Pandey [Tue, 14 Mar 2023 13:44:53 +0000 (13:44 +0000)]
fix(fvp): correct ehf priority for SPM_MM

PLAT_SP_PRI is used by SPM_MM and it is assigned same value as RAS
priority. Which is not allowed by exception handling framework and
causes build failure if both SPM_MM and RAS is enabled.

To fix this problem assign SP a different priority than RAS.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: Iff64ac547f0966c0d94ac7c3ab0eb1e3151fb314

19 months agoMerge changes from topic "mb/trusted-boot-update" into integration
Sandrine Bailleux [Mon, 24 Apr 2023 13:46:26 +0000 (15:46 +0200)]
Merge changes from topic "mb/trusted-boot-update" into integration

* changes:
  refactor(auth)!: unify REGISTER_CRYPTO_LIB
  refactor(auth): replace plat_convert_pk
  docs(auth): add auth_decrypt in CM chapter
  feat(auth): compare platform and certificate ROTPK for authentication
  docs(auth): add 'calc_hash' function's details in CM

19 months agoMerge "docs: add a note about downstream platforms" into integration
Sandrine Bailleux [Mon, 24 Apr 2023 13:11:36 +0000 (15:11 +0200)]
Merge "docs: add a note about downstream platforms" into integration

19 months agodocs: deprecate CryptoCell-712/713 drivers
Sandrine Bailleux [Mon, 17 Apr 2023 12:09:41 +0000 (14:09 +0200)]
docs: deprecate CryptoCell-712/713 drivers

We plan to deprecate the CryptoCell-712 and CryptoCell-713 drivers in
TF-A release v2.9 and eventually remove the code from the tree in
release 3.0.

The only upstream platforms which use these drivers today are the Arm
Ltd developpment platforms, such as Juno.

Write this information down into the "Release Processes" document.

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: Ib064292733a271ecbff0dde315911017e2c4da7e

19 months agostyle(xilinx): fix AMD copyright format
Michal Simek [Thu, 20 Apr 2023 06:01:03 +0000 (08:01 +0200)]
style(xilinx): fix AMD copyright format

There is missing comma in copyright line. It is better to have all
Copyrights align to the same style that's why fix it.

Change-Id: Ifc04b474e1a172a7243b073d944007cf17d76e87
Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agoMerge changes from topic "versal/xlat-v2" into integration
Joanna Farley [Mon, 24 Apr 2023 12:08:10 +0000 (14:08 +0200)]
Merge changes from topic "versal/xlat-v2" into integration

* changes:
  feat(versal): switch to xlat_v2
  fix(xilinx): remove asserts around arg0/arg1

19 months agodocs: split deprecated interfaces and drivers
Sandrine Bailleux [Mon, 17 Apr 2023 14:01:50 +0000 (16:01 +0200)]
docs: split deprecated interfaces and drivers

Having a dedicated section for deprecated interfaces, and another one
for deprecated drivers, sounds cleaner.

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: Iaf65e9f4dabff89b9e86c17062656edd8c344016

19 months agodocs: extend deprecation policy
Sandrine Bailleux [Mon, 17 Apr 2023 13:45:46 +0000 (15:45 +0200)]
docs: extend deprecation policy

Our process documentation already mentions that if a platform is no
longer maintained, it is best to deprecate it to keep the project's
source tree clean and healthy.

The same argument stands for drivers or library interfaces so extend
this policy to those.

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: Ieb235d6a1fb089343e0e1e3e5f36067552f2f8f0

19 months agodocs: add a note about downstream platforms
Sandrine Bailleux [Mon, 17 Apr 2023 13:37:48 +0000 (15:37 +0200)]
docs: add a note about downstream platforms

Clarify that downstream platforms generally do not affect code
deprecation / removal decisions.

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: I44b979c4e67ee03537852769e96544e19137bda3

19 months agodocs(juno): update SCP downloads link
Chris Kay [Thu, 20 Apr 2023 12:34:35 +0000 (13:34 +0100)]
docs(juno): update SCP downloads link

Change-Id: Ibe2a1d2ec019333876a4f82b70fde0a10d667f7c
Signed-off-by: Chris Kay <chris.kay@arm.com>
19 months agoMerge "fix(uuid): add missing `#include` directives" into integration
Manish Pandey [Fri, 21 Apr 2023 12:24:12 +0000 (14:24 +0200)]
Merge "fix(uuid): add missing `#include` directives" into integration

19 months agorefactor(auth)!: unify REGISTER_CRYPTO_LIB
Yann Gautier [Wed, 15 Mar 2023 10:31:25 +0000 (11:31 +0100)]
refactor(auth)!: unify REGISTER_CRYPTO_LIB

Have only one definition for REGISTER_CRYPTO_LIB macro, with all the
possible fields. Worst case adds 4 u64 to crypto_lib_desc.
While at it, correct some MISRA violations:
MC3R1.R12.1: (advisory) The precedence of operators within expressions
should be made explicit.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I1342a20e6eef2354753182c2a81ff959e03e5c81

19 months agorefactor(auth): replace plat_convert_pk
Yann Gautier [Tue, 24 Jan 2023 08:39:47 +0000 (09:39 +0100)]
refactor(auth): replace plat_convert_pk

Following discussions in the reviews of the patch that introduced
plat_convert_pk() function [1], it was decided to deprecate it to
avoid weak function declaration.
A new optional function pointer convert_pk is added to crypto_lib_desc_t.
A new function crypto_mod_convert_pk() will either call
crypto_lib_desc.convert_pk() if it is defined, or do the same
as what was done by the weak function otherwise.

[1] https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/17174

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I9358867f8bfd5e96b5ee238c066877da368e43c6

19 months agodocs(auth): add auth_decrypt in CM chapter
Yann Gautier [Tue, 24 Jan 2023 08:23:10 +0000 (09:23 +0100)]
docs(auth): add auth_decrypt in CM chapter

The call to REGISTER_CRYPTO_LIB requires auth_decrypt function to be
provided. Add its prototype and update REGISTER_CRYPTO_LIB call.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: Id1f2a54867ffe5dec36e0bf22490d01858891585

19 months agofeat(auth): compare platform and certificate ROTPK for authentication
Manish V Badarkhe [Fri, 10 Mar 2023 19:00:02 +0000 (19:00 +0000)]
feat(auth): compare platform and certificate ROTPK for authentication

Compared the full ROTPK with the ROTPK obtained from the certificate
when the platform supports full ROTPK instead of hash of ROTPK.

Additionally, changed the code to verify the ROTPK before relying on
it for signature verification.

Change-Id: I52bb9deb1a1dd5b184d3156bddad14c238692de7
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
19 months agodocs(auth): add 'calc_hash' function's details in CM
Manish V Badarkhe [Thu, 9 Mar 2023 22:23:49 +0000 (22:23 +0000)]
docs(auth): add 'calc_hash' function's details in CM

Updated the Crypto Module section to detail the 'calc_hash'
function.

Change-Id: I04a24abba150745e4eba6273bdb7cf12b66bfebc
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
19 months agoMerge "feat: add support for poetry" into integration
Madhukar Pappireddy [Thu, 20 Apr 2023 13:20:23 +0000 (15:20 +0200)]
Merge "feat: add support for poetry" into integration

19 months agoMerge "fix(zynqmp): remove unused PLAT_NUM_POWER_DOMAINS" into integration
Joanna Farley [Thu, 20 Apr 2023 08:19:41 +0000 (10:19 +0200)]
Merge "fix(zynqmp): remove unused PLAT_NUM_POWER_DOMAINS" into integration

19 months agoMerge "style(xilinx): replace ARM by Arm in copyrights" into integration
Joanna Farley [Thu, 20 Apr 2023 08:18:31 +0000 (10:18 +0200)]
Merge "style(xilinx): replace ARM by Arm in copyrights" into integration

19 months agodocs(maintainers): make Jimmy Brisson a code owner
Sandrine Bailleux [Thu, 20 Apr 2023 07:36:19 +0000 (09:36 +0200)]
docs(maintainers): make Jimmy Brisson a code owner

For the following modules:
- Trusted boot
- Measured boot
- cert_create tool
- PSA layer.

Change-Id: I18113441a947773b470904573e1b474a2c8e2941
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
19 months agobuild: deprecate Arm rde1edge
Manish V Badarkhe [Wed, 19 Apr 2023 12:27:59 +0000 (13:27 +0100)]
build: deprecate Arm rde1edge

Arm has decided to deprecate the rde1edge platform. The development
of software and fast model for this platform have been discontinued.
Hence, updated the makefile to warn about the deprecation of this
platform, and also reflected it in the documentation.

Change-Id: I0d44de4590dd5dce02c7c4b433df25dc438e6c49
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
19 months agoMerge "feat(imx8): add support for debug uart on lpuart1" into integration
Madhukar Pappireddy [Wed, 19 Apr 2023 19:56:09 +0000 (21:56 +0200)]
Merge "feat(imx8): add support for debug uart on lpuart1" into integration

19 months agoMerge "build(hooks): allow hooks to skip Commitizen" into integration
Mark Dykes [Wed, 19 Apr 2023 15:25:31 +0000 (17:25 +0200)]
Merge "build(hooks): allow hooks to skip Commitizen" into integration

19 months agofeat: add support for poetry
Harrison Mutai [Thu, 16 Feb 2023 10:20:48 +0000 (10:20 +0000)]
feat: add support for poetry

New python dependencies are introduced by the memory mapping script.
Rather than add another `requirements.txt` utilise poetry. This is a
proper dependency management framework for Python. The two main upsides
of using poetry instead of the traditional requirements.txt are
maintainability and reproducibility.

Poetry provides a proper lock file for pinning dependencies, similar to
npm for JavaScript. This allows for separate environments (i.e. docs,
tools) to be created efficiently, and in a reproducible manner, wherever
the project is deployed.  Having dependencies pinned in this manner is a
boon as a security focused project. An additional upside is that we will
receive security updates for dependencies via GitHub's Dependabot.

Change-Id: I5a3c2003769b878a464c8feac0f789e5ecf8d56c
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
19 months agodocs(threat-model): add a notes related to the Measured Boot
Manish V Badarkhe [Mon, 3 Apr 2023 12:50:59 +0000 (13:50 +0100)]
docs(threat-model): add a notes related to the Measured Boot

TF-A currently does not have any TPM2 driver for extending
measurements into a discrete TPM chip. In TPM-based attestation
scheme, measurements are just stored into a TCG-compatible event
log buffer in secure memory.

In light of the fact that Event Log measurements are taken by BL1 and
BL2, we need to trust these components to store genuine measurements,
and the Generic Threat Model always mitigates against attacks on these
components, therefore, there is no explicit document for the Measured
Boot threat model at this time is needed.

Change-Id: I41b037b2f5956d327b53cd834345e5aefdcfb5ef
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
19 months agorefactor(morello): remove duplication of platform information struct
Werner Lewis [Wed, 22 Mar 2023 10:20:53 +0000 (10:20 +0000)]
refactor(morello): remove duplication of platform information struct

morello_plat_info is defined identically in multiple files, definition
is moved to a header file to avoid duplication.

Signed-off-by: Werner Lewis <werner.lewis@arm.com>
Change-Id: I607354902c55f5c31f0732de9db60604b82aef97

19 months agoMerge "feat(fvp): add Event Log maximum size property in DT" into integration
Sandrine Bailleux [Wed, 19 Apr 2023 08:05:15 +0000 (10:05 +0200)]
Merge "feat(fvp): add Event Log maximum size property in DT" into integration

19 months agobuild(hooks): allow hooks to skip Commitizen
Chris Kay [Tue, 18 Apr 2023 16:32:41 +0000 (17:32 +0100)]
build(hooks): allow hooks to skip Commitizen

Adds a conditional check in the `prepare-commit-msg` commit hook that
reads the `tf-a.disableCommitizen` Git configuration option, and
does not execute Commitizen if it is found.

To skip Commitizen, run:

    git config tf-a.disableCommitizen true

Change-Id: Ic8967f6f42bf3555df09b57096044fb99438d4d4
Signed-off-by: Chris Kay <chris.kay@arm.com>