]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
19 months agofix(qemu-sbsa): enable FGT
Marcin Juszkiewicz [Tue, 14 Feb 2023 08:27:59 +0000 (09:27 +0100)]
fix(qemu-sbsa): enable FGT

QEMU 7.2+ has FEAT_FGT support added to 'max' cpu.

So let's enable it to make Debian 'bookworm' kernel boot on sbsa-ref/max setup.

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Change-Id: I49fb3e742b69ce7be5666e0144525dde21a68238

19 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

19 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

19 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

19 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

19 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

19 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

19 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

19 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

19 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

19 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

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 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>
19 months agofeat(fvp): add Event Log maximum size property in DT
Manish V Badarkhe [Mon, 20 Mar 2023 14:58:06 +0000 (14:58 +0000)]
feat(fvp): add Event Log maximum size property in DT

Updated the code to get and set the 'tpm_event_log_max_size' property
in the event_log.dtsi.

In this change, the maximum Event Log buffer size allocated by BL1 is
passed to BL2, rather than both relying on the maximum Event Log buffer
size macro.

Change-Id: I7aa6256390872171e362b6f166f3f7335aa6e425
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
19 months agoMerge "feat(docs): allow verbose build" into integration
Sandrine Bailleux [Tue, 18 Apr 2023 15:10:04 +0000 (17:10 +0200)]
Merge "feat(docs): allow verbose build" into integration

19 months agofeat(tcr2): add FEAT_TCR2 to the changelog
Mark Brown [Mon, 17 Apr 2023 16:51:30 +0000 (17:51 +0100)]
feat(tcr2): add FEAT_TCR2 to the changelog

This was omitted from the patch adding the feature.

Signed-off-by: Mark Brown <broonie@kernel.org>
Change-Id: Ie7f2b63434a70320178be74fc3f165618aca8392

19 months agofeat(gcs): support guarded control stack
Mark Brown [Tue, 14 Mar 2023 21:33:04 +0000 (21:33 +0000)]
feat(gcs): support guarded control stack

Arm v9.4 introduces support for Guarded Control Stack, providing
mitigations against some forms of RPO attacks and an efficient mechanism
for obtaining the current call stack without requiring a full stack
unwind. Enable access to this feature for EL2 and below, context
switching the newly added EL2 registers as appropriate.

Change the FVP platform to default to handling this as a dynamic option
so the right decision can be made by the code at runtime.

Signed-off-by: Mark Brown <broonie@kernel.org>
Change-Id: I691aa7c22e3547bb3abe98d96993baf18c5f0e7b

19 months agobuild(trp): sort sections by alignment by default
Chris Kay [Thu, 26 Jan 2023 18:31:52 +0000 (18:31 +0000)]
build(trp): sort sections by alignment by default

This change forces LD to sort all input sections by alignment when
allocating them within an output section. This is done in some places
explicitly in the linker scripts today, but this makes sure we don't
miss any easy targets.

Change-Id: Ife89a8bb9e592b55c761d9a3dfefc2aeeb07802f
Signed-off-by: Chris Kay <chris.kay@arm.com>
19 months agobuild(tsp): sort sections by alignment by default
Chris Kay [Thu, 26 Jan 2023 18:31:52 +0000 (18:31 +0000)]
build(tsp): sort sections by alignment by default

This change forces LD to sort all input sections by alignment when
allocating them within an output section. This is done in some places
explicitly in the linker scripts today, but this makes sure we don't
miss any easy targets.

Change-Id: Id702a2a572f2b43c77d53634ddc64b0220d2560b
Signed-off-by: Chris Kay <chris.kay@arm.com>
19 months agobuild(sp-min): sort sections by alignment by default
Chris Kay [Thu, 26 Jan 2023 18:31:52 +0000 (18:31 +0000)]
build(sp-min): sort sections by alignment by default

This change forces LD to sort all input sections by alignment when
allocating them within an output section. This is done in some places
explicitly in the linker scripts today, but this makes sure we don't
miss any easy targets.

Change-Id: I33d5044e4d34a9d1187d0935ffc03d1f1177e340
Signed-off-by: Chris Kay <chris.kay@arm.com>
19 months agobuild(bl31): sort sections by alignment by default
Chris Kay [Thu, 26 Jan 2023 18:31:52 +0000 (18:31 +0000)]
build(bl31): sort sections by alignment by default

This change forces LD to sort all input sections by alignment when
allocating them within an output section. This is done in some places
explicitly in the linker scripts today, but this makes sure we don't
miss any easy targets.

Change-Id: Iadcd38a66a7a9f4b2af3adbc0487a15091486b17
Signed-off-by: Chris Kay <chris.kay@arm.com>
19 months agobuild(bl2u): sort sections by alignment by default
Chris Kay [Thu, 26 Jan 2023 18:31:52 +0000 (18:31 +0000)]
build(bl2u): sort sections by alignment by default

This change forces LD to sort all input sections by alignment when
allocating them within an output section. This is done in some places
explicitly in the linker scripts today, but this makes sure we don't
miss any easy targets.

Change-Id: I2745327ed106295e0e0d3a54b3096514a1403c3c
Signed-off-by: Chris Kay <chris.kay@arm.com>
19 months agobuild(bl2): sort sections by alignment by default
Chris Kay [Thu, 26 Jan 2023 18:31:52 +0000 (18:31 +0000)]
build(bl2): sort sections by alignment by default

This change forces LD to sort all input sections by alignment when
allocating them within an output section. This is done in some places
explicitly in the linker scripts today, but this makes sure we don't
miss any easy targets.

Change-Id: Id70be2a5399c4c75fcf2a736cab0991d20a6b863
Signed-off-by: Chris Kay <chris.kay@arm.com>
19 months agobuild(bl1): sort sections by alignment by default
Chris Kay [Fri, 6 Jan 2023 11:02:00 +0000 (11:02 +0000)]
build(bl1): sort sections by alignment by default

This change forces LD to sort all input sections by alignment when
allocating them within an output section. This is done in some places
explicitly in the linker scripts today, but this makes sure we don't
miss any easy targets.

Change-Id: I69d6acea822036a6365a7ea10fa732b5e0387f52
Signed-off-by: Chris Kay <chris.kay@arm.com>
19 months agofix(uuid): add missing `#include` directives
Chris Kay [Thu, 13 Apr 2023 16:24:20 +0000 (17:24 +0100)]
fix(uuid): add missing `#include` directives

These include directives were missing from both `uuid.h` files.

Change-Id: I875dfda3e0985728277b72f0e7597dde5cf9d304
Signed-off-by: Chris Kay <chris.kay@arm.com>
19 months agoMerge changes I43a9d83c,Ibfaa47fb into integration
Sandrine Bailleux [Mon, 17 Apr 2023 14:18:39 +0000 (16:18 +0200)]
Merge changes I43a9d83c,Ibfaa47fb into integration

* changes:
  fix(intel): fix Agilex and N5X clock manager to main PLL C0
  feat(intel): implement timer init divider via CPU frequency for N5X

19 months agofeat(imx8): add support for debug uart on lpuart1
Markus Niebel [Tue, 2 Mar 2021 17:44:25 +0000 (18:44 +0100)]
feat(imx8): add support for debug uart on lpuart1

Needed for TQMa8Xx on MBa8Xx. With this changes it is
possible to build:

$ make PLAT=imx8qx IMX_DEBUG_UART=1 DEBUG_CONSOLE=1 bl31

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Change-Id: If380845b254f30fe919ebb33c86130597c4b8ad3

19 months agofix(zynqmp): remove unused PLAT_NUM_POWER_DOMAINS
Michal Simek [Mon, 17 Apr 2023 11:51:59 +0000 (13:51 +0200)]
fix(zynqmp): remove unused PLAT_NUM_POWER_DOMAINS

Remove unused PLAT_NUM_POWER_DOMAINS macro. Macro is referenced by
docs/design/psci-pd-tree.rst but it is not used in any calculation
that's why it is better to remove it.

Change-Id: I33f26cda6a4404061af5598ea4c751f64127e50a
Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agofeat(versal): switch to xlat_v2
Michal Simek [Thu, 13 Apr 2023 11:19:11 +0000 (13:19 +0200)]
feat(versal): switch to xlat_v2

Switch to v2 version to add support for dynamic mapping which is not
supported in v1. It can be used for run time DT mapping.

Change-Id: I3f27591caf944dc758cc45ee870b9b5b3ff0a18d
Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agofix(xilinx): remove asserts around arg0/arg1
Michal Simek [Mon, 17 Apr 2023 11:15:23 +0000 (13:15 +0200)]
fix(xilinx): remove asserts around arg0/arg1

The commit a6f340fe58b9 ("Introduce the new BL handover interface")
extended handoff to 4 registers instead of 2. Arguments arg0-3 are
not used by platform code but in future they can be used for it.
But it doesn't make sense to checking their unused value.

Change-Id: I151e4b1574465409424453c054d937487086b79a
Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agoMerge "fix(versal): replace FPD_MAINCCI* macros" into integration
Joanna Farley [Mon, 17 Apr 2023 11:08:26 +0000 (13:08 +0200)]
Merge "fix(versal): replace FPD_MAINCCI* macros" into integration

19 months agoMerge "feat(mt8188): add apu power on/off control" into integration
Manish Pandey [Mon, 17 Apr 2023 09:23:28 +0000 (11:23 +0200)]
Merge "feat(mt8188): add apu power on/off control" into integration

19 months agoMerge "feat(qemu): increase max cpus per cluster to 16" into integration
Bipin Ravi [Fri, 14 Apr 2023 21:04:18 +0000 (23:04 +0200)]
Merge "feat(qemu): increase max cpus per cluster to 16" into integration

19 months agoMerge "fix(cpus): use hint instruction for "tsb csync"" into integration
Bipin Ravi [Fri, 14 Apr 2023 21:01:32 +0000 (23:01 +0200)]
Merge "fix(cpus): use hint instruction for "tsb csync"" into integration

19 months agostyle(xilinx): replace ARM by Arm in copyrights
Michal Simek [Fri, 14 Apr 2023 06:43:51 +0000 (08:43 +0200)]
style(xilinx): replace ARM by Arm in copyrights

The commit 6bb49c876c75 ("style(hooks): adds Arm copyright style fix")
is enforcing proper case for ARM. That's why fix it in plat/xilinx to
make sure that pre-commit.copyright won't be touching platform specific
files.

Change-Id: I49c66e18d46ed871a6aa128c9b2a403d0cf83416
Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agofix(versal): replace FPD_MAINCCI* macros
Michal Simek [Fri, 14 Apr 2023 06:39:49 +0000 (08:39 +0200)]
fix(versal): replace FPD_MAINCCI* macros

Replace FPD_MAINCCI* macros by PLAT_ARM_CCI* not to have two different
names for the same IP.

Change-Id: Ia1930e150a51603471051acec5c79c649d57f92f
Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agofix(intel): fix Agilex and N5X clock manager to main PLL C0
Jit Loon Lim [Thu, 22 Dec 2022 13:52:36 +0000 (21:52 +0800)]
fix(intel): fix Agilex and N5X clock manager to main PLL C0

Update Agilex and N5X clock manager to get MPU clock from mainPLL C0
and PeriPLLC0.
1. Updated macro name PLAT_SYS_COUNTER_CONVERT_TO_MHZ to
PLAT_HZ_CONVERT_TO_MHZ.
2. Updated get_cpu_clk to point to get_mpu_clk and added comment.
3. Added get_mpu_clk to get clock from main PLL C0 and Peri PLL C0.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I43a9d83caa832b61eba93a830e2a671fd4dffa19

19 months agofeat(intel): implement timer init divider via CPU frequency for N5X
Sieu Mun Tang [Thu, 23 Jun 2022 10:05:02 +0000 (18:05 +0800)]
feat(intel): implement timer init divider via CPU frequency for N5X

Get CPU frequency and update the timer init div with it.
The timer is vary based on the CPU frequency instead of hardcoded.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: Ibfaa47fb7a25176eebf06f4828bf9729d56f12ed

19 months agoMerge "feat(hcx): initialize HCRX_EL2 to its default value" into integration
Manish Pandey [Thu, 13 Apr 2023 16:10:44 +0000 (18:10 +0200)]
Merge "feat(hcx): initialize HCRX_EL2 to its default value" into integration

19 months agoMerge "fix(stm32mp15-fdts): use /omit-if-no-ref/ for spi and i2c" into integration
Madhukar Pappireddy [Thu, 13 Apr 2023 14:33:27 +0000 (16:33 +0200)]
Merge "fix(stm32mp15-fdts): use /omit-if-no-ref/ for spi and i2c" into integration

19 months agoMerge "docs(maintainers): update maintainers for n1sdp/morello" into integration
Manish Pandey [Thu, 13 Apr 2023 09:51:14 +0000 (11:51 +0200)]
Merge "docs(maintainers): update maintainers for n1sdp/morello" into integration

19 months agoMerge "fix(rpi3): initialize SD card host controller" into integration
André Przywara [Thu, 13 Apr 2023 09:33:00 +0000 (11:33 +0200)]
Merge "fix(rpi3): initialize SD card host controller" into integration

19 months agofix(rpi3): initialize SD card host controller
Rob Newberry [Thu, 30 Mar 2023 17:43:21 +0000 (10:43 -0700)]
fix(rpi3): initialize SD card host controller

Add initial configuration parameters for Rasperry Pi 3's sdhost
controller, and then configure and use those parameters.

This change allows warm reboots of UEFI on Raspberry Pi 3B+ where
existing code often fails with "unknown error". See discussion at:

https://github.com/pftf/RPi3/issues/24

The basic idea is that some initial configuration parameters
(clock rate, bus width) aren't configured into the hardware before
commands start being sent. I suspect that the particular setting
that matters is the "slow card" bit, but the initial clock setting
also seemed wrong to me.

Change-Id: I526def340def143f23f3422f1fc14c12c937ca7f
Signed-off-by: Rob Newberry <robthedude@mac.com>
19 months agofeat(hcx): initialize HCRX_EL2 to its default value
Juan Pablo Conde [Wed, 22 Feb 2023 16:09:52 +0000 (10:09 -0600)]
feat(hcx): initialize HCRX_EL2 to its default value

The value of register HCRX_EL2 is UNKNOWN out of reset. This can
affect the behavior in lower exception levels, such as traps to
EL2 due to a wrong configuration of the register upon reset.

This patch initializes the register at EL3 and disables all traps
related to it.

On the other hand, new fields have been introduced for HCRX_EL2,
which are now defined in this patch, so they can be used in
further development.

Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
Change-Id: I0bf1e949aa0d3be9f227358ad088a1ecb96ce222

19 months agoMerge "feat(pie/por): support permission indirection and overlay" into integration
André Przywara [Wed, 12 Apr 2023 15:47:54 +0000 (17:47 +0200)]
Merge "feat(pie/por): support permission indirection and overlay" into integration

19 months agoMerge "fix(psci): potential array overflow with cpu on" into integration
Manish Pandey [Wed, 12 Apr 2023 14:47:36 +0000 (16:47 +0200)]
Merge "fix(psci): potential array overflow with cpu on" into integration

19 months agofeat(pie/por): support permission indirection and overlay
Mark Brown [Tue, 14 Mar 2023 20:48:43 +0000 (20:48 +0000)]
feat(pie/por): support permission indirection and overlay

Arm v8.9 introduces a series of features providing a new way to set memory
permissions. Instead of directly encoding the permissions in the page
tables the PTEs contain indexes into an array of permissions stored in
system registers, allowing greater flexibility and density of encoding.

Enable access to these features for EL2 and below, context switching the
newly added EL2 registers as appropriate. Since all of FEAT_S[12]P[IO]E
are separately discoverable we have separate build time options for
enabling them, but note that there is overlap in the registers that they
implement and the enable bit required for lower EL access.

Change the FVP platform to default to handling them as dynamic options so
the right decision can be made by the code at runtime.

Signed-off-by: Mark Brown <broonie@kernel.org>
Change-Id: Icf89e444e39e1af768739668b505661df18fb234

19 months agoMerge "fix(imx8mq): fix compilation with gcc >= 12.x" into integration
André Przywara [Wed, 12 Apr 2023 12:40:36 +0000 (14:40 +0200)]
Merge "fix(imx8mq): fix compilation with gcc >= 12.x" into integration

19 months agoMerge "feat(zynqmp): make stack size configurable" into integration
Joanna Farley [Wed, 12 Apr 2023 09:04:09 +0000 (11:04 +0200)]
Merge "feat(zynqmp): make stack size configurable" into integration

19 months agoMerge "feat(intel): fix bridge disable and reset" into integration
Sandrine Bailleux [Wed, 12 Apr 2023 06:32:56 +0000 (08:32 +0200)]
Merge "feat(intel): fix bridge disable and reset" into integration

19 months agofix(psci): potential array overflow with cpu on
Olivier Deprez [Tue, 11 Apr 2023 08:00:21 +0000 (10:00 +0200)]
fix(psci): potential array overflow with cpu on

Fix coverity finding in psci_cpu_on, in which target_idx is directly
assigned the return value from plat_core_pos_by_mpidr. If the latter
returns a negative or large positive value, it can trigger an out of
bounds overflow for the psci_cpu_pd_nodes array.

>>>>    CID 382009:    (OVERRUN)
>>>>    Overrunning callee's array of size 8 by passing argument "target_idx" (which evaluates to 4294967295) in call to "psci_spin_lock_cpu".
> 80         psci_spin_lock_cpu(target_idx);

>>>>    CID 382009:    (OVERRUN)
>>>>    Overrunning callee's array of size 8 by passing argument "target_idx" (which evaluates to 4294967295) in call to "psci_spin_unlock_cpu".
> 160         psci_spin_unlock_cpu(target_idx);

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: Ibc46934e9ca7fdcaeebd010e5c6954dcf2dcf8c7

19 months agoMerge changes from topic "mb/rst-to-bl31-update" into integration
Manish V Badarkhe [Tue, 11 Apr 2023 15:10:23 +0000 (17:10 +0200)]
Merge changes from topic "mb/rst-to-bl31-update" into integration

* changes:
  docs: update RESET_TO_BL31 documentation
  fix(bl31): avoid clearing of argument registers in RESET_TO_BL31 case
  Revert "docs(bl31): aarch64: RESET_TO_BL31_WITH_PARAMS"
  Revert "feat(bl31): aarch64: RESET_TO_BL31_WITH_PARAMS"

19 months agofeat(zynqmp): make stack size configurable
Akshay Belsare [Thu, 6 Apr 2023 10:51:06 +0000 (16:21 +0530)]
feat(zynqmp): make stack size configurable

If PLATFORM_STACK_SIZE not already defined, use the default value of
PLATFORM_STACK_SIZE.
This makes the stack size value configurable for different interface
like custom packages.

Signed-off-by: Amit Nagal <amit.nagal@amd.com>
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
Change-Id: I87e9fcbfb4c4092378b1ac0ff8fb6d084495d320

19 months agoMerge changes from topic "sb/doc-updates" into integration
Sandrine Bailleux [Tue, 11 Apr 2023 08:14:24 +0000 (10:14 +0200)]
Merge changes from topic "sb/doc-updates" into integration

* changes:
  docs(porting): refer the reader back to the threat model
  docs(porting): move porting guide upper in table of contents

19 months agodocs(porting): refer the reader back to the threat model
Sandrine Bailleux [Tue, 4 Apr 2023 14:36:08 +0000 (16:36 +0200)]
docs(porting): refer the reader back to the threat model

When porting TF-A to a new platform, it is essential to read the
threat model documents in conjunction with the porting guide to
understand the security responsibilities of each platform interface
to implement.

Add a note to highlight this in the porting guide.

Change-Id: Icd1e41ae4b15032b72531690dd82a9ef95ca0db5
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
19 months agodocs(porting): move porting guide upper in table of contents
Sandrine Bailleux [Wed, 8 Feb 2023 13:07:29 +0000 (14:07 +0100)]
docs(porting): move porting guide upper in table of contents

The porting guide is currently hosted under the 'Getting started'
section. Yet, porting the full firmware to a new platform is probably
not the first thing that one would do. Before delving into the
details, one would probably start by building the code for an emulated
platform, such as Arm FVP.

Furthermore, the porting guide is such a big and important document
that it probably deserves being visible in the main table of contents.
Thus, move it just above the list of supported platforms.

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

19 months agoMerge changes from topic "sb/doc-updates" into integration
Sandrine Bailleux [Tue, 11 Apr 2023 08:04:32 +0000 (10:04 +0200)]
Merge changes from topic "sb/doc-updates" into integration

* changes:
  docs(porting): remove reference to xlat_table lib v1
  docs(porting): remove pull request terminology
  docs(changelog): add 'porting' scope

19 months agodocs(porting): remove reference to xlat_table lib v1
Sandrine Bailleux [Wed, 8 Feb 2023 13:02:45 +0000 (14:02 +0100)]
docs(porting): remove reference to xlat_table lib v1

Version 1 of the translation table library is deprecated. Refer to
version 2 instead.

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

19 months agodocs(porting): remove pull request terminology
Sandrine Bailleux [Wed, 8 Feb 2023 13:01:18 +0000 (14:01 +0100)]
docs(porting): remove pull request terminology

The pull request terminology dates back from when TF-A repository was
hosted on Github. Use a terminology that is more suited to Gerrit
workflow.

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

19 months agodocs(changelog): add 'porting' scope
Sandrine Bailleux [Wed, 8 Feb 2023 12:58:25 +0000 (13:58 +0100)]
docs(changelog): add 'porting' scope

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

19 months agoMerge "fix(intel): update boot scratch to indicate to Uboot is PSCI ON" into integration
Sandrine Bailleux [Tue, 11 Apr 2023 07:39:11 +0000 (09:39 +0200)]
Merge "fix(intel): update boot scratch to indicate to Uboot is PSCI ON" into integration