]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
3 years agofeat(intel): support SiP SVC version
Sieu Mun Tang [Wed, 27 Apr 2022 10:24:06 +0000 (18:24 +0800)]
feat(intel): support SiP SVC version

This command supports to return SiP SVC major and minor version.

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

3 years agofeat(intel): enable firewall for OCRAM in BL31
Abdul Halim, Muhammad Hadi Asyrafi [Wed, 5 Aug 2020 14:40:46 +0000 (22:40 +0800)]
feat(intel): enable firewall for OCRAM in BL31

Set OCRAM as secure region and required privileged access in BL31 to
prevent software running in normal world (non-secure) accessing memory
region in OCRAM which may contain sensitive information (e.g. FSBL,
handoff data)

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ib6b24efd69f49cd3f9aa4ef2ea9f1af5ce582bd6
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
3 years agofeat(intel): create source file for firewall configuration
Abdul Halim, Muhammad Hadi Asyrafi [Thu, 6 Aug 2020 02:21:54 +0000 (10:21 +0800)]
feat(intel): create source file for firewall configuration

Move codes that previously were part of system_manager driver into
firewall driver which are more appropriate based on their functionalities.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I35e9d792f35ee7491c2f306781417a0c8faae3fd
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
3 years agofix(intel): refactor NOC header
Abdul Halim, Muhammad Hadi Asyrafi [Wed, 5 Aug 2020 14:12:23 +0000 (22:12 +0800)]
fix(intel): refactor NOC header

Refactor NOC header to be shareable across both Stratix 10 and Agilex
platforms. This patch also removes redundant NOC declarations in system
manager header file.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I6348b67a8b54c2ad19327d6b8c25ae37d25e4b4a
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
3 years agoMerge "docs(zynqmp): update the make command" into integration
Madhukar Pappireddy [Wed, 27 Apr 2022 14:41:21 +0000 (16:41 +0200)]
Merge "docs(zynqmp): update the make command" into integration

3 years agoMerge changes Ibe6fd206,Icdca3de6,I72016620,I57a2787c into integration
Madhukar Pappireddy [Wed, 27 Apr 2022 14:40:38 +0000 (16:40 +0200)]
Merge changes Ibe6fd206,Icdca3de6,I72016620,I57a2787c into integration

* changes:
  fix(versal): fix coverity scan warnings
  feat(versal): get version for ATF related EEMI APIs
  feat(versal): enhance PM_IOCTL EEMI API to support additional arg
  feat(versal): add common interfaces to handle EEMI commands

3 years agoMerge "refactor(twed): improve TWED enablement in EL-3" into integration
Manish Pandey [Wed, 27 Apr 2022 09:01:52 +0000 (11:01 +0200)]
Merge "refactor(twed): improve TWED enablement in EL-3" into integration

3 years agoMerge changes from topic "st_clk_fix" into integration
Manish Pandey [Wed, 27 Apr 2022 08:35:12 +0000 (10:35 +0200)]
Merge changes from topic "st_clk_fix" into integration

* changes:
  fix(st-clock): correct stm32_clk_parse_fdt_by_name
  fix(st-clock): check _clk_stm32_get_parent return

3 years agodocs(zynqmp): update the make command
Venkatesh Yadav Abbarapu [Mon, 11 Apr 2022 03:43:17 +0000 (09:13 +0530)]
docs(zynqmp): update the make command

Update the make command with the RESET_TO_BL31=1 addition.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: I46cc81abb539773706348464b3061d20d94522e9

3 years agofix(versal): fix coverity scan warnings
Tanmay Shah [Wed, 23 Mar 2022 19:43:45 +0000 (12:43 -0700)]
fix(versal): fix coverity scan warnings

- Fix memory overrun issue
- include header file to fix Unknown macro warning

Change-Id: Ibe6fd206f44fbc22de746d255ff17c2b2325cd7b
Signed-off-by: Tanmay Shah <tanmay.shah@xilinx.com>
3 years agofeat(versal): get version for ATF related EEMI APIs
Ronak Jain [Fri, 4 Feb 2022 08:42:55 +0000 (00:42 -0800)]
feat(versal): get version for ATF related EEMI APIs

The patch does below things.

1. As per current implementation, when Linux send a request to ATF to
 get the version of APIs which are implemented in ATF then ATF wasn't
 returning any version because there is a check for LIBPM module id.
 The ATF is used to return version for the APIs which are implemented
 in the firmware only.

 Hence moved this switch-case before checking module id to get ATF
 version.

 Also, no need to pass Linux request to the firmware for the APIs
 which are implemented in ATF instead return success after updating
 version.

2. As per current implementation, higher 16-bit is used for ATF
 version and lower 16-bit is used for firmware version. Now, removed
 16-bit shift operation and send complete word i.e. 32-bit to Linux
 user as there is no user who checks ATF version.

3. Add bit mask support in the feature check PM EEMI API for QUERY and
 IOCTL ids.

Change-Id: Icdca3de6659f3b673b81a423ed79a3c20b678768
Signed-off-by: Ronak Jain <ronak.jain@xilinx.com>
Signed-off-by: Tanmay Shah <tanmay.shah@xilinx.com>
3 years agofeat(versal): enhance PM_IOCTL EEMI API to support additional arg
Venkatesh Yadav Abbarapu [Thu, 21 Oct 2021 04:11:53 +0000 (22:11 -0600)]
feat(versal): enhance PM_IOCTL EEMI API to support additional arg

Currently, SMC handler is limited to parsing 5 arguments (1 API ID + 4
32-bit command args). Extend this handling to support one more 32-bit
command argument which is necessary to support new IOCTL IDs for
secure read/write interface.

Note that, this change is completely transparent and does not affect
existing functionality of any of the EEMI APIs.

Change-Id: I72016620eeeaf598f14853512120bfb30bb9a3e9
Signed-off-by: Izhar Ameer Shaikh <izhar.ameer.shaikh@xilinx.com>
Signed-off-by: Tanmay Shah <tanmay.shah@xilinx.com>
3 years agofeat(versal): add common interfaces to handle EEMI commands
Tanmay Shah [Mon, 9 Aug 2021 18:00:41 +0000 (11:00 -0700)]
feat(versal): add common interfaces to handle EEMI commands

This change adds common interfaces to handle commands from firmware driver
to power management controller. It removes big chunk of source line of code
that was handling each command separately and doing same repetitive work.

EEMI - Embedded Energy Management Interface is Xilinx proprietary
protocol to allow communication between power management controller
and different processing clusters.

As of now, Each EEMI command has its own implementation in TF-A.
This is redundant. Essentially most EEMI command implementation
in TF-A  does same work. It prepares payload received from kernel, sends
payload to firmware, receives response from firmware and send response
back to kernel.

The same functionality can be achieved if common interface is used among
multiple EEMI commands. This change divides platform management related
SMCCC requests into 4 categories.

1) EEMI commands required for backward compatibility.

Some EEMI commands are still required for backward compatibility
until removed completely or its use is changed to accommodate
common interface

2) EEMI commands that require for PSCI interface and accessed from debugfs

For example EEMI calls related to CPU suspend/resume

3) TF-A specific requests

Functionality such as getting TF-A version and getting callback
data for platform management is handled by this interface

4) Common interface for rest of EEMI commands

This handlers performs payload and firmware response transaction job for
rest of EEMI commands. Also it parses module ID from SMC payload and inserts
in IPI request. If not module ID is found, then default is LIBPM_MODULE_ID.
This helps in making common path in TF-A for all the modules in PLM firmware

Change-Id: I57a2787c7fff9f2e1d1f9003b3daab092632d57e
Signed-off-by: Tanmay Shah <tanmay.shah@xilinx.com>
3 years agoMerge "feat(tc): enable CI-700 PMU for profiling" into integration
Madhukar Pappireddy [Tue, 26 Apr 2022 21:16:53 +0000 (23:16 +0200)]
Merge "feat(tc): enable CI-700 PMU for profiling" into integration

3 years agofeat(tc): enable CI-700 PMU for profiling
Rupinderjit Singh [Tue, 22 Feb 2022 21:50:33 +0000 (21:50 +0000)]
feat(tc): enable CI-700 PMU for profiling

Change-Id: Iaafdfc440b362022e6103eabf3fb2ebed85b6575
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
3 years agoMerge "docs(intel): add Sieu Mun and Benjamin Jit Loon as maintainers" into integration
Joanna Farley [Tue, 26 Apr 2022 10:18:18 +0000 (12:18 +0200)]
Merge "docs(intel): add Sieu Mun and Benjamin Jit Loon as maintainers" into integration

3 years agoMerge changes from topic "sb/mbedtls-2.28" into integration
Sandrine Bailleux [Tue, 26 Apr 2022 05:49:06 +0000 (07:49 +0200)]
Merge changes from topic "sb/mbedtls-2.28" into integration

* changes:
  docs(prerequisites): upgrade to mbed TLS 2.28.0
  build(deps): upgrade to mbed TLS 2.28.0

3 years agoMerge "fix(xilinx): fix mismatching function prototype" into integration
Madhukar Pappireddy [Tue, 26 Apr 2022 02:45:16 +0000 (04:45 +0200)]
Merge "fix(xilinx): fix mismatching function prototype" into integration

3 years agoMerge changes Iccfa7ec6,Ide9a7af4 into integration
Lauren Wehrmeister [Mon, 25 Apr 2022 21:02:07 +0000 (23:02 +0200)]
Merge changes Iccfa7ec6,Ide9a7af4 into integration

* changes:
  feat(intel): add macro to switch between different UART PORT
  feat(intel): add SMC support for ROM Patch SHA384 mailbox

3 years agoMerge "fix(bakery_lock): add __unused for clang" into integration
Lauren Wehrmeister [Mon, 25 Apr 2022 20:08:31 +0000 (22:08 +0200)]
Merge "fix(bakery_lock): add __unused for clang" into integration

3 years agoMerge "fix(ufs): fix cache maintenance issues" into integration
Madhukar Pappireddy [Mon, 25 Apr 2022 18:59:58 +0000 (20:59 +0200)]
Merge "fix(ufs): fix cache maintenance issues" into integration

3 years agoMerge changes from topic "st_fwu_bkp_reg" into integration
Madhukar Pappireddy [Mon, 25 Apr 2022 17:28:33 +0000 (19:28 +0200)]
Merge changes from topic "st_fwu_bkp_reg" into integration

* changes:
  feat(stm32mp1): retry 3 times FWU trial boot
  refactor(stm32mp1): update backup reg for FWU

3 years agodocs(prerequisites): upgrade to mbed TLS 2.28.0
Sandrine Bailleux [Fri, 22 Apr 2022 13:47:31 +0000 (15:47 +0200)]
docs(prerequisites): upgrade to mbed TLS 2.28.0

Upgrade to the latest and greatest 2.x release of Mbed TLS library
(i.e. v2.28.0) to take advantage of their bug fixes.

Note that the Mbed TLS project published version 3.x some time
ago. However, as this is a major release with API breakages, upgrading
to 3.x might require some more involved changes in TF-A, which we are
not ready to do. We shall upgrade to mbed TLS 3.x after the v2.7
release of TF-A.

Change-Id: I887dfd87893169c7be53b986e6c43338d15949d7
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agobuild(deps): upgrade to mbed TLS 2.28.0
Sandrine Bailleux [Thu, 21 Apr 2022 08:21:29 +0000 (10:21 +0200)]
build(deps): upgrade to mbed TLS 2.28.0

Upgrade to the latest and greatest 2.x release of Mbed TLS library
(i.e. v2.28.0) to take advantage of their bug fixes.

Note that the Mbed TLS project published version 3.x some time
ago. However, as this is a major release with API breakages, upgrading
to 3.x might require some more involved changes in TF-A, which we are
not ready to do. We shall upgrade to mbed TLS 3.x after the v2.7
release of TF-A.

Actually, the upgrade this time simply boils down to including the new
source code module 'constant_time.c' into the firmware.

To quote mbed TLS v2.28.0 release notes [1]:

  The mbedcrypto library includes a new source code module
  constant_time.c, containing various functions meant to resist timing
  side channel attacks. This module does not have a separate
  configuration option, and functions from this module will be
  included in the build as required.

As a matter of fact, if one is attempting to link TF-A against mbed
TLS v2.28.0 without the present patch, one gets some linker errors
due to missing symbols from this new module.

Apart from this, none of the items listed in mbed TLS release
notes [1] directly affect TF-A. Special note on the following one:

  Fix a bug in mbedtls_gcm_starts() when the bit length of the iv
  exceeds 2^32.

In TF-A, we do use mbedtls_gcm_starts() when the firmware decryption
feature is enabled with AES-GCM as the authenticated decryption
algorithm (DECRYPTION_SUPPORT=aes_gcm). However, the iv_len variable
which gets passed to mbedtls_gcm_starts() is an unsigned int, i.e. a
32-bit value which by definition is always less than 2**32. Therefore,
we are immune to this bug.

With this upgrade, the size of BL1 and BL2 binaries does not appear to
change on a standard sample test build (with trusted boot and measured
boot enabled).

[1] https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.0

Change-Id: Icd5dbf527395e9e22c8fd6b77427188bd7237fd6
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agoMerge "docs(prerequisites): update Arm compilers download link" into integration
Sandrine Bailleux [Mon, 25 Apr 2022 08:05:08 +0000 (10:05 +0200)]
Merge "docs(prerequisites): update Arm compilers download link" into integration

3 years agodocs(prerequisites): update Arm compilers download link
Sandrine Bailleux [Fri, 15 Apr 2022 09:17:40 +0000 (11:17 +0200)]
docs(prerequisites): update Arm compilers download link

Right now, TF-A documentation recommends downloading Arm compilers
from:

  https://developer.arm.com/open-source/gnu-toolchain/gnu-a/downloads

However, this page is now deprecated, as indicated by the banner at
the top of the page. When navigating to the new recommended page, one
can see the following note, which provides the rationale for the
deprecation:

  GNU Toolchain releases from Arm were published previously as two
  separate releases - one for A-profile and the other for R & M
  profiles (GNU Toolchain for A-profile processors and GNU Arm
  Embedded Toolchain).

  Arm GNU Toolchain releases unifies these two into a single release
  and the previous way of releases therefore have been
  discontinued. However, the previous releases will continue to be
  available for reference.

This patch updates the link to the new recommended place for compiler
downloads.

Change-Id: Iefdea3866a1af806a5db2d2288edbb63c543b8ee
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agoMerge "docs: fix mailing lists URLs" into integration
Sandrine Bailleux [Mon, 25 Apr 2022 05:58:46 +0000 (07:58 +0200)]
Merge "docs: fix mailing lists URLs" into integration

3 years agodocs(intel): add Sieu Mun and Benjamin Jit Loon as maintainers
Sieu Mun Tang [Sat, 19 Mar 2022 06:21:55 +0000 (14:21 +0800)]
docs(intel): add Sieu Mun and Benjamin Jit Loon as maintainers

Add Sieu Mun Tang and Benjamin Jit Loon Lim as new
Intel SocFPGA platform maintainers and remove the
rest of the Intel SocFPGA platform maintainers.

Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: Ieb9a35e278d70a12351aaccab90ddc7be09dc861

3 years agoMerge changes from topic "ffa_el3_spmc" into integration
Olivier Deprez [Fri, 22 Apr 2022 19:09:13 +0000 (21:09 +0200)]
Merge changes from topic "ffa_el3_spmc" into integration

* changes:
  feat(spmc): add support for direct req/resp
  feat(spmc): add support for handling FFA_ERROR ABI
  feat(spmc): add support for FFA_MSG_WAIT
  feat(spmc): add function to determine the return path from the SPMC
  feat(spmd): enable handling of FF-A SMCs with the SPMC at EL3
  feat(spmd): update SPMC init flow to use EL3 implementation
  feat(spmc): add FF-A secure partition manager core
  feat(spmc): prevent read only xlat tables with the EL3 SPMC
  feat(spmc): enable building of the SPMC at EL3
  refactor(spm_mm): reorganize secure partition manager code

3 years agoMerge "fix(stm32mp1): correct dtc version check" into integration
Manish Pandey [Fri, 22 Apr 2022 15:22:59 +0000 (17:22 +0200)]
Merge "fix(stm32mp1): correct dtc version check" into integration

3 years agofix(stm32mp1): correct dtc version check
Yann Gautier [Fri, 22 Apr 2022 11:12:37 +0000 (13:12 +0200)]
fix(stm32mp1): correct dtc version check

Depending on the shell used, the grep command can fail, leading to
a wrong dtc version detection. Correct that by adding quotes.

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

3 years agoMerge "feat(spm): add FFA_RX_ACQUIRE forwarding in SPMD" into integration
Olivier Deprez [Thu, 21 Apr 2022 09:35:42 +0000 (11:35 +0200)]
Merge "feat(spm): add FFA_RX_ACQUIRE forwarding in SPMD" into integration

3 years agodocs: fix mailing lists URLs
Sandrine Bailleux [Thu, 21 Apr 2022 08:17:22 +0000 (10:17 +0200)]
docs: fix mailing lists URLs

With the transition to mailman3, the URLs of TF-A and TF-A Tests
mailing lists have changed. However, we still refer to the old
location, which are now dead links.

Update all relevant links throughout the documentation.

There is one link referring to a specific thread on the TF-A mailing
list in the SPM documentation, for which I had to make a guess as to
what's the equivalent mailman3 URL. The old URL scheme indicates that
the thread dates from February 2020 but beyond that, I could not make
sense of the thread id within the old URL so I picked the most likely
match amongst the 3 emails posted on the subject in this time period.

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Reported-by: Kuohong Wang <kuohong.wang@mediatek.com>
Change-Id: I83f4843afd1dd46f885df225931d8458152dbb58

3 years agofeat(spmc): add support for direct req/resp
Marc Bonnici [Mon, 29 Nov 2021 17:05:57 +0000 (17:05 +0000)]
feat(spmc): add support for direct req/resp

Enable the SPMC to handle FFA_MSG_SEND_DIRECT_REQ and
FFA_MSG_SEND_DIRECT_RESP ABIs.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: Ia196c7405993f600e4fdbf467397ea3fb035a62a

3 years agofeat(spmc): add support for handling FFA_ERROR ABI
Marc Bonnici [Fri, 10 Dec 2021 09:21:56 +0000 (09:21 +0000)]
feat(spmc): add support for handling FFA_ERROR ABI

This ABI is only valid during SP initialisation to indicate
failure. If this occurs during SP initialisation signal a failure,
otherwise respond with a not supported error code.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I0182a1641c0f6850e82173af333be79b594f2318

3 years agofeat(spmc): add support for FFA_MSG_WAIT
Marc Bonnici [Mon, 29 Nov 2021 17:05:33 +0000 (17:05 +0000)]
feat(spmc): add support for FFA_MSG_WAIT

Handle an incoming call of FFA_MSG_WAIT from the secure world
and update the runtime state of the calling partition accordingly.

This ABI can be called in the following scenarios:
  - Used by an SP to signal it has finished initializing.
  - To resume the normal world after handling a secure interrupt
    that interrupted the normal world.
  - To relinquish control back to the normal world.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I929713a2280e8ec291b5b4e8f6d4b49df337228c

3 years agofeat(spmc): add function to determine the return path from the SPMC
Marc Bonnici [Mon, 29 Nov 2021 17:17:29 +0000 (17:17 +0000)]
feat(spmc): add function to determine the return path from the SPMC

Use knowledge of the target partition ID and source security state
to determine which route should be used to exit the SPMC.

There are 3 exit paths:
1) Return to the normal world via the SPMD, this will take care of
   switching contexts if required.
2) Return to the secure world when the call originated in the normal
   world and therefore switch contexts.
3) Return to the secure world when the call originated in the secure
   world, therefore we can return directly.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I4037f3a8a8519e2c9f1876be92806d2c41d0d154

3 years agofeat(spmd): enable handling of FF-A SMCs with the SPMC at EL3
Marc Bonnici [Mon, 29 Nov 2021 18:02:45 +0000 (18:02 +0000)]
feat(spmd): enable handling of FF-A SMCs with the SPMC at EL3

Any FF-A SMC that arrives from the normal world is handled by the
SPMD before being forwarded to the SPMC. Similarly any SMC
arriving from the secure world will hit the SPMC first and be
forwarded to the SPMD if required, otherwise the SPMC will
respond directly.

This allows for the existing flow of handling FF-A ABI's when
the SPMC resides at a lower EL to be preserved.

In order to facilitate this flow the spmd_smc_forward function
has been split and control is either passed to the SPMC or it is
forwarded as before. To allow this the flags and cookie parameters
must now also be passed into this method as the SPMC must be able to
provide these when calling back into the SPMD handler as appropriate.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I84fee8390023295b9689067e14cd25cba23ca39b

3 years agofeat(spmd): update SPMC init flow to use EL3 implementation
Marc Bonnici [Mon, 29 Nov 2021 17:57:03 +0000 (17:57 +0000)]
feat(spmd): update SPMC init flow to use EL3 implementation

Allow the SPMD to initialise an SPMC implementation at EL3 directly
rather than at a lower EL.
This includes removing the requirement to parse an SPMC manifest to
obtain information about the SPMC implementation, in this case since the
SPMD and SPMC reside in the same EL we can hardcode the required
information directly.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I66d1e1b3ec2d0abbfc28b011a32445ee890a331d

3 years agofeat(spmc): add FF-A secure partition manager core
Marc Bonnici [Wed, 1 Dec 2021 17:57:04 +0000 (17:57 +0000)]
feat(spmc): add FF-A secure partition manager core

This patch introduces the core support for enabling an SPMC in EL3
as per the FF-A spec.

The current implemented functionality is targeted to enable
initialization of the SPMC itself and initial support for
bringing up a single S-EL1 SP.

This includes initialization of the SPMC's internal state,
parsing of an SP's manifest, preparing the cpu contexts and
appropriate system registers for the Secure Partition.

The spmc_smc_handler is the main handler for all incoming SMCs
to the SPMC, FF-A ABI handlers and functionality will
be implemented in subsequent patches.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: Ib33c240b91e54cbd018a69fec880d02adfbe12b9

3 years agoMerge "fix(errata): workaround for Cortex-X2 erratum 2147715" into integration
Joanna Farley [Tue, 19 Apr 2022 15:07:49 +0000 (17:07 +0200)]
Merge "fix(errata): workaround for Cortex-X2 erratum 2147715" into integration

3 years agoMerge changes from topic "st_nvmem_layout" into integration
Manish Pandey [Tue, 19 Apr 2022 14:11:24 +0000 (16:11 +0200)]
Merge changes from topic "st_nvmem_layout" into integration

* changes:
  refactor(stm32mp1-fdts): remove nvmem_layout node
  refactor(stm32mp1): drop the "st,stm32-nvmem-layout" node
  refactor(st): remove useless includes

3 years agoMerge "refactor(ufs): delete unused variables" into integration
Manish Pandey [Tue, 19 Apr 2022 09:51:12 +0000 (11:51 +0200)]
Merge "refactor(ufs): delete unused variables" into integration

3 years agorefactor(twed): improve TWED enablement in EL-3
Jayanth Dodderi Chidanand [Mon, 28 Mar 2022 14:28:55 +0000 (15:28 +0100)]
refactor(twed): improve TWED enablement in EL-3

The current implementation uses plat_arm API under generic code.
"plat_arm" API is a convention used with Arm common platform layer
and is reserved for that purpose. In addition, the function has a
weak definition which is not encouraged in TF-A.

Henceforth, removing the weak API with a configurable macro "TWED_DELAY"
of numeric data type in generic code and simplifying the implementation.
By default "TWED_DELAY" is defined to zero, and the delay value need to
be explicitly set by the platforms during buildtime.

Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Change-Id: I25cd6f628e863dc40415ced3a82d0662fdf2d75a

3 years agorefactor(ufs): delete unused variables
Jorge Troncoso [Thu, 14 Apr 2022 21:31:29 +0000 (14:31 -0700)]
refactor(ufs): delete unused variables

The result variable is not being used so it's better to delete it.

Signed-off-by: Jorge Troncoso <jatron@google.com>
Change-Id: Icae614076ce1ba7cdc86267473d59a8bec682f6c

3 years agofeat(spmc): prevent read only xlat tables with the EL3 SPMC
Sayanta Pattanayak [Sat, 6 Mar 2021 06:13:06 +0000 (11:43 +0530)]
feat(spmc): prevent read only xlat tables with the EL3 SPMC

If using the EL3 SPMC ensure that we don't mark the translation
tables as read only. The SPMC requires the ability to map and
unmap a partitions RX/TX buffers at runtime.

Signed-off-by: Sayanta Pattanayak <sayanta.pattanayak@arm.com>
Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: Ibb78a6a2e3847ce4ec74ce81a9bb61ce34fec24c

3 years agofeat(spmc): enable building of the SPMC at EL3
Marc Bonnici [Wed, 1 Dec 2021 18:00:40 +0000 (18:00 +0000)]
feat(spmc): enable building of the SPMC at EL3

Introduce build flag for enabling the secure partition
manager core, SPMC_AT_EL3. When enabled, the SPMC module
will be included into the BL31 image. By default the
flag is disabled.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I5ea1b953e5880a07ffc91c4dea876a375850cf2a

3 years agoMerge "refactor(context mgmt): add cm_prepare_el3_exit_ns function" into integration
Joanna Farley [Tue, 12 Apr 2022 15:44:52 +0000 (17:44 +0200)]
Merge "refactor(context mgmt): add cm_prepare_el3_exit_ns function" into integration

3 years agoMerge "refactor(mpam): remove initialization of EL2 registers when EL2 is used" into...
Joanna Farley [Tue, 12 Apr 2022 15:44:41 +0000 (17:44 +0200)]
Merge "refactor(mpam): remove initialization of EL2 registers when EL2 is used" into integration

3 years agoMerge "refactor(context mgmt): refactor the cm_setup_context function" into integration
Joanna Farley [Tue, 12 Apr 2022 15:44:31 +0000 (17:44 +0200)]
Merge "refactor(context mgmt): refactor the cm_setup_context function" into integration

3 years agoMerge "refactor(context mgmt): remove registers accessible only from secure state...
Joanna Farley [Tue, 12 Apr 2022 15:44:00 +0000 (17:44 +0200)]
Merge "refactor(context mgmt): remove registers accessible only from secure state from EL2 context" into integration

3 years agorefactor(context mgmt): add cm_prepare_el3_exit_ns function
Zelalem Aweke [Mon, 31 Jan 2022 22:59:42 +0000 (16:59 -0600)]
refactor(context mgmt): add cm_prepare_el3_exit_ns function

As part of the RFC:
https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/13651,
this patch adds the 'cm_prepare_el3_exit_ns' function. The function is
a wrapper to 'cm_prepare_el3_exit' function for Non-secure state.

When EL2 sysregs context exists (CTX_INCLUDE_EL2_REGS is
enabled) EL1 and EL2 sysreg values are restored from the context
instead of directly updating the registers.

Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com>
Change-Id: I9b071030576bb05500d54090e2a03b3f125d1653

3 years agorefactor(mpam): remove initialization of EL2 registers when EL2 is used
Zelalem Aweke [Wed, 2 Feb 2022 21:29:13 +0000 (15:29 -0600)]
refactor(mpam): remove initialization of EL2 registers when EL2 is used

The patch removes initialization of MPAM EL2 registers when an EL2
software exists. The patch assumes the EL2 software will perform
the necessary initializations of the registers.

Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com>
Change-Id: I5bed81bc22f417bc3e3cbbcd860a8553cd4307cd

3 years agorefactor(context mgmt): refactor the cm_setup_context function
Zelalem Aweke [Wed, 5 Jan 2022 23:12:24 +0000 (17:12 -0600)]
refactor(context mgmt): refactor the cm_setup_context function

This patch splits the function 'cm_setup_context' into four
functions to make it more readable and easier to maintain.

The function is split into the following functions based on
the security state of the context.

 - setup_context_common - performs common initializations
 - setup_secure_context - performs Secure state specific
  initializations
 - setup_realm_context - performs Realm state specific
 initializations
 - setup_ns_context - performs Non-secure state specific
      initializations

Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com>
Change-Id: Ie14a1c2fc6586087e7aa36537cf9064c80802f8f

3 years agorefactor(context mgmt): remove registers accessible only from secure state from EL2...
Zelalem Aweke [Wed, 3 Nov 2021 18:31:53 +0000 (13:31 -0500)]
refactor(context mgmt): remove registers accessible only from secure state from EL2 context

The following registers are only accessible from secure state,
therefore don't need to be saved/restored during world switch.
 - SDER32_EL2
 - VSTCR_EL2
 - VSTTBR_EL2

This patch removes these registers from EL2 context.

Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com>
Change-Id: I24d08aacb1b6def261c7b37d3e1265bb76adafdc

3 years agoMerge "chore(measured boot): remove unused DTC flags" into integration
Lauren Wehrmeister [Tue, 12 Apr 2022 15:19:01 +0000 (17:19 +0200)]
Merge "chore(measured boot): remove unused DTC flags" into integration

3 years agoMerge "style(plat/arm/corstone1000): resolve checkpatch warnings" into integration
Sandrine Bailleux [Tue, 12 Apr 2022 15:17:14 +0000 (17:17 +0200)]
Merge "style(plat/arm/corstone1000): resolve checkpatch warnings" into integration

3 years agofix(errata): workaround for Cortex-X2 erratum 2147715
Bipin Ravi [Tue, 8 Mar 2022 16:37:43 +0000 (10:37 -0600)]
fix(errata): workaround for Cortex-X2 erratum 2147715

Cortex-X2 erratum 2147715 is a Cat B erratum that applies to revision
r2p0 and is fixed in r2p1. The workaround is to set CPUACTLR_EL1[22]=1,
which will cause the CFP instruction to invalidate all branch predictor
resources regardless of context.

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

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: I2d81867486d9130f2c36cd4554ca9a8f37254b57

3 years agoMerge "refactor(arm): use MBEDTLS_CONFIG_FILE macro" into integration
Sandrine Bailleux [Mon, 11 Apr 2022 12:33:04 +0000 (14:33 +0200)]
Merge "refactor(arm): use MBEDTLS_CONFIG_FILE macro" into integration

3 years agorefactor(arm): use MBEDTLS_CONFIG_FILE macro
Manish V Badarkhe [Mon, 21 Feb 2022 09:43:49 +0000 (09:43 +0000)]
refactor(arm): use MBEDTLS_CONFIG_FILE macro

Used MBEDTLS_CONFIG_FILE macro for including mbedTLS
configuration.

Signed-off-by: Manish V Badarkhe <manish.badarkhe@arm.com>
Change-Id: I374b59a31df3ab1e69481b2c37a6f7455a106b6e

3 years agoMerge "refactor(corstone700): namespace MHU driver filenames" into integration
Sandrine Bailleux [Mon, 11 Apr 2022 10:47:08 +0000 (12:47 +0200)]
Merge "refactor(corstone700): namespace MHU driver filenames" into integration

3 years agofix(xilinx): fix mismatching function prototype
Venkatesh Yadav Abbarapu [Mon, 11 Apr 2022 03:55:44 +0000 (09:25 +0530)]
fix(xilinx): fix mismatching function prototype

The reported function raises a error when compilers assert the flag
`-Warray-parameter=`, signaling that an array-type argument was promoted
to a pointer-type argument. We observed this behaviour with the gcc 11.2
version.

plat/xilinx/common/pm_service/pm_ipi.c:263:34: error: argument 1 of type 'uint32_t *'
{aka 'unsigned int *'} declared as a pointer [-Werror=array-parameter=]
263 | uint32_t calculate_crc(uint32_t *payload, uint32_t bufsize)
      |                        ~~~~~~~~~~^~~~~~~
In file included from plat/xilinx/common/pm_service/pm_ipi.c:16:
plat/xilinx/common/include/pm_ipi.h:30:33: note: previously declared as an array 'uint32_t[8]'
{aka 'unsigned int[8]'}
   30 | uint32_t calculate_crc(uint32_t payload[PAYLOAD_ARG_CNT], uint32_t buffersize);
      |                        ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
cc1.real: all warnings being treated as errors

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: I7329f2e76ee0ca5faba71eb50babd20a796fee64

3 years agofix(bakery_lock): add __unused for clang
Okash Khawaja [Fri, 8 Apr 2022 17:06:31 +0000 (18:06 +0100)]
fix(bakery_lock): add __unused for clang

is_lock_acquired() function is only used in assert() statements, so when
compiling without asserts, e.g. with DEBUG=0, the function is unused.
this is okay when compiling with gcc because the function is marked as
inline but that doesn't work for clang. let's mark this as __unused to
avoid -Wunused-function warning-as-error.

Change-Id: I93f808fd15f715a65d1bd4f7592affb7997c4bad
Signed-off-by: Okash Khawaja <okash@google.com>
3 years agorefactor(spm_mm): reorganize secure partition manager code
Marc Bonnici [Sun, 19 Dec 2021 21:37:50 +0000 (21:37 +0000)]
refactor(spm_mm): reorganize secure partition manager code

In preparation for adding the EL3 SPMC configuration as defined in
the FF-A specification, restructure the existing SPM_MM code.

With this restructuring of the code, the 'spm_mm' directory is
renamed as 'spm' and the code inside has been split into two
sub-directories named 'common' and 'spm_mm'. The code in 'spm_mm'
directory contains the code that implements the MM interface.
In subsequent patches, the 'spmc' directory will be introduced
under the 'spm' directory providing the code that implements
the 'FF-A' interface.

Currently the common functionality for S-EL1 partitions is
limited to assembler functions to enter and exit an SP
synchronously.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I37739b9b53bc68e151ab5c1c0c6a15b3ee362241

3 years agoMerge changes I573e6478,I52dc3bee,I7e543664 into integration
Manish Pandey [Fri, 8 Apr 2022 12:42:45 +0000 (14:42 +0200)]
Merge changes I573e6478,I52dc3bee,I7e543664 into integration

* changes:
  feat(gic600ae_fmu): enable all GICD, PPI, ITS SMs
  feat(gic600ae_fmu): disable SMID for unavailable blocks
  feat(gic600ae_fmu): introduce support for RAS error handling

3 years agochore(measured boot): remove unused DTC flags
Sandrine Bailleux [Fri, 8 Apr 2022 08:25:41 +0000 (10:25 +0200)]
chore(measured boot): remove unused DTC flags

We no longer need to pass special flags to the device tree compiler
for measured boot. These are a left over from the days where we used
to pass BL2 measurement to BL2 image via TB_FW configuration file.

This should have been removed as part of commit eab78e9ba4e36da27
("refactor(measured_boot): remove passing of BL2 hash via device
tree") but was missed at the time.

Change-Id: Iced7e60af7ca660c342c0fc3a33b51865d67f04d
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agoMerge "build(changelog): add new scope for TI platform" into integration
Manish Pandey [Thu, 7 Apr 2022 15:44:31 +0000 (17:44 +0200)]
Merge "build(changelog): add new scope for TI platform" into integration

3 years agofeat(gic600ae_fmu): enable all GICD, PPI, ITS SMs
Varun Wadekar [Wed, 26 Jan 2022 08:33:02 +0000 (00:33 -0800)]
feat(gic600ae_fmu): enable all GICD, PPI, ITS SMs

The following SMIDs are disabled by default.

* GICD: MBIST REQ error and GICD FMU ClkGate override
* PPI: MBIST REQ error and PPI FMU ClkGate override
* ITS: MBIST REQ error and ITS FMU ClkGate override

This patch explicitly enables them during the FMU init sequence.

Change-Id: I573e64786e3318d4cbcd07d0a1caf25f8e6e9200
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
3 years agoMerge changes from topic "jc/detect_feat" into integration
Manish Pandey [Thu, 7 Apr 2022 13:19:04 +0000 (15:19 +0200)]
Merge changes from topic "jc/detect_feat" into integration

* changes:
  docs(build): update the feature enablement flags
  refactor(el3-runtime): replace ARM_ARCH_AT_LEAST macro with FEAT flags
  refactor(el3-runtime): add arch-features detection mechanism

3 years agoMerge changes from topic "mapping" into integration
Manish Pandey [Thu, 7 Apr 2022 12:55:58 +0000 (14:55 +0200)]
Merge changes from topic "mapping" into integration

* changes:
  feat(debug): update print_memory_map.py
  feat(bl_common): add XLAT tables symbols in linker script

3 years agofeat(debug): update print_memory_map.py
Yann Gautier [Mon, 4 Apr 2022 16:22:45 +0000 (18:22 +0200)]
feat(debug): update print_memory_map.py

Add some entries in blx_symbols, that are used when the flag
SEPARATE_CODE_AND_RODATA is not enabled (__RO_* and __TEXT_RESIDENT_*).
Add all new symbols that were not yet present in the script.
Correct __BSS_END to __BSS_END__, and add __BSS_START__.
Add new *_XLAT_TABLE_* symbols.
As those strings are longer than 22, update display format string to
be dependent on the longest string.
The script also skips lines for which the _START__ and _END__
symbols have the same address (empty sections).

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

3 years agofeat(gic600ae_fmu): disable SMID for unavailable blocks
Varun Wadekar [Tue, 25 Jan 2022 11:39:28 +0000 (03:39 -0800)]
feat(gic600ae_fmu): disable SMID for unavailable blocks

This patch updates the gic600_fmu_init function to disable all safety
mechanisms for a block ID that is not present on the platform. All
safety mechanisms for GIC-600AE are enabled by default and should be
disabled for blocks that are not present on the platform to avoid
false positive RAS errors.

Change-Id: I52dc3bee9a8b49fd2e51d7ed851fdc803a48e6e3
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
3 years agofeat(bl_common): add XLAT tables symbols in linker script
Yann Gautier [Tue, 5 Apr 2022 08:53:18 +0000 (10:53 +0200)]
feat(bl_common): add XLAT tables symbols in linker script

Add __BASE_XLAT_TABLE_START__/_END__ and __XLAT_TABLE_START__/_END__
symbols in the linker script to have them in the .map file.
This allows displaying those areas when running memory map script.

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

3 years agofeat(gic600ae_fmu): introduce support for RAS error handling
Varun Wadekar [Mon, 24 Jan 2022 13:45:15 +0000 (05:45 -0800)]
feat(gic600ae_fmu): introduce support for RAS error handling

The GIC-600AE uses a range of RAS features for all RAMs, which include
SECDED, ECC, and Scrub, software and bus error reporting. The GIC makes
all necessary information available to software through Armv8.2 RAS
architecture compliant register space.

This patch introduces support to probe the FMU_ERRGSR register to find
the right error record. Once the correct record is identified, the
"handler" function queries the FMU_ERR<m>STATUS register to further
identify the block ID, safety mechanism and the architecturally defined
primary error code. The description of the error is displayed on the
console to simplify debug.

Change-Id: I7e543664b74457afee2da250549f4c3d9beb1a03
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
3 years agodocs(build): update the feature enablement flags
Jayanth Dodderi Chidanand [Mon, 28 Feb 2022 23:41:41 +0000 (23:41 +0000)]
docs(build): update the feature enablement flags

Adding the newly introduced build flags for feature enablement of the
following features:
1.FEAT_AMUv1p1 - ENABLE_FEAT_AMUv1p1
2.FEAT_CSV2_2  - ENABLE_FEAT_CSV2_2
3.FEAT_VHE     - ENABLE_FEAT_VHE
4.FEAT_DIT     - ENABLE_FEAT_DIT
5.FEAT_SB      - ENABLE_FEAT_SB
6.FEAT_SEL2    - ENABLE_FEAT_SEL2

Also as part of feature detection mechanism, we now support three
states for each of these features, allowing the flags to take either
(0 , 1 , 2) values. Henceforth the existing feature build options are
converted from boolean to numeric type and is updated accordingly
in this patch.

The build flags take a default value and will be internally enabled
when they become mandatory from a particular architecture version
and upwards. Platforms have the flexibility to overide this
internal enablement via this feature specific explicit build flags.

Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Change-Id: I0090c8c780c2e7d1a50ed9676983fe1df7a35e50

3 years agofix(st-clock): correct stm32_clk_parse_fdt_by_name
Yann Gautier [Tue, 5 Apr 2022 13:16:28 +0000 (15:16 +0200)]
fix(st-clock): correct stm32_clk_parse_fdt_by_name

The fdt_getprop() function sets the length to -1 if the property is not
found. We should then not use it later in stm32_clk_parse_fdt_by_name()
in that case. Directly set *nb to 0U and return 0 if the property is not
found.

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

3 years agofix(st-clock): check _clk_stm32_get_parent return
Yann Gautier [Tue, 29 Mar 2022 07:51:21 +0000 (09:51 +0200)]
fix(st-clock): check _clk_stm32_get_parent return

This issue was found by Coverity (CID 376885). The _clk_stm32_get_parent()
return shouldn't be negative. Return the error in this case.

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

3 years agoMerge "fix(st): remove extra chars from dtc version" into integration
Manish Pandey [Tue, 5 Apr 2022 09:31:14 +0000 (11:31 +0200)]
Merge "fix(st): remove extra chars from dtc version" into integration

3 years agofix(st): remove extra chars from dtc version
Yann Gautier [Mon, 28 Mar 2022 11:37:01 +0000 (13:37 +0200)]
fix(st): remove extra chars from dtc version

In some implementations of dtc tool (e.g. with yocto), there can be a 'v'
at the beginning of the version, and a '+' at the end. Just keep numbers
then, with a grep -o.

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

3 years agofeat(intel): add macro to switch between different UART PORT
Boon Khai Ng [Thu, 5 Aug 2021 17:16:46 +0000 (01:16 +0800)]
feat(intel): add macro to switch between different UART PORT

HSD #1509626040:
This patch is to add the flexibility for BL2 and BL31
to choose different UART output port at platform_def.h
using parameter PLAT_INTEL_UART_BASE

This patch also fixing the plat_helpers.S where the
UART BASE is hardcoded to PLAT_UART0_BASE. It is then
switched to CRASH_CONSOLE_BASE.

Signed-off-by: Boon Khai Ng <boon.khai.ng@intel.com>
Change-Id: Iccfa7ec64e4955b531905778be4da803045d3c8f

3 years agofeat(intel): add SMC support for ROM Patch SHA384 mailbox
Sieu Mun Tang [Wed, 16 Mar 2022 19:11:55 +0000 (03:11 +0800)]
feat(intel): add SMC support for ROM Patch SHA384 mailbox

HSD #16014059592:
Add support for ROM Patch SHA384 mailbox SMC call.

Signed-off-by: Kris Chaplin <kris.chaplin@linux.intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: Ide9a7af41a089980745cb7216a9bf85e7fbd84e3

3 years agorefactor(el3-runtime): replace ARM_ARCH_AT_LEAST macro with FEAT flags
Jayanth Dodderi Chidanand [Wed, 26 Jan 2022 17:14:43 +0000 (17:14 +0000)]
refactor(el3-runtime): replace ARM_ARCH_AT_LEAST macro with FEAT flags

Replacing ARM_ARCH_AT_LEAST macro with feature specific build options
to prevent unconditional accesses to the registers during context save
and restore routines.

Registers are tightly coupled with features more than architecture
versions. Henceforth having a feature-specific build flag guarding the
respective registers, will restrict any undefined actions.

Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Change-Id: I809774df580530803c8a6e05a62d8d4de0910e02

3 years agorefactor(el3-runtime): add arch-features detection mechanism
Jayanth Dodderi Chidanand [Mon, 17 Jan 2022 18:57:17 +0000 (18:57 +0000)]
refactor(el3-runtime): add arch-features detection mechanism

This patch adds architectural features detection procedure to ensure
features enabled are present in the given hardware implementation.

It verifies whether the architecture build flags passed during
compilation match the respective features by reading their ID
registers. It reads through all the enabled feature specific ID
registers at once and panics in case of mismatch(feature enabled
but not implemented in PE).

Feature flags are used at sections (context_management,
save and restore routines of registers) during context switch.
If the enabled feature flag is not supported by the PE, it causes an
exception while saving or restoring the registers guarded by them.

With this mechanism, the build flags are validated at an early
phase prior to their usage, thereby preventing any undefined action
under their control.

This implementation is based on tristate approach for each feature and
currently FEAT_STATE=0 and FEAT_STATE=1 are covered as part of this
patch. FEAT_STATE=2 is planned for phase-2 implementation and will be
taken care separately.

The patch has been explicitly tested, by adding a new test_config
with build config enabling majority of the features and detected
all of them under FVP launched with parameters enabling v8.7 features.

Note: This is an experimental procedure and the mechanism itself is
      guarded by a macro "FEATURE_DETECTION", which is currently being
      disabled by default.

The "FEATURE_DETECTION" macro is documented and the platforms are
encouraged to make use of this diagnostic tool by enabling this
"FEATURE_DETECTION" flag explicitly and get used to its behaviour
during booting before the procedure gets mandated.

Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Change-Id: Ia23d95430fe82d417a938b672bfb5edc401b0f43

3 years agorefactor(corstone700): namespace MHU driver filenames
Sandrine Bailleux [Fri, 18 Mar 2022 11:44:27 +0000 (12:44 +0100)]
refactor(corstone700): namespace MHU driver filenames

There are plans to contribute a generic MHU driver to the TF-A code
base in the short term.

In preparation for this, rename the Corstone-700 MHU driver source
files and prefix them with the name of the platform to avoid any
ambiguity or name clashes with the upcoming generic MHU driver. Also
rename the header guard accordingly.

This renaming is inline with other platform-specific MHU drivers, such
as the ones used on Broadcom [1], Socionext [2] or Amlogic [3] platforms.

[1] plat/brcm/common/brcm_mhu.h
[2] plat/socionext/synquacer/drivers/mhu/sq_mhu.h
[3] plat/amlogic/common/aml_mhu.c

Change-Id: I8a5e5b16e7c19bf931a90422dfca8f6a2a0663b4
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agostyle(plat/arm/corstone1000): resolve checkpatch warnings
David Vincze [Thu, 3 Mar 2022 13:35:51 +0000 (14:35 +0100)]
style(plat/arm/corstone1000): resolve checkpatch warnings

Change-Id: Ic8cb9b0834806675c792018e809d7ba77fbe856f
Signed-off-by: David Vincze <david.vincze@arm.com>
3 years agofeat(stm32mp1): retry 3 times FWU trial boot
Nicolas Toromanoff [Mon, 7 Feb 2022 09:12:04 +0000 (10:12 +0100)]
feat(stm32mp1): retry 3 times FWU trial boot

If we reboot 3 times in trial mode, BL2 will select previous boot image.

Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@foss.st.com>
Change-Id: I82b423cc84f0471fdb6fa7c393fc5fe411d25c06

3 years agorefactor(stm32mp1): update backup reg for FWU
Yann Gautier [Mon, 28 Mar 2022 15:49:38 +0000 (17:49 +0200)]
refactor(stm32mp1): update backup reg for FWU

Change the backup register used to store FWU parameters from 21 to 10.
This is chosen to have a Read/Write secure and Read non-secure register.
The mapping is also changed: only the first 4 bits will be used to store
the FWU index. The 4 next bits will be used to store count info. The
other bits are reserved.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@foss.st.com>
Change-Id: I9249768287ec5688ba2d8711ce04d429763543d7

3 years agoMerge changes I84e257b3,I1317e482 into integration
Joanna Farley [Wed, 30 Mar 2022 07:38:52 +0000 (09:38 +0200)]
Merge changes I84e257b3,I1317e482 into integration

* changes:
  fix(layerscape): fix coverity issue
  fix(nxp-ddr): fix coverity issue

3 years agofix(layerscape): fix coverity issue
Jiafei Pan [Tue, 29 Mar 2022 07:01:09 +0000 (15:01 +0800)]
fix(layerscape): fix coverity issue

Check return value of mmap_add_dynamic_region().

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I84e257b3052371e18af158c3254f42a1bae0da10

3 years agoMerge "fix(scmi): use same type for message_id" into integration
Joanna Farley [Tue, 29 Mar 2022 15:01:48 +0000 (17:01 +0200)]
Merge "fix(scmi): use same type for message_id" into integration

3 years agofix(nxp-ddr): fix coverity issue
Jiafei Pan [Tue, 29 Mar 2022 06:43:12 +0000 (14:43 +0800)]
fix(nxp-ddr): fix coverity issue

Check return value of mmap_add_dynamic_region().

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I1317e4822f3da329185d54005f08047872b5cdce

3 years agoMerge changes Ic1796898,I93bd392a into integration
Joanna Farley [Mon, 28 Mar 2022 22:21:37 +0000 (00:21 +0200)]
Merge changes Ic1796898,I93bd392a into integration

* changes:
  fix(errata): workaround for Cortex A78 AE erratum 2395408
  fix(errata): workaround for Cortex A78 AE erratum 2376748

3 years agoMerge changes from topic "rme-attest" into integration
Soby Mathew [Mon, 28 Mar 2022 16:32:27 +0000 (18:32 +0200)]
Merge changes from topic "rme-attest" into integration

* changes:
  feat(rme): add dummy realm attestation key to RMMD
  feat(rme): add dummy platform token to RMMD

3 years agorefactor(stm32mp1-fdts): remove nvmem_layout node
Patrick Delaunay [Fri, 4 Mar 2022 10:34:09 +0000 (11:34 +0100)]
refactor(stm32mp1-fdts): remove nvmem_layout node

Remove the nvmem_layout node with compatible "st,stm32-nvmem-layout"
no more used in TF-A code to simplify the device tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I3748b20b7d3c60ee64ead15541fac1fd12656600

3 years agorefactor(stm32mp1): drop the "st,stm32-nvmem-layout" node
Patrick Delaunay [Tue, 1 Mar 2022 08:56:03 +0000 (09:56 +0100)]
refactor(stm32mp1): drop the "st,stm32-nvmem-layout" node

Simplify the DT parsing by removing the parsing of the nvmem layout node
with "st,stm32-nvmem-layout" compatible.

The expected OTP NAME can directly be found in a sub-node named
NAME@ADDRESS of the BSEC node, the NVMEM provider node.

This patch also removes this specific binding introduced for TF-A.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: Ic703385fad1bec5bef1cee583fbe9fbbf6aea216

3 years agorefactor(st): remove useless includes
Yann Gautier [Mon, 21 Mar 2022 16:58:32 +0000 (17:58 +0100)]
refactor(st): remove useless includes

The stm32mp_dt.c file does not need anything from DDR header files.

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

3 years agoMerge changes from topics "ls1088a", "ls1088a-prepare" into integration
Joanna Farley [Mon, 28 Mar 2022 15:40:59 +0000 (17:40 +0200)]
Merge changes from topics "ls1088a", "ls1088a-prepare" into integration

* changes:
  docs(layerscape): add ls1088a soc and board support
  feat(ls1088aqds): add ls1088aqds board support
  feat(ls1088ardb): add ls1088ardb board support
  feat(ls1088a): add new SoC platform ls1088a
  build(changelog): add new scopes for ls1088a
  feat(bl2): add support to separate no-loadable sections
  refactor(layerscape): refine comparison of inerconnection
  feat(layerscape): add soc helper macro definition for chassis 3
  feat(nxp-gic): add some macros definition for gicv3
  feat(layerscape): add CHASSIS 3 support for tbbr
  feat(layerscape): define more chassis 3 hardware address
  feat(nxp-crypto): add chassis 3 support
  feat(nxp-dcfg): add Chassis 3 support
  feat(lx2): enable DDR erratas for lx2 platforms
  feat(layerscape): print DDR errata information
  feat(nxp-ddr): add workaround for errata A050958
  feat(layerscape): add new soc errata a010539 support
  feat(layerscape): add new soc errata a009660 support
  feat(nxp-ddr): add rawcard 1F support
  fix(layerscape): fix build issue of mmap_add_ddr_region_dynamically
  fix(nxp-tools): fix create_pbl print log
  build(changelog): add new scopes for NXP driver

3 years agofeat(rme): add dummy realm attestation key to RMMD
Soby Mathew [Tue, 22 Mar 2022 16:21:19 +0000 (16:21 +0000)]
feat(rme): add dummy realm attestation key to RMMD

Add a dummy realm attestation key to RMMD, and return it on request.
The realm attestation key is requested with an SMC with the following
parameters:
    * Fid (0xC400001B2).
    * Attestation key buffer PA (the realm attestation key is copied
      at this address by the monitor).
    * Attestation key buffer length as input and size of realm
      attesation key as output.
    * Type of elliptic curve.

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Signed-off-by: Subhasish Ghosh <subhasish.ghosh@arm.com>
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Change-Id: I12d8d98fd221f4638ef225c9383374ddf6e65eac

3 years agoMerge "fix(fwu): rename is_fwu_initialized" into integration
Manish Pandey [Mon, 28 Mar 2022 11:59:23 +0000 (13:59 +0200)]
Merge "fix(fwu): rename is_fwu_initialized" into integration

3 years agoMerge "docs(maintainers): add the new maintainer for MediaTek SoCs" into integration
Manish Pandey [Mon, 28 Mar 2022 10:41:46 +0000 (12:41 +0200)]
Merge "docs(maintainers): add the new maintainer for MediaTek SoCs" into integration