]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
5 years agoMerge "marvell: drivers: mochi: specify stream ID for SD/MMC" into integration
Manish Pandey [Wed, 3 Jun 2020 15:18:33 +0000 (15:18 +0000)]
Merge "marvell: drivers: mochi: specify stream ID for SD/MMC" into integration

5 years agoMerge changes from topic "stm32-etzpc" into integration
Manish Pandey [Wed, 3 Jun 2020 15:11:43 +0000 (15:11 +0000)]
Merge changes from topic "stm32-etzpc" into integration

* changes:
  plat/stm32mp1: sp_min relies on etzpc driver
  dts: stm32mp157c: add etzpc node
  drivers: introduce ST ETZPC driver

5 years agoMerge changes from topic "jb/8.6-features" into integration
Manish Pandey [Wed, 3 Jun 2020 14:23:29 +0000 (14:23 +0000)]
Merge changes from topic "jb/8.6-features" into integration

* changes:
  Enable ARMv8.6-ECV Self-Synch when booting to EL2
  Enable ARMv8.6-FGT when booting to EL2

5 years agoplat/stm32mp1: sp_min relies on etzpc driver
Etienne Carriere [Fri, 10 Apr 2020 09:32:54 +0000 (11:32 +0200)]
plat/stm32mp1: sp_min relies on etzpc driver

Use ETZPC driver to configure secure aware interfaces to assign
them to non-secure world. Sp_min also configures BootROM resources
and SYSRAM to assign both to secure world only.

Define stm32mp15 SoC identifiers for the platform specific DECPROT
instances.

Change-Id: I3bec9f47b04bcba3929e4df886ddb1d5ff843089
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
5 years agodts: stm32mp157c: add etzpc node
Etienne Carriere [Sun, 8 Dec 2019 07:16:43 +0000 (08:16 +0100)]
dts: stm32mp157c: add etzpc node

Add a node for the ETZPC device so that driver initializes during
stm32mp15* boot sequence.

Change-Id: I84bf10572e5df7b8f450163c79bcfe6956fc838f
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
5 years agodrivers: introduce ST ETZPC driver
Etienne Carriere [Sun, 8 Dec 2019 07:15:15 +0000 (08:15 +0100)]
drivers: introduce ST ETZPC driver

ETZPC stands for Extended TrustZone Protection Controller. It is a
resource conditional access device. It is mainly based on Arm TZPC.

ST ETZPC exposes memory mapped DECPROT cells to set access permissions
to SoC peripheral interfaces as I2C, SPI, DDR controllers, and some
of the SoC internal memories.

ST ETZPC exposes memory mapped TZMA cells to set access permissions
to some SoC internal memories.

Change-Id: I47ce20ffcfb55306dab923153b71e1bcbe2a5570
Co-developed-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
5 years agomarvell: drivers: mochi: specify stream ID for SD/MMC
Marcin Wojtas [Tue, 12 May 2020 16:19:33 +0000 (18:19 +0200)]
marvell: drivers: mochi: specify stream ID for SD/MMC

This patch enables the stream ID for the SD/MMC
controllers via dedicated unit register. Thanks to this
change it is possible to configure properly the
IOMMU in OS and use the SD/MMC interface in a guest
Virtual Machine.

Change-Id: I99cbd2c9882eb558ba01405d3d8a3e969f06e082
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
5 years agoMerge "marvell: a8k: enable BL31 cache by default" into integration
Manish Pandey [Wed, 3 Jun 2020 12:13:41 +0000 (12:13 +0000)]
Merge "marvell: a8k: enable BL31 cache by default" into integration

5 years agomarvell: a8k: enable BL31 cache by default
Marcin Wojtas [Tue, 2 Jun 2020 13:12:06 +0000 (15:12 +0200)]
marvell: a8k: enable BL31 cache by default

BL31_CACHE_DISABLE flag was introduced as a work-around
for the older SoC revisions. Since it is not relevant in the
newest versions, toggle it to be disabled by default.
One can still specify it by adding 'BL31_CACHE_DISABLE=1'
string to the build command.

Change-Id: I11b52dade3ff7f8ee643b8078c6e447c45946570
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
5 years agoEnable ARMv8.6-ECV Self-Synch when booting to EL2
Jimmy Brisson [Thu, 16 Apr 2020 15:48:02 +0000 (10:48 -0500)]
Enable ARMv8.6-ECV Self-Synch when booting to EL2

Enhanced Counter Virtualization, ECV, is an architecture extension introduced
in ARMv8.6. This extension allows the hypervisor, at EL2, to setup
self-synchronizing views of the timers for it's EL1 Guests. This patch pokes the
control register to enable this extension when booting a hypervisor at EL2.

Change-Id: I4e929ecdf400cea17eff1de5cf8704aa7e40973d
Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
5 years agoEnable ARMv8.6-FGT when booting to EL2
Jimmy Brisson [Thu, 16 Apr 2020 15:47:56 +0000 (10:47 -0500)]
Enable ARMv8.6-FGT when booting to EL2

The Fine Grained Traps (FGT) architecture extension was added to aarch64 in
ARMv8.6. This extension primarily allows hypervisors, at EL2, to trap specific
instructions in a more fine grained manner, with an enable bit for each
instruction. This patch adds support for this extension by enabling the
extension when booting an hypervisor at EL2.

Change-Id: Idb9013ed118b6a1b7b76287237096de992ca4da3
Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
5 years agoMerge "drivers: stm32_reset adapt interface to timeout argument" into integration
Mark Dykes [Mon, 1 Jun 2020 18:07:10 +0000 (18:07 +0000)]
Merge "drivers: stm32_reset adapt interface to timeout argument" into integration

5 years agoMerge "TF-A: Fix BL31 linker script error" into integration
Mark Dykes [Mon, 1 Jun 2020 15:45:03 +0000 (15:45 +0000)]
Merge "TF-A: Fix BL31 linker script error" into integration

5 years agodrivers: stm32_reset adapt interface to timeout argument
Etienne Carriere [Sun, 8 Dec 2019 07:14:40 +0000 (08:14 +0100)]
drivers: stm32_reset adapt interface to timeout argument

Changes stm32mp1 reset driver to API to add a timeout argument
to stm32mp_reset_assert() and stm32mp_reset_deassert() and
a return value.

With a supplied timeout, the functions wait the target reset state
is reached before returning. With a timeout of zero, the functions
simply load target reset state in SoC interface and return without
waiting.

Helper functions stm32mp_reset_set() and stm32mp_reset_release()
use a zero timeout and return without a return code.

This change updates few stm32 drivers and plat/stm32mp1 blĂ©_plat_setup.c
accordingly without any functional change.
functional change.

Change-Id: Ia1a73a15125d3055fd8739c125b70bcb9562c27f
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
5 years agoTF-A: Fix BL31 linker script error
Alexei Fedorov [Sat, 30 May 2020 16:33:26 +0000 (17:33 +0100)]
TF-A: Fix BL31 linker script error

The patch fixes BL31 linker script error
"Init code ends past the end of the stacks"
for platforms with number of CPUs less than 4,
which is caused by __STACKS_END__ address being
lower than __INIT_CODE_END__.
The modified BL31 linker script detects such cases
and increases the total amount of stack memory,
setting __STACKS_END__ = __INIT_CODE_END__, and
CPUs' stacks are calculated by BL31 'plat_get_my_stack'
function accordingly. For platforms with more than 4 CPUs
and __INIT_CODE_END__ < __STACKS_END__ stack memory does not
increase and allocated CPUs' stacks match the existing
implementation.
The patch removes exclusion of PSCI initialization
functions from the reclaimed .init section in
'arm_reclaim_init.ld.S' script, which increases the
size of reclaimed memory region.

Change-Id: I927773e00dd84e1ffe72f9ee534f4f2fc7b6153c
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoMerge "Add new maintainers for the project" into integration
joanna.farley [Sat, 30 May 2020 16:16:48 +0000 (16:16 +0000)]
Merge "Add new maintainers for the project" into integration

5 years agoAdd new maintainers for the project
Sandrine Bailleux [Thu, 28 May 2020 08:38:54 +0000 (10:38 +0200)]
Add new maintainers for the project

As per the trustedfirmware.org Project Maintenance Process [1], the
current maintainers of the TF-A project have nominated some contributors
to become maintainers themselves. List them in the maintainers.rst file
to make this official.

[1] https://developer.trustedfirmware.org/w/collaboration/project-maintenance-process/

Change-Id: Id4e3cfd12a9074f4e255087fa5dd6fa5f902845f
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
5 years agoMerge "drivers: stm32mp1 clocks: fix debug trace on clock enable/disable" into integr...
Mark Dykes [Thu, 28 May 2020 18:15:36 +0000 (18:15 +0000)]
Merge "drivers: stm32mp1 clocks: fix debug trace on clock enable/disable" into integration

5 years agoMerge "drivers: stm32mp1 clocks: enable system clocks during initialization" into...
Mark Dykes [Thu, 28 May 2020 18:14:33 +0000 (18:14 +0000)]
Merge "drivers: stm32mp1 clocks: enable system clocks during initialization" into integration

5 years agoMerge "drivers: stm32mp1 clocks: prevent crash on always on clocks" into integration
Mark Dykes [Thu, 28 May 2020 18:12:57 +0000 (18:12 +0000)]
Merge "drivers: stm32mp1 clocks: prevent crash on always on clocks" into integration

5 years agoMerge "drivers: stm32mp1 clocks: add RTC as a gateable clock" into integration
Mark Dykes [Thu, 28 May 2020 16:29:16 +0000 (16:29 +0000)]
Merge "drivers: stm32mp1 clocks: add RTC as a gateable clock" into integration

5 years agoMerge "drivers: stm32mp1 clocks: support shifted clock selector bit masks" into integ...
Mark Dykes [Thu, 28 May 2020 16:26:28 +0000 (16:26 +0000)]
Merge "drivers: stm32mp1 clocks: support shifted clock selector bit masks" into integration

5 years agoMerge "doc: Update the list of code owners" into integration
joanna.farley [Thu, 28 May 2020 14:21:59 +0000 (14:21 +0000)]
Merge "doc: Update the list of code owners" into integration

5 years agoMerge "Fix the build error for dualroot chain of trust." into integration
Sandrine Bailleux [Thu, 28 May 2020 08:06:57 +0000 (08:06 +0000)]
Merge "Fix the build error for dualroot chain of trust." into integration

5 years agodoc: Update the list of code owners
Sandrine Bailleux [Wed, 27 May 2020 08:36:56 +0000 (10:36 +0200)]
doc: Update the list of code owners

Extend the list of modules and assign code owners to each of them.

Change-Id: I267b87d8e239c7eff143b4c7e6ce9712fcf7101e
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
5 years agoMerge "TF-A: Fix wrong register read for MPAM extension" into integration
Olivier Deprez [Thu, 28 May 2020 07:35:31 +0000 (07:35 +0000)]
Merge "TF-A: Fix wrong register read for MPAM extension" into integration

5 years agoMerge "drivers: stm32mp1 clocks: allow tree lookup for several system clocks" into...
Mark Dykes [Wed, 27 May 2020 19:35:59 +0000 (19:35 +0000)]
Merge "drivers: stm32mp1 clocks: allow tree lookup for several system clocks" into integration

5 years agoMerge "plat/stm32mp1: fdt helpers for secure aware gpio bank" into integration
Mark Dykes [Wed, 27 May 2020 19:34:09 +0000 (19:34 +0000)]
Merge "plat/stm32mp1: fdt helpers for secure aware gpio bank" into integration

5 years agoMerge "plat/st: move GPIO bank helper function to platform source files" into integration
Mark Dykes [Wed, 27 May 2020 19:27:41 +0000 (19:27 +0000)]
Merge "plat/st: move GPIO bank helper function to platform source files" into integration

5 years agoMerge "plat/arm: Introduce TC0 platform" into integration
Manish Pandey [Wed, 27 May 2020 16:26:37 +0000 (16:26 +0000)]
Merge "plat/arm: Introduce TC0 platform" into integration

5 years agoplat/arm: Introduce TC0 platform
Usama Arif [Fri, 17 Apr 2020 15:13:39 +0000 (16:13 +0100)]
plat/arm: Introduce TC0 platform

This patch adds support for Total Compute (TC0) platform. It is an
initial port and additional features are expected to be added later.

TC0 has a SCP which brings the primary Cortex-A out of reset
which starts executing BL1. TF-A optionally authenticates the SCP
ram-fw available in FIP and makes it available for SCP to copy.

Some of the major features included and tested in this platform
port include TBBR, PSCI, MHUv2 and DVFS.

Change-Id: I1675e9d200ca7687c215009eef483d9b3ee764ef
Signed-off-by: Usama Arif <usama.arif@arm.com>
5 years agoFix the build error for dualroot chain of trust.
Manish V Badarkhe [Wed, 27 May 2020 08:39:42 +0000 (09:39 +0100)]
Fix the build error for dualroot chain of trust.

Fixed build error for dualroot chain of trust.
Build error were thrown as below while compiling the code for
dualroot chain of trust:

aarch64-none-elf-ld.bfd: ./build/fvp/debug/bl1/tbbr_cot_bl1.o:
(.bss.auth_img_flags+0x0): multiple definition of `auth_img_flags';
./build/fvp/debug/bl1/cot.o:(.bss.auth_img_flags+0x0): first defined here

aarch64-none-elf-ld.bfd: ./build/fvp/debug/bl1/tbbr_cot_bl1.o:
(.rodata.cot_desc_size+0x0): multiple definition of `cot_desc_size';
./build/fvp/debug/bl1/cot.o:(.rodata.cot_desc_size+0x0): first defined here

aarch64-none-elf-ld.bfd: ./build/fvp/debug/bl1/tbbr_cot_bl1.o:
(.rodata.cot_desc_ptr+0x0): multiple definition of `cot_desc_ptr';
./build/fvp/debug/bl1/cot.o:(.rodata.cot_desc_ptr+0x0): first defined here

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

5 years agoMerge "plat: imx8mn: Add imx8mn basic support" into integration
Sandrine Bailleux [Wed, 27 May 2020 08:41:57 +0000 (08:41 +0000)]
Merge "plat: imx8mn: Add imx8mn basic support" into integration

5 years agoMerge "Cleanup the code for TBBR CoT descriptors" into integration
Mark Dykes [Tue, 26 May 2020 16:09:10 +0000 (16:09 +0000)]
Merge "Cleanup the code for TBBR CoT descriptors" into integration

5 years agoTF-A: Fix wrong register read for MPAM extension
Alexei Fedorov [Tue, 26 May 2020 12:16:41 +0000 (13:16 +0100)]
TF-A: Fix wrong register read for MPAM extension

This patch fixes wrong ID_AA64DFR0_EL1 register read instead of
ID_AA64PFR0_EL1 to detect support for MPAM extension.
It also implements get_mpam_version() function which returns
MPAM version as:
0x00: None Armv8.0 or later;
0x01: v0.1 Armv8.4 or later;
0x10: v1.0 Armv8.2 or later;
0x11: v1.1 Armv8.4 or later;

Change-Id: I31d776b1a1b60cb16e5e62296d70adb129d7b760
Reported-by: Matteo Zini <matteozini96@gmail.com>
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoMerge "doc: Fix plat_sdei_validate_entry_point() documentation" into integration
Mark Dykes [Tue, 26 May 2020 15:34:23 +0000 (15:34 +0000)]
Merge "doc: Fix plat_sdei_validate_entry_point() documentation" into integration

5 years agoMerge "doc: Fixes in PSA FF-A binding document" into integration
Olivier Deprez [Tue, 26 May 2020 09:12:32 +0000 (09:12 +0000)]
Merge "doc: Fixes in PSA FF-A binding document" into integration

5 years agoMerge "SPCI is now called PSA FF-A" into integration
Olivier Deprez [Tue, 26 May 2020 09:11:44 +0000 (09:11 +0000)]
Merge "SPCI is now called PSA FF-A" into integration

5 years agodoc: Fix plat_sdei_validate_entry_point() documentation
Sandrine Bailleux [Fri, 15 May 2020 10:05:51 +0000 (12:05 +0200)]
doc: Fix plat_sdei_validate_entry_point() documentation

Document the second argument of the function.
Minor rewording.

Change-Id: I190794b8cc74c99db4cfe6efc225217c32dd0774
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
5 years agodoc: Fixes in PSA FF-A binding document
Louis Mayencourt [Wed, 8 Apr 2020 12:04:33 +0000 (13:04 +0100)]
doc: Fixes in PSA FF-A binding document

- Fix possible run-time ELs value and xlat-granule size.
- Remove mandatory field for stream-ids.
- Define interrupts attributes to <u32>.
- Remove mem-manage field.
- Add description for memory/device region attributes.

Co-authored-by: Manish Pandey <manish.pandey2@arm.com>
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I71cf4406c78eaf894fa6532f83467a6f4110b344

5 years agoSPCI is now called PSA FF-A
J-Alves [Thu, 7 May 2020 17:42:25 +0000 (18:42 +0100)]
SPCI is now called PSA FF-A

SPCI is renamed as PSA FF-A which stands for Platform Security
Architecture Firmware Framework for A class processors.
This patch replaces the occurrence of SPCI with PSA FF-A(in documents)
or simply FFA(in code).

Change-Id: I4ab10adb9ffeef1ff784641dfafd99f515133760
Signed-off-by: J-Alves <joao.alves@arm.com>
5 years agoMerge "plat/arm/fvp: populate runtime console parameters dynamically" into integration
Mark Dykes [Fri, 22 May 2020 17:45:46 +0000 (17:45 +0000)]
Merge "plat/arm/fvp: populate runtime console parameters dynamically" into integration

5 years agoplat: imx8mn: Add imx8mn basic support
Jacky Bai [Thu, 28 Nov 2019 05:16:33 +0000 (13:16 +0800)]
plat: imx8mn: Add imx8mn basic support

Add imx8mn basic support

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: Ibdfcc87700bfaf980e429f3a5fa08515218ae78d

5 years agoMerge "Tegra: enable SDEI handling" into integration
Mark Dykes [Thu, 21 May 2020 21:24:22 +0000 (21:24 +0000)]
Merge "Tegra: enable SDEI handling" into integration

5 years agoMerge "Tegra194: validate C6 power state type" into integration
Mark Dykes [Thu, 21 May 2020 21:17:25 +0000 (21:17 +0000)]
Merge "Tegra194: validate C6 power state type" into integration

5 years agoMerge "Tegra194: remove support for CPU suspend power down state" into integration
Mark Dykes [Thu, 21 May 2020 21:16:34 +0000 (21:16 +0000)]
Merge "Tegra194: remove support for CPU suspend power down state" into integration

5 years agoMerge "FVP: Add support for passing platform's topology to DTS" into integration
Manish Pandey [Thu, 21 May 2020 20:12:24 +0000 (20:12 +0000)]
Merge "FVP: Add support for passing platform's topology to DTS" into integration

5 years agoMerge "plat/fvp: Support for extracting UART serial node info from DT" into integration
Mark Dykes [Thu, 21 May 2020 19:23:03 +0000 (19:23 +0000)]
Merge "plat/fvp: Support for extracting UART serial node info from DT" into integration

5 years agoplat/arm/fvp: populate runtime console parameters dynamically
Madhukar Pappireddy [Thu, 16 Apr 2020 22:54:25 +0000 (17:54 -0500)]
plat/arm/fvp: populate runtime console parameters dynamically

We query the UART base address and clk frequency in runtime
using fconf getter APIs.

Change-Id: I5f4e84953be5f384472bf90720b706d45cb86260
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
5 years agoplat/fvp: Support for extracting UART serial node info from DT
Madhukar Pappireddy [Tue, 24 Mar 2020 15:03:34 +0000 (10:03 -0500)]
plat/fvp: Support for extracting UART serial node info from DT

This patch introduces the populate function which leverages
a new driver to extract base address and clk frequency properties
of the uart serial node from HW_CONFIG device tree.

This patch also introduces fdt helper API fdtw_translate_address()
which helps in performing address translation.

Change-Id: I053628065ebddbde0c9cb3aa93d838619f502ee3
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
5 years agoMerge "Enable v8.6 WFE trap delays" into integration
Mark Dykes [Wed, 20 May 2020 22:45:43 +0000 (22:45 +0000)]
Merge "Enable v8.6 WFE trap delays" into integration

5 years agoTegra: enable SDEI handling
Varun Wadekar [Sat, 18 Apr 2020 02:09:21 +0000 (19:09 -0700)]
Tegra: enable SDEI handling

This patch enables SDEI support for all Tegra platforms, with
the following configuration settings.

* SGI 8 as the source IRQ
* Special Private Event 0
* Three private, dynamic events
* Three shared, dynamic events
* Twelve general purpose explicit events

Verified using TFTF SDEI test suite.

******************************* Summary *******************************
 Test suite 'SDEI'                                               Passed
 =================================
 Tests Skipped : 0
 Tests Passed  : 5
 Tests Failed  : 0
 Tests Crashed : 0
 Total tests   : 5
 =================================

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

5 years agoMerge "plat/fvp: Populate GICv3 parameters dynamically" into integration
Mark Dykes [Wed, 20 May 2020 15:41:01 +0000 (15:41 +0000)]
Merge "plat/fvp: Populate GICv3 parameters dynamically" into integration

5 years agoMerge "Tegra: enable stack protection" into integration
Sandrine Bailleux [Wed, 20 May 2020 08:11:13 +0000 (08:11 +0000)]
Merge "Tegra: enable stack protection" into integration

5 years agoEnable v8.6 WFE trap delays
johpow01 [Wed, 22 Apr 2020 19:05:13 +0000 (14:05 -0500)]
Enable v8.6 WFE trap delays

This patch enables the v8.6 extension to add a delay before WFE traps
are taken. A weak hook plat_arm_set_twedel_scr_el3 has been added in
plat/common/aarch64/plat_common.c that disables this feature by default
but platform-specific code can override it when needed.

The only hook provided sets the TWED fields in SCR_EL3, there are similar
fields in HCR_EL2, SCTLR_EL2, and SCTLR_EL1 to control WFE trap delays in
lower ELs but these should be configured by code running at EL2 and/or EL1
depending on the platform configuration and is outside the scope of TF-A.

Signed-off-by: John Powell <john.powell@arm.com>
Change-Id: I0a9bb814205efeab693a3d0a0623e62144abba2d

5 years agoplat/fvp: Populate GICv3 parameters dynamically
laurenw-arm [Tue, 12 May 2020 15:58:11 +0000 (10:58 -0500)]
plat/fvp: Populate GICv3 parameters dynamically

Query the GICD and GICR base addresses in runtime using fconf getter
APIs.

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: I309fb2874f3329ddeb8677ddb53ed4c02199a1e9

5 years agoMerge "Fix exception in save/restore of EL2 registers." into integration
Manish Pandey [Tue, 19 May 2020 15:56:37 +0000 (15:56 +0000)]
Merge "Fix exception in save/restore of EL2 registers." into integration

5 years agoFix exception in save/restore of EL2 registers.
Max Shvetsov [Wed, 13 May 2020 17:15:39 +0000 (18:15 +0100)]
Fix exception in save/restore of EL2 registers.

Removing FPEXC32_EL2 from the register save/restore routine for EL2
registers since it is already a part of save/restore routine for
fpregs.

Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com>
Change-Id: I5ed45fdbf7c8efa8dcfcd96586328d4f6b256bc4

5 years agoFVP: Add support for passing platform's topology to DTS
Alexei Fedorov [Wed, 13 May 2020 20:13:57 +0000 (21:13 +0100)]
FVP: Add support for passing platform's topology to DTS

This patch adds support for passing FVP platform's topology
configuration to DTS files for compilation, which allows to
build DTBs with correct number of clusters and CPUs.
This removes non-existing clusters/CPUs from the compiled
device tree blob and fixes reported Linux errors when trying
to power on absent CPUs/PEs.
If DTS file is passed using FVP_HW_CONFIG_DTS build option from
the platform's makefile, FVP_CLUSTER_COUNT, FVP_MAX_CPUS_PER_CLUSTER
and FVP_MAX_PE_PER_CPU parameters are used, otherwise CI script will
use the default values from the corresponding DTS file.

Change-Id: Idcb45dc6ad5e3eaea18573aff1a01c9344404ab3
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoMerge "Fix compilation error when ENABLE_PIE=1" into integration
Sandrine Bailleux [Tue, 19 May 2020 11:27:13 +0000 (11:27 +0000)]
Merge "Fix compilation error when ENABLE_PIE=1" into integration

5 years agoCleanup the code for TBBR CoT descriptors
Manish V Badarkhe [Sat, 16 May 2020 15:36:39 +0000 (16:36 +0100)]
Cleanup the code for TBBR CoT descriptors

CoT used for BL1 and BL2 are moved to tbbr_cot_bl1.c
and tbbr_cot_bl2.c respectively.
Common CoT used across BL1 and BL2 are moved to
tbbr_cot_common.c.

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

5 years agoTegra: enable stack protection
Varun Wadekar [Sun, 17 May 2020 05:10:09 +0000 (22:10 -0700)]
Tegra: enable stack protection

This patch sets ENABLE_STACK_PROTECTOR=strong and implements
the platform support to generate a stack protection canary value.

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

5 years agoFix compilation error when ENABLE_PIE=1
Varun Wadekar [Sun, 17 May 2020 03:59:30 +0000 (20:59 -0700)]
Fix compilation error when ENABLE_PIE=1

This patch fixes compilation errors when ENABLE_PIE=1.

<snip>
bl31/aarch64/bl31_entrypoint.S: Assembler messages:
bl31/aarch64/bl31_entrypoint.S:61: Error: invalid operand (*UND* section) for `~'
bl31/aarch64/bl31_entrypoint.S:61: Error: invalid immediate
Makefile:1079: recipe for target 'build/tegra/t194/debug/bl31/bl31_entrypoint.o' failed
<snip>

Verified by setting 'ENABLE_PIE=1' for Tegra platform builds.

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

5 years agoMerge "plat/arm/fvp: Support performing SDEI platform setup in runtime" into integration
Mark Dykes [Fri, 15 May 2020 18:32:50 +0000 (18:32 +0000)]
Merge "plat/arm/fvp: Support performing SDEI platform setup in runtime" into integration

5 years agoplat/arm/fvp: Support performing SDEI platform setup in runtime
Balint Dobszay [Wed, 18 Dec 2019 14:28:00 +0000 (15:28 +0100)]
plat/arm/fvp: Support performing SDEI platform setup in runtime

This patch introduces dynamic configuration for SDEI setup and is supported
when the new build flag SDEI_IN_FCONF is enabled. Instead of using C arrays
and processing the configuration at compile time, the config is moved to
dts files. It will be retrieved at runtime during SDEI init, using the fconf
layer.

Change-Id: If5c35a7517ba00a9f258d7f3e7c8c20cee169a31
Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
Co-authored-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
5 years agoMerge "Tegra: introduce support for SMCCC_ARCH_SOC_ID" into integration
Manish Pandey [Fri, 15 May 2020 08:57:42 +0000 (08:57 +0000)]
Merge "Tegra: introduce support for SMCCC_ARCH_SOC_ID" into integration

5 years agoMerge "Implement workaround for AT speculative behaviour" into integration
Mark Dykes [Thu, 14 May 2020 14:53:55 +0000 (14:53 +0000)]
Merge "Implement workaround for AT speculative behaviour" into integration

5 years agoImplement workaround for AT speculative behaviour
Manish V Badarkhe [Tue, 28 Apr 2020 03:53:32 +0000 (04:53 +0100)]
Implement workaround for AT speculative behaviour

During context switching from higher EL (EL2 or higher)
to lower EL can cause incorrect translation in TLB due to
speculative execution of AT instruction using out-of-context
translation regime.

Workaround is implemented as below during EL's (EL1 or EL2)
"context_restore" operation:
1. Disable page table walk using SCTLR.M and TCR.EPD0 & EPD1
   bits for EL1 or EL2 (stage1 and stage2 disabled)
2. Save all system registers except TCR and SCTLR (for EL1 and EL2)
3. Do memory barrier operation (isb) to ensure all
   system register writes are done.
4. Restore TCR and SCTLR registers (for EL1 and EL2)

Errata details are available for various CPUs as below:
Cortex-A76: 1165522
Cortex-A72: 1319367
Cortex-A57: 1319537
Cortex-A55: 1530923
Cortex-A53: 1530924

More details can be found in mail-chain:
https://lists.trustedfirmware.org/pipermail/tf-a/2020-April/000445.html

Currently, Workaround is implemented as build option which is default
disabled.

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

5 years agoMerge changes I35c5abd9,I99e64245 into integration
Manish Pandey [Wed, 13 May 2020 16:06:42 +0000 (16:06 +0000)]
Merge changes I35c5abd9,I99e64245 into integration

* changes:
  SPMD: extract SPMC DTB header size from SPMD
  SPMD: code/comments cleanup

5 years agoMerge "doc: Reorganize maintainers.rst file" into integration
joanna.farley [Wed, 13 May 2020 09:27:41 +0000 (09:27 +0000)]
Merge "doc: Reorganize maintainers.rst file" into integration

5 years agoMerge "doc: Update various process documents" into integration
joanna.farley [Wed, 13 May 2020 09:21:19 +0000 (09:21 +0000)]
Merge "doc: Update various process documents" into integration

5 years agodoc: Reorganize maintainers.rst file
Sandrine Bailleux [Wed, 13 May 2020 06:57:41 +0000 (08:57 +0200)]
doc: Reorganize maintainers.rst file

The maintainers.rst file provides the list of all TF-A modules and their
code owners. As there are quite a lot of modules (and more to come) in
TF-A, it is sometimes hard to find the information.

Introduce categories (core code, drivers/libraries/framework, ...) and
classify each module in the right one.

Note that the core code category is pretty much empty right now but the
plan would be to expand it with further modules (e.g. PSCI, SDEI, TBBR,
...) in a future patch.

Change-Id: Id68a2dd79a8f6b68af5364bbf1c59b20c05f8fe7
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
5 years agodoc: Update various process documents
Sandrine Bailleux [Tue, 12 May 2020 08:36:05 +0000 (10:36 +0200)]
doc: Update various process documents

Most of the changes consist in using the new code owners terminology
(from [1]).

[1] https://developer.trustedfirmware.org/w/collaboration/project-maintenance-process/

Change-Id: Icead20e9335af12aa47d3f1ac5d04ca157b20c82
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
5 years agoSPMD: extract SPMC DTB header size from SPMD
Olivier Deprez [Fri, 7 Feb 2020 14:44:43 +0000 (15:44 +0100)]
SPMD: extract SPMC DTB header size from SPMD

Currently BL2 passes TOS_FW_CONFIG address and size through registers to
BL31. This corresponds to SPMC manifest load address and size. The SPMC
manifest is mapped in BL31 by dynamic mapping. This patch removes BL2
changes from generic code (which were enclosed by SPD=spmd) and retrieves
SPMC manifest size directly from within SPMD. The SPMC manifest load
address is still passed through a register by generic code.

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

5 years agoSPMD: code/comments cleanup
Olivier Deprez [Thu, 16 Apr 2020 11:39:06 +0000 (13:39 +0200)]
SPMD: code/comments cleanup

As a follow-up to bdd2596d4, and related to SPM Dispatcher
EL3 component and SPM Core S-EL2/S-EL1 component: update
with cosmetic and coding rules changes. In addition:
-Add Armv8.4-SecEL2 arch detection helper.
-Add an SPMC context (on current core) get helper.
-Return more meaningful error return codes.
-Remove complexity in few spmd_smc_handler switch-cases.
-Remove unused defines and structures from spmd_private.h

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

5 years agoTegra: introduce support for SMCCC_ARCH_SOC_ID
Varun Wadekar [Tue, 12 May 2020 21:04:10 +0000 (14:04 -0700)]
Tegra: introduce support for SMCCC_ARCH_SOC_ID

This patch returns the SOC version and revision values from
the 'plat_get_soc_version' and 'plat_get_soc_revision' handlers.

Verified using TFTF SMCCC_ARCH_SOC_ID test.

<snip>
> Executing 'SMCCC_ARCH_SOC_ID test'
  TEST COMPLETE                                                 Passed
SOC Rev = 0x102
SOC Ver = 0x36b0019
<snip>

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

5 years agodrivers: stm32mp1 clocks: fix debug trace on clock enable/disable
Etienne Carriere [Sun, 8 Dec 2019 07:21:08 +0000 (08:21 +0100)]
drivers: stm32mp1 clocks: fix debug trace on clock enable/disable

Adds missing terminal new line character '\n' to debug traces,
fix format as index is an unsigned value and use present tense rather
than past tense in the printed message.

Change-Id: I88c06ef4d3a11d97ff8e96875a3dd0f58a3c98b6
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
5 years agodrivers: stm32mp1 clocks: enable system clocks during initialization
Etienne Carriere [Sun, 8 Dec 2019 07:23:35 +0000 (08:23 +0100)]
drivers: stm32mp1 clocks: enable system clocks during initialization

Enable few system clocks at related BL initialization.

Change-Id: I12b35e8cdc128b993de4a1dc4c6e9d52624dd8d9
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
5 years agodrivers: stm32mp1 clocks: prevent crash on always on clocks
Etienne Carriere [Sun, 8 Dec 2019 07:21:44 +0000 (08:21 +0100)]
drivers: stm32mp1 clocks: prevent crash on always on clocks

Oscillators and PLLs are not gated on stm32mp_clk_enable/disable()
calls. This change prevents functions to panic when called for such
always-on clocks. Gating these clocks is out of the scope of
this change.

Change-Id: Ie730553dea480b529de942446176db9119587832
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
5 years agodrivers: stm32mp1 clocks: add RTC as a gateable clock
Etienne Carriere [Sun, 8 Dec 2019 07:22:31 +0000 (08:22 +0100)]
drivers: stm32mp1 clocks: add RTC as a gateable clock

Adds RTC clock to the list of the supported clocks. This allows
stm32mp_clk_*() API functions to enable, disable and set and get
rate for the clock RTC clock.

Change-Id: I8efc3f00b1f22d1912f59d1846994e9e646d6614
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
5 years agodrivers: stm32mp1 clocks: support shifted clock selector bit masks
Etienne Carriere [Sun, 8 Dec 2019 07:20:40 +0000 (08:20 +0100)]
drivers: stm32mp1 clocks: support shifted clock selector bit masks

The current implementation optimizes memory consumed by gateable
clock table by storing bit mask and bit shift with 1 byte each.
The issue is that register selector bit masks above the 7th LSBit
cannot be stored.

This change uses the shift info to shift the mask before it is used,
allowing clock selector register bit fields to be spread on the 32 bits
of the register as long as the mask fits in 8 contiguous bit at most.

This change is needed to add the RTC clock to the gateable clocks table.

Change-Id: I8a0fbcbf20ea383fb3d712f5064d2d307e44465d
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
5 years agodrivers: stm32mp1 clocks: allow tree lookup for several system clocks
Etienne Carriere [Sun, 8 Dec 2019 07:20:12 +0000 (08:20 +0100)]
drivers: stm32mp1 clocks: allow tree lookup for several system clocks

Oscillators, PLLs and some system clocks can be related straight to
a parent clock. Prior this change were only oscillators and few
clocks supported by this look up. This changes adds PLLs and other
system clocks. This enables for flexible use of clock tree exploration
when computing a clock frequency value.

Change-Id: I15ec98023a7095e3120a6954de59a4799d92c66b
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
5 years agoplat/stm32mp1: fdt helpers for secure aware gpio bank
Etienne Carriere [Sat, 25 Apr 2020 09:14:45 +0000 (11:14 +0200)]
plat/stm32mp1: fdt helpers for secure aware gpio bank

New helper functions to get GPIO banks configuration from the FDT.

stm32_get_gpio_bank_pinctrl_node() allows stm32mp platforms to
differentiate specific GPIO banks when these are defined with a specific
path in the FDT.

fdt_get_gpio_bank_pin_count() returns the number of pins in a GPIO bank
as it depends on the SoC variant.

Change-Id: I4481774152b3c6bf35bf986f58e357c2f9c19176
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
5 years agoplat/st: move GPIO bank helper function to platform source files
Etienne Carriere [Mon, 2 Dec 2019 09:05:02 +0000 (10:05 +0100)]
plat/st: move GPIO bank helper function to platform source files

Relation between GPIO banks and their base address and offset address
if platform dependent. This change moves helper functions
stm32_get_gpio_bank_base() and stm32_get_gpio_bank_offset() from
plat/st/common to plat/st/stm32mp1/.

Change-Id: Id3d03e585746aa5509c6fab7d88183a92d561e3f
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
5 years agoMerge "Fix SMCCC_ARCH_SOC_ID implementation" into integration
Mark Dykes [Fri, 8 May 2020 18:18:34 +0000 (18:18 +0000)]
Merge "Fix SMCCC_ARCH_SOC_ID implementation" into integration

5 years agoMerge changes from topic "fdt_wrappers_rework" into integration
Sandrine Bailleux [Thu, 7 May 2020 11:51:31 +0000 (11:51 +0000)]
Merge changes from topic "fdt_wrappers_rework" into integration

* changes:
  arm_fpga: Read UART address from DT
  arm_fpga: Read GICD and GICR base addresses from DT
  arm_fpga: Read generic timer counter frequency from DT
  arm_fpga: Use Generic UART

5 years agoMerge changes from topic "fdt_wrappers_rework" into integration
Sandrine Bailleux [Thu, 7 May 2020 08:59:33 +0000 (08:59 +0000)]
Merge changes from topic "fdt_wrappers_rework" into integration

* changes:
  plat/stm32: Use generic fdt_get_stdout_node_offset()
  fdt/wrappers: Introduce code to find UART DT node
  plat/stm32: Use generic fdt_get_reg_props_by_name()

5 years agoTegra194: validate C6 power state type
Varun Wadekar [Wed, 6 May 2020 05:44:20 +0000 (22:44 -0700)]
Tegra194: validate C6 power state type

This patch validates that PSTATE_STANDBY is set as the C6 power state type.

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

5 years agoTegra194: remove support for CPU suspend power down state
Varun Wadekar [Thu, 23 Apr 2020 16:56:06 +0000 (09:56 -0700)]
Tegra194: remove support for CPU suspend power down state

Tegra194 platforms removed support to power down CPUs during CPU suspend. This
patch removes the support for CPU suspend power down as a result.

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

5 years agoarm_fpga: Read UART address from DT
Andre Przywara [Thu, 9 Apr 2020 09:25:43 +0000 (10:25 +0100)]
arm_fpga: Read UART address from DT

The arm_fpga port requires a DTB, to launch a BL33 payload.
To make this port more flexible, we can also use the information in the
DT to configure the console driver.
For a start, find the DT node pointed to by the stdout-path property, and
read the base address from there.
This assumes for now that the stdout-path points to a PL011 UART.

This allows to remove platform specific addresses from the image. We
keep the original base address for the crash console.

Change-Id: I46a990de2315f81cae4d7913ae99a07b0bec5cb1
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agoplat/stm32: Use generic fdt_get_stdout_node_offset()
Andre Przywara [Thu, 9 Apr 2020 10:27:21 +0000 (11:27 +0100)]
plat/stm32: Use generic fdt_get_stdout_node_offset()

Now that we have an implementation for getting the node offset of the
stdout-path property in the generic fdt_wrappers code, use that to
replace the current ST platform specific implementation.

Change-Id: I5dd05684e7ca3cb563b5f71c885e1066393e057e
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agoarm_fpga: Read GICD and GICR base addresses from DT
Andre Przywara [Fri, 24 Jan 2020 15:46:05 +0000 (15:46 +0000)]
arm_fpga: Read GICD and GICR base addresses from DT

Since we use a DTB with all platform information to pass this on to a
kernel loaded as BL33, we can as well make use of it for our own
purposes.

Every DT would contain a node for the GIC(v3) interrupt controller, so
we can read the base address for the distributor and redistributors from
there.

This avoids hard coding this information in the code and allows for a more
flexible binary.

Change-Id: Ic530e223a21a45bc30a07a21048116d5af69e972
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agofdt/wrappers: Introduce code to find UART DT node
Andre Przywara [Thu, 26 Mar 2020 12:52:06 +0000 (12:52 +0000)]
fdt/wrappers: Introduce code to find UART DT node

The stdout-path property in the /chosen node of a DTB points to a device
node, which is used for boot console output.
On most (if not all) ARM based platforms this is the debug UART.
The ST platform code contains a function to parse this property and
chase down eventual aliases to learn the node offset of this UART node.

Introduce a slightly more generalised version of this ST platform function
in the generic fdt_wrappers code. This will be useful for other platforms
as well.

Change-Id: Ie6da47ace7833861b5e35fe8cba49835db3659a5
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agoarm_fpga: Read generic timer counter frequency from DT
Andre Przywara [Fri, 24 Jan 2020 15:02:27 +0000 (15:02 +0000)]
arm_fpga: Read generic timer counter frequency from DT

The ARM Generic Timer DT binding describes an (optional) property to
declare the counter frequency. Its usage is normally discouraged, as the
value should be read from the CNTFRQ_EL0 system register.

However in our case we can use it to program this register in the first
place, which avoids us to hard code a counter frequency into the code.
We keep some default value in, if the DT lacks that property for
whatever reason.

Change-Id: I5b71176db413f904f21eb16f3302fbb799cb0305
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agoplat/stm32: Use generic fdt_get_reg_props_by_name()
Andre Przywara [Thu, 26 Mar 2020 12:11:34 +0000 (12:11 +0000)]
plat/stm32: Use generic fdt_get_reg_props_by_name()

The STM32 platform port parse DT nodes to find base address to
peripherals. It does this by using its own implementation, even though
this functionality is generic and actually widely useful outside of the
STM32 code.

Re-implement fdt_get_reg_props_by_name() on top of the newly introduced
fdt_get_reg_props_by_index() function, and move it to fdt_wrapper.c.
This is removes the assumption that #address-cells and #size-cells are
always one.

Change-Id: I6d584930262c732b6e0356d98aea50b2654f789d
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agoarm_fpga: Use Generic UART
Andre Przywara [Thu, 9 Apr 2020 09:10:09 +0000 (10:10 +0100)]
arm_fpga: Use Generic UART

The SCP firmware on the ARM FPGA initialises the UART already. This allows
us to treat the PL011 as an SBSA Generic UART, which does not require
any further setup.

This in particular removes the need for any baudrate and base clock related
settings to be hard coded into the BL31 image.

Change-Id: I16fc943526267356b97166a7068459e06ff77f0f
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agoMerge "rcar_gen3: plat: Zero-terminate the string in unsigned_num_print()" into integ...
Sandrine Bailleux [Tue, 5 May 2020 13:12:33 +0000 (13:12 +0000)]
Merge "rcar_gen3: plat: Zero-terminate the string in unsigned_num_print()" into integration

5 years agoMerge changes I85eb75cf,Ic6d9f927 into integration
Sandrine Bailleux [Tue, 5 May 2020 12:01:48 +0000 (12:01 +0000)]
Merge changes I85eb75cf,Ic6d9f927 into integration

* changes:
  fconf: Update dyn_config compatible string
  doc: Add binding document for fconf.

5 years agoMerge "Fix build type is empty in version string" into integration
Sandrine Bailleux [Tue, 5 May 2020 08:37:47 +0000 (08:37 +0000)]
Merge "Fix build type is empty in version string" into integration

5 years agoFix SMCCC_ARCH_SOC_ID implementation
Manish V Badarkhe [Tue, 28 Apr 2020 12:25:56 +0000 (13:25 +0100)]
Fix SMCCC_ARCH_SOC_ID implementation

Commit 0e753437e75b ("Implement SMCCC_ARCH_SOC_ID SMC call") executes
and return the result of SMCCC_ARCH_SOC_ID(soc_id_type) to the
SMCCC_ARCH_FEATURES(SMCCC_ARCH_SOC_ID) itself. Moreover it expect to
pass soc_id_type for SMCCC_ARCH_FEATURES(SMCCC_ARCH_SOC_ID) which is
incorrect.

Fix the implementation by returning SMC_OK for
SMCCC_ARCH_FEATURES(SMCCC_ARCH_SOC_ID) always and move the current
implementation under "smccc_arch_id" function which gets called from
SMC handler on receiving "SMCCC_ARCH_SOC_ID" command.

This change is tested over linux operating system

Change-Id: I61a980045081eae786b907d408767ba9ecec3468
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>