]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
5 years agoSPMC: adjust device region for first secure partition
Olivier Deprez [Thu, 8 Oct 2020 06:38:58 +0000 (08:38 +0200)]
SPMC: adjust device region for first secure partition

For the first partition, mark first 2GB as device memory excluding
the Trusted DRAM region reserved for the SPMC.

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

5 years agoMerge "docs: code review guidelines" into integration
Manish Pandey [Tue, 20 Oct 2020 20:19:35 +0000 (20:19 +0000)]
Merge "docs: code review guidelines" into integration

5 years agoMerge "fdts: add missing hash node in STM32MP157C-ED1 board DT" into integration
Alexei Fedorov [Mon, 19 Oct 2020 12:08:21 +0000 (12:08 +0000)]
Merge "fdts: add missing hash node in STM32MP157C-ED1 board DT" into integration

5 years agoMerge "Increase type widths to satisfy width requirements" into integration
Joanna Farley [Sun, 18 Oct 2020 14:51:00 +0000 (14:51 +0000)]
Merge "Increase type widths to satisfy width requirements" into integration

5 years agoMerge changes Iba51bff1,I3f563cff into integration
Madhukar Pappireddy [Fri, 16 Oct 2020 22:00:04 +0000 (22:00 +0000)]
Merge changes Iba51bff1,I3f563cff into integration

* changes:
  plat:qti Mandate SMC implementaion and bug fix
  Update in coreboot_get_memory_type API to include size as well

5 years agoMerge "docs: Remove deprecated information" into integration
Mark Dykes [Fri, 16 Oct 2020 20:35:29 +0000 (20:35 +0000)]
Merge "docs: Remove deprecated information" into integration

5 years agoMerge "docs: Update Release information for v2.5" into integration
Mark Dykes [Fri, 16 Oct 2020 20:34:32 +0000 (20:34 +0000)]
Merge "docs: Update Release information for v2.5" into integration

5 years agoMerge "docs: Update code freeze and release target date for v2.4" into integration
Mark Dykes [Fri, 16 Oct 2020 20:33:24 +0000 (20:33 +0000)]
Merge "docs: Update code freeze and release target date for v2.4" into integration

5 years agodocs: Remove deprecated information
Manish V Badarkhe [Thu, 8 Oct 2020 01:21:20 +0000 (02:21 +0100)]
docs: Remove deprecated information

There are no references to AARCH32, AARCH64 and
__ASSEMBLY__ macros in the TF-A code hence
removed the deprecated information mentioning about
these macros in the document.

Change-Id: I472ab985ca2e4173bae23ff7b4465a9b60bc82eb
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
5 years agodocs: Update Release information for v2.5
Manish V Badarkhe [Thu, 8 Oct 2020 01:16:25 +0000 (02:16 +0100)]
docs: Update Release information for v2.5

Updated tentative code freeze and release target date
for v2.5 release.

Change-Id: Idcfd9a127e9210846370dfa0685badac5b1c25c7
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
5 years agodocs: Update code freeze and release target date for v2.4
Manish V Badarkhe [Thu, 8 Oct 2020 01:11:20 +0000 (02:11 +0100)]
docs: Update code freeze and release target date for v2.4

Updated code freeze and release information date for v2.4
release.

Change-Id: I76d5d04d0ee062a350f6a693eb04c29017d8b2e0
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
5 years agoMerge changes I0005959b,I2ea59edb into integration
Manish Pandey [Thu, 15 Oct 2020 21:12:49 +0000 (21:12 +0000)]
Merge changes I0005959b,I2ea59edb into integration

* changes:
  bl32: add an assert on BL32_SIZE in sp_min.ld.S
  bl32: use SORT_BY_ALIGNMENT macro in sp_min.ld.S

5 years agoplat:qti Mandate SMC implementaion and bug fix
Saurabh Gorecha [Wed, 14 Oct 2020 18:41:15 +0000 (00:11 +0530)]
plat:qti Mandate SMC implementaion and bug fix

implementation of SMC call SMCCC_ARCH_SOC_ID
adding debugging logs in mem assign call.
Checking range of param in mem_assign call is from CB_MEM_RAM
or CB_MEM_RESERVED.

Change-Id: Iba51bff154df01e02dcb7715582ffaff7beba26e
Signed-off-by: Saurabh Gorecha <sgorecha@codeaurora.org>
5 years agoUpdate in coreboot_get_memory_type API to include size as well
Saurabh Gorecha [Wed, 14 Oct 2020 18:35:36 +0000 (00:05 +0530)]
Update in coreboot_get_memory_type API to include size as well

Change-Id: I3f563cffd58b0591b433c85c0ff6b71e486eb2c8
Signed-off-by: Saurabh Gorecha <sgorecha@codeaurora.org>
5 years agoMerge "Don't return error information from console_flush" into integration
Mark Dykes [Wed, 14 Oct 2020 18:59:27 +0000 (18:59 +0000)]
Merge "Don't return error information from console_flush" into integration

5 years agoMerge "stm32mp1: use %u in NOTICE message for board info" into integration
Alexei Fedorov [Wed, 14 Oct 2020 16:55:05 +0000 (16:55 +0000)]
Merge "stm32mp1: use %u in NOTICE message for board info" into integration

5 years agofdts: add missing hash node in STM32MP157C-ED1 board DT
Yann Gautier [Tue, 13 Oct 2020 16:05:06 +0000 (18:05 +0200)]
fdts: add missing hash node in STM32MP157C-ED1 board DT

Without this node, the board fails to boot and panics in the function
stm32mp_init_auth().

Change-Id: Ia54924410dac2a8c94dd6e45d7e93977fe7d87e2
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agostm32mp1: use %u in NOTICE message for board info
Yann Gautier [Tue, 13 Oct 2020 16:03:31 +0000 (18:03 +0200)]
stm32mp1: use %u in NOTICE message for board info

The board information values, read in an OTP are never negative,
%u is then used instead of %d.

Change-Id: I3bc22401fb4d54666ddf56411f75b79aca738492
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agoMerge changes from topic "stm32mp1_plat_updates" into integration
Madhukar Pappireddy [Tue, 13 Oct 2020 15:46:35 +0000 (15:46 +0000)]
Merge changes from topic "stm32mp1_plat_updates" into integration

* changes:
  docs: update STM32MP1 with versions details
  stm32mp1: get peripheral base address from a define
  stm32mp1: add finished good variant in board identifier

5 years agoMerge "stm32mp1: add asserts in get_cpu_package() and get_part_number()" into integration
Alexei Fedorov [Tue, 13 Oct 2020 14:42:55 +0000 (14:42 +0000)]
Merge "stm32mp1: add asserts in get_cpu_package() and get_part_number()" into integration

5 years agoMerge "stm32mp1: add support for new SoC profiles" into integration
Alexei Fedorov [Tue, 13 Oct 2020 14:42:26 +0000 (14:42 +0000)]
Merge "stm32mp1: add support for new SoC profiles" into integration

5 years agoMerge "stm32mp1: support of STM32MP15x Rev.Z" into integration
Alexei Fedorov [Tue, 13 Oct 2020 14:42:09 +0000 (14:42 +0000)]
Merge "stm32mp1: support of STM32MP15x Rev.Z" into integration

5 years agoMerge changes from topic "st/fmc2" into integration
Manish Pandey [Tue, 13 Oct 2020 12:11:04 +0000 (12:11 +0000)]
Merge changes from topic "st/fmc2" into integration

* changes:
  drivers: stm32_fmc2_nand: fix boundary check for chip select
  drivers: stm32_fmc2_nand: move to new bindings

5 years agodocs: update STM32MP1 with versions details
Yann Gautier [Tue, 13 Oct 2020 09:27:05 +0000 (11:27 +0200)]
docs: update STM32MP1 with versions details

After introducing the new STM32MP1 SoC versions in patch [1], the
document describing STM32MP1 platform is updated with the information
given in the patch commit message.

 [1]: stm32mp1: add support for new SoC profiles

Change-Id: I6d7ce1a3c29678ddac78a6685f5d5daf28c3c3a1
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agostm32mp1: add asserts in get_cpu_package() and get_part_number()
Nicolas Le Bayon [Mon, 23 Sep 2019 09:18:32 +0000 (11:18 +0200)]
stm32mp1: add asserts in get_cpu_package() and get_part_number()

Change-Id: I2b702698d6be93da5ac86da1cbc98b3838315a5a
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agostm32mp1: add support for new SoC profiles
Lionel Debieve [Fri, 17 May 2019 14:01:18 +0000 (16:01 +0200)]
stm32mp1: add support for new SoC profiles

Update to support new part numbers.

Add new STM32 MPUs Part = STM32MP151F, STM32MP153F, STM32MP157F,
STM32MP151D, STM32MP153D, STM32MP157D

The STM32MP1 series is available in 3 different lines which are pin-to-pin
compatible:
- STM32MP157: Dual Cortex-A7 cores, Cortex-M4 core @ 209 MHz,
              3D GPU, DSI display interface and CAN FD
- STM32MP153: Dual Cortex-A7 cores, Cortex-M4 core @ 209 MHz
              and CAN FD
- STM32MP151: Single Cortex-A7 core, Cortex-M4 core @ 209 MHz

Each line comes with a security option (cryptography & secure boot)
& a Cortex-A frequency option :

- A      Basic + Cortex-A7 @ 650 MHz
- C      Secure Boot + HW Crypto + Cortex-A7 @ 650 MHz
- D      Basic + Cortex-A7 @ 800 MHz
- F      Secure Boot + HW Crypto + Cortex-A7 @ 800 MHz

Remove useless variable in stm32mp_is_single_core().

Change-Id: Id30c836af986c6340c91efa8a7ae9480a2827089
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agostm32mp1: support of STM32MP15x Rev.Z
Lionel Debieve [Tue, 25 Jun 2019 08:40:37 +0000 (10:40 +0200)]
stm32mp1: support of STM32MP15x Rev.Z

Add a new revision of STM32MP15x CPU (Rev.Z).

Change-Id: I227dd6d9b3fcc43270015cfb21f60aeb0a8ab658
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agostm32mp1: get peripheral base address from a define
Yann Gautier [Tue, 5 May 2020 15:58:40 +0000 (17:58 +0200)]
stm32mp1: get peripheral base address from a define

Retrieve peripheral base address from a define instead of
parsing the device tree. The goal is to improve execution time.

Signed-off-by: Pascal Paillet <p.paillet@st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I2588c53ad3d4abcc3d7fe156458434a7940dd72b

5 years agostm32mp1: add finished good variant in board identifier
Patrick Delaunay [Wed, 8 Jan 2020 09:05:14 +0000 (10:05 +0100)]
stm32mp1: add finished good variant in board identifier

Update the board info with the new coding including the finished good
variant:

Board: MBxxxx Var<CPN>.<FG> Rev.<Rev>-<BOM>

The OTP 59 coding is:
bit [31:16] (hex) => MBxxxx
bit [15:12] (dec) => Variant CPN (1....15)
bit [11:8]  (dec) => Revision board (index with A = 1, Z = 26)
bit [7:4]   (dec) => Variant FG : finished good (NEW)
bit [3:0]   (dec) => BOM (01, .... 255)

Change-Id: I4fbc0c84596419d1bc30d166311444ece1d9123f
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agoMerge "Fix casting bug in gicv2_main.c" into integration
Madhukar Pappireddy [Mon, 12 Oct 2020 18:20:53 +0000 (18:20 +0000)]
Merge "Fix casting bug in gicv2_main.c" into integration

5 years agoIncrease type widths to satisfy width requirements
Jimmy Brisson [Tue, 4 Aug 2020 21:18:52 +0000 (16:18 -0500)]
Increase type widths to satisfy width requirements

Usually, C has no problem up-converting types to larger bit sizes. MISRA
rule 10.7 requires that you not do this, or be very explicit about this.
This resolves the following required rule:

    bl1/aarch64/bl1_context_mgmt.c:81:[MISRA C-2012 Rule 10.7 (required)]<None>
    The width of the composite expression "0U | ((mode & 3U) << 2U) | 1U |
    0x3c0U" (32 bits) is less that the right hand operand
    "18446744073709547519ULL" (64 bits).

This also resolves MISRA defects such as:

    bl2/aarch64/bl2arch_setup.c:18:[MISRA C-2012 Rule 12.2 (required)]
    In the expression "3U << 20", shifting more than 7 bits, the number
    of bits in the essential type of the left expression, "3U", is
    not allowed.

Further, MISRA requires that all shifts don't overflow. The definition of
PAGE_SIZE was (1U << 12), and 1U is 8 bits. This caused about 50 issues.
This fixes the violation by changing the definition to 1UL << 12. Since
this uses 32bits, it should not create any issues for aarch32.

This patch also contains a fix for a build failure in the sun50i_a64
platform. Specifically, these misra fixes removed a single and
instruction,

    92407e73        and     x19, x19, #0xffffffff

from the cm_setup_context function caused a relocation in
psci_cpus_on_start to require a linker-generated stub. This increased the
size of the .text section and caused an alignment later on to go over a
page boundary and round up to the end of RAM before placing the .data
section. This sectionn is of non-zero size and therefore causes a link
error.

The fix included in this reorders the functions during link time
without changing their ording with respect to alignment.

Change-Id: I76b4b662c3d262296728a8b9aab7a33b02087f16
Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
5 years agoMerge changes from topic "deprecated-macro" into integration
Manish Pandey [Mon, 12 Oct 2020 14:12:59 +0000 (14:12 +0000)]
Merge changes from topic "deprecated-macro" into integration

* changes:
  Makefile: Remove unused macro
  plat: brcm: Remove 'AARCH32' deprecated macro
  Remove deprecated macro from TF-A code

5 years agodrivers: stm32_fmc2_nand: fix boundary check for chip select
Lionel Debieve [Tue, 21 Jul 2020 13:22:55 +0000 (15:22 +0200)]
drivers: stm32_fmc2_nand: fix boundary check for chip select

Chip select is retrieved from device tree and check
must be done regarding the MAX_CS defined.

Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Reviewed-by: Christophe KERELLO <christophe.kerello@st.com>
Change-Id: I03144b133bd51a845a4794f0f6bbd9402fc04936

5 years agodrivers: stm32_fmc2_nand: move to new bindings
Christophe Kerello [Thu, 16 Jul 2020 14:57:34 +0000 (16:57 +0200)]
drivers: stm32_fmc2_nand: move to new bindings

FMC node bindings are modified to add EBI controller node.
FMC driver and associated device tree files are modified
to support these new bindings.

Change-Id: I4bf201e96a1aca20957e0dac3a3b87caadd05bdc
Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
5 years agoMerge "intel: platform: Include GICv2 makefile" into integration
Manish Pandey [Mon, 12 Oct 2020 11:14:06 +0000 (11:14 +0000)]
Merge "intel: platform: Include GICv2 makefile" into integration

5 years agoMakefile: Remove unused macro
Manish V Badarkhe [Wed, 7 Oct 2020 20:15:27 +0000 (21:15 +0100)]
Makefile: Remove unused macro

Removed unused macro AARCH32 and AARCH64 from makefile

Change-Id: I6729e300f18d66dd7c6978d3bbd5a88937839c31
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
5 years agoplat: brcm: Remove 'AARCH32' deprecated macro
Manish V Badarkhe [Wed, 7 Oct 2020 17:53:23 +0000 (18:53 +0100)]
plat: brcm: Remove 'AARCH32' deprecated macro

Removed 'AARCH32' deprecated macro from 'stingray'
Broadcom platform code.

Change-Id: If8d9e785b7980fefd39df06547fcf71b899fd735
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
5 years agoRemove deprecated macro from TF-A code
Manish V Badarkhe [Wed, 7 Oct 2020 15:04:06 +0000 (16:04 +0100)]
Remove deprecated macro from TF-A code

Removed '__ASSEMBLY__' deprecated macro from TF-A code

Change-Id: I9082a568b695acb5b903f509db11c8672b62d9d0
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
5 years agoMerge "TF-A: Add HASH_ALG default value to defaults.mk" into integration
Manish Pandey [Mon, 12 Oct 2020 10:36:53 +0000 (10:36 +0000)]
Merge "TF-A: Add HASH_ALG default value to defaults.mk" into integration

5 years agoMerge "mediatek: mt8192: add GIC600 support" into integration
Manish Pandey [Mon, 12 Oct 2020 09:16:21 +0000 (09:16 +0000)]
Merge "mediatek: mt8192: add GIC600 support" into integration

5 years agoTF-A: Add HASH_ALG default value to defaults.mk
Alexei Fedorov [Tue, 6 Oct 2020 14:54:12 +0000 (15:54 +0100)]
TF-A: Add HASH_ALG default value to defaults.mk

This patch adds default value of 'sha256' for HASH_ALG
build flag to 'make_helpers\defaults.mk', according to
'docs\getting_started\build-options.rst'.
This fixes Measured Boot driver error when TF-A uses
default HASH_ALG value and TPM_HASH_ALG is set to
sha384 or sha512.

Change-Id: Id0aa34b54807de0adaf88e5f7d7032577c22f365
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoFix casting bug in gicv2_main.c
johpow01 [Mon, 28 Sep 2020 21:56:48 +0000 (16:56 -0500)]
Fix casting bug in gicv2_main.c

In the function gicv2_set_spi_routing, the signed value proc_num is cast
to unsigned int before being compared to other unsigned values in two
assert calls.  The value proc_num can be a negative value, and once the
negative value is cast to unsigned it becomes a very large number which
will trigger the assert.  This patch changes the assert cast so that the
unsigned values are cast to signed instead, keeping the same functionality
but allowing proc_num to be negative.

This bug can be seen when running the SDEI RM_ANY routing mode test in
TFTF on the Juno platform.

This patch also makes the usage of the proc_num variable in other gicv2
functions more clear.

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

5 years agoMerge "Workaround for Cortex A77 erratum 1925769" into integration
Lauren Wehrmeister [Fri, 9 Oct 2020 19:17:23 +0000 (19:17 +0000)]
Merge "Workaround for Cortex A77 erratum 1925769" into integration

5 years agoDon't return error information from console_flush
Jimmy Brisson [Wed, 5 Aug 2020 18:44:05 +0000 (13:44 -0500)]
Don't return error information from console_flush

And from crash_console_flush.

We ignore the error information return by console_flush in _every_
place where we call it, and casting the return type to void does not
work around the MISRA violation that this causes. Instead, we collect
the error information from the driver (to avoid changing that API), and
don't return it to the caller.

Change-Id: I1e35afe01764d5c8f0efd04f8949d333ffb688c1
Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
5 years agoMerge "drivers: stm32_fmc2_nand: fix incorrect error detection" into integration
Manish Pandey [Fri, 9 Oct 2020 14:50:34 +0000 (14:50 +0000)]
Merge "drivers: stm32_fmc2_nand: fix incorrect error detection" into integration

5 years agoMerge changes I99a5d96f,I89b950f0 into integration
Manish Pandey [Fri, 9 Oct 2020 11:09:19 +0000 (11:09 +0000)]
Merge changes I99a5d96f,I89b950f0 into integration

* changes:
  lib/cpus: update MIDR value for rainier cpu
  fdts: enable virtio-rng component for morello fvp platform

5 years agolib/cpus: update MIDR value for rainier cpu
Jagadeesh Ujja [Wed, 7 Oct 2020 14:21:46 +0000 (19:51 +0530)]
lib/cpus: update MIDR value for rainier cpu

This patch updates the MIDR value for rainier cpu.

Change-Id: I99a5d96f757239cf65b2688095c4ec66cd991cf9
Signed-off-by: Jagadeesh Ujja <jagadeesh.ujja@arm.com>
5 years agoMerge changes from topic "stm32mp1_platform_mk" into integration
Manish Pandey [Fri, 9 Oct 2020 10:08:24 +0000 (10:08 +0000)]
Merge changes from topic "stm32mp1_platform_mk" into integration

* changes:
  stm32mp1: cosmetics in platform.mk
  stm32mp1: update rules for stm32image tool
  stm32mp1: add macros to define PLAT_PARTITION_MAX_ENTRIES
  stm32mp1: sort platform.mk
  stm32mp1: use ASFLAGS for binary paths
  stm32mp1: use internal MAKE_LD macro to generate stm32 linker files

5 years agostm32mp1: cosmetics in platform.mk
Yann Gautier [Fri, 18 Sep 2020 08:32:37 +0000 (10:32 +0200)]
stm32mp1: cosmetics in platform.mk

Remove some useless extra tabs or spaces.
Replace some spaces with tabs.

Change-Id: I0e8e2a1a1be7a1109ba7f3e3ae35e3fe1b5b4552
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agostm32mp1: update rules for stm32image tool
Yann Gautier [Fri, 18 Sep 2020 08:21:29 +0000 (10:21 +0200)]
stm32mp1: update rules for stm32image tool

In heavy parallel builds, it has sometimes been seen issues with the
tool not generated before it was needed. Change some rules order and
dependency to solve that.

Change-Id: I8f4b4f46a2ea0fe496bc66bca47c66d1c81d3c99
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agostm32mp1: add macros to define PLAT_PARTITION_MAX_ENTRIES
Yann Gautier [Thu, 17 Sep 2020 10:28:12 +0000 (12:28 +0200)]
stm32mp1: add macros to define PLAT_PARTITION_MAX_ENTRIES

There were fixed values when computing PLAT_PARTITION_MAX_ENTRIES.
Use STM32_BL33_PARTS_NUM and STM32_RUNTIME_PARTS_NUM. The first one is
for the number of copies of BL33. The second one depends on the use case
SP_min or OP-TEE. For OP-TEE, there are 3 partitions. For SP_min, as it
is in the same binary as BL2, it is set to 0. It will be set to 1 if
BL32 is in a separate binary.

Change-Id: Iba4d8ec5fbc713bebfbdcd9f9426c3fded20d3ad
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agostm32mp1: sort platform.mk
Yann Gautier [Wed, 12 Feb 2020 08:30:49 +0000 (09:30 +0100)]
stm32mp1: sort platform.mk

First put Makefile variables definition, then definitions for each feature,
then C flags, then source files, then compilation rules.

Change-Id: I238115ea2fe4ebafccd2135979814c27932c34e2
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agostm32mp1: use ASFLAGS for binary paths
Yann Gautier [Thu, 23 Jan 2020 17:41:20 +0000 (18:41 +0100)]
stm32mp1: use ASFLAGS for binary paths

To simplify the rule that creates the concatenated binary, use ASFLAGS
instead of adding all paths in the AS command line. This allows a better
management if a binary is not present.

Change-Id: Ic8b4566e7dedc6f55be355a92e3b214cef138d9b
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agostm32mp1: use internal MAKE_LD macro to generate stm32 linker files
Yann Gautier [Thu, 14 May 2020 14:54:12 +0000 (16:54 +0200)]
stm32mp1: use internal MAKE_LD macro to generate stm32 linker files

The previous proprietary version was not correctly handling dependencies.
Using MAKE_LD from make_helpers files now correctly handles that.
The generated linker script is the same as before.

Change-Id: Iccfd8dc3fffa7a33e73b184b72e0dfd5d26bc9c9
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agofdts: enable virtio-rng component for morello fvp platform
Jagadeesh Ujja [Wed, 7 Oct 2020 08:09:55 +0000 (13:39 +0530)]
fdts: enable virtio-rng component for morello fvp platform

enable virtio-rng component for morello fvp platform

Change-Id: I89b950f067a4d14dfa418de3859c88c8f91cf7c5
Signed-off-by: Jagadeesh Ujja <jagadeesh.ujja@arm.com>
5 years agodrivers: stm32_fmc2_nand: fix incorrect error detection
Lionel Debieve [Mon, 5 Oct 2020 12:24:04 +0000 (14:24 +0200)]
drivers: stm32_fmc2_nand: fix incorrect error detection

Clear interrupt flag register after each sector read to avoid
issue when checking the register status.
Without clearing the interrupt, the status read doesn't wait
properly the ready bit.

Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Change-Id: If290e3f165b986f0e736bb1b5e4d3dad4b749d74

5 years agoWorkaround for Cortex A77 erratum 1925769
johpow01 [Thu, 10 Sep 2020 18:39:26 +0000 (13:39 -0500)]
Workaround for Cortex A77 erratum 1925769

Cortex A77 erratum 1925769 is a Cat B erratum, present in older
revisions of the Cortex A77 processor core.  The workaround is to
set bit 8 in the ECTLR_EL1 register, there is a small performance cost
(<0.5%) for setting this bit.

SDEN can be found here:
https://documentation-service.arm.com/static/5f7c35d0d3be967f7be46d33

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

5 years agoMerge "fdt: Fix coverity complaint about 32-bit multiplication" into integration
Madhukar Pappireddy [Wed, 7 Oct 2020 14:28:11 +0000 (14:28 +0000)]
Merge "fdt: Fix coverity complaint about 32-bit multiplication" into integration

5 years agofdt: Fix coverity complaint about 32-bit multiplication
Andre Przywara [Wed, 7 Oct 2020 10:09:42 +0000 (11:09 +0100)]
fdt: Fix coverity complaint about 32-bit multiplication

Coverity raised an eyebrow over our GICR frame size calculation:
========
    CID 362942:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
Potentially overflowing expression "nr_cores * gicr_frame_size" with type
"unsigned int" (32 bits, unsigned) is evaluated using 32-bit arithmetic,
and then used in a context that expects an expression of type "uint64_t"
(64 bits, unsigned).
========

Even with a GICv4 (256KB frame size) we need 16384 cores to overflow
32-bit, so it's not a practical issue.

But it's also easy to fix, so let's just do that: cast gicr_frame_size
to an unsigned 64-bit integer, so that the multiplication is done in the
64-bit realm.

Change-Id: Iad10e19b9e58d5fbf9d13205fbcef0aac5ae48af
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agoMerge changes from topics "rename-herculesae-a78ae", "rename-zeus-v1" into integration
Madhukar Pappireddy [Tue, 6 Oct 2020 23:35:55 +0000 (23:35 +0000)]
Merge changes from topics "rename-herculesae-a78ae", "rename-zeus-v1" into integration

* changes:
  Rename Neoverse Zeus to Neoverse V1
  Rename Cortex Hercules AE to Cortex 78 AE

5 years agoMerge "plat/arm: common: add guard for arm_get_rotpk_info_regs" into integration
Madhukar Pappireddy [Tue, 6 Oct 2020 16:09:00 +0000 (16:09 +0000)]
Merge "plat/arm: common: add guard for arm_get_rotpk_info_regs" into integration

5 years agoMerge "doc: Update list of supported FVP platforms" into integration
Madhukar Pappireddy [Tue, 6 Oct 2020 16:07:57 +0000 (16:07 +0000)]
Merge "doc: Update list of supported FVP platforms" into integration

5 years agoplat/arm: common: add guard for arm_get_rotpk_info_regs
Usama Arif [Mon, 5 Oct 2020 09:18:52 +0000 (10:18 +0100)]
plat/arm: common: add guard for arm_get_rotpk_info_regs

Only define arm_get_rotpk_info_regs if ROTPK is in registers,
i.e. (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_REGS_ID). This will
allow platform build without definition of TZ_PUB_KEY_HASH_BASE
if dedicated registers for ROTPK are not available on the platform.

Change-Id: I74ee2d5007f5d876a031a1efca20ebee2dede0c7
Signed-off-by: Usama Arif <usama.arif@arm.com>
5 years agoMerge changes I959d1343,I6992df1a,I687e35cb,Ia5f2ee31,Ifd0bc6aa, ... into integration
Manish Pandey [Tue, 6 Oct 2020 08:42:53 +0000 (08:42 +0000)]
Merge changes I959d1343,I6992df1a,I687e35cb,Ia5f2ee31,Ifd0bc6aa, ... into integration

* changes:
  docs: marvell: update mv_ddr branch
  plat: marvell: armada: a3k: rename the UART images archive
  plat: marvell: armada: a3k: allow image load to RAM address 0
  marvell: comphy: cp110: add support for USB comphy polarity invert
  marvell: comphy: cp110: add support for SATA comphy polarity invert
  marvell: comphy: cp110: implement erratum IPCE_COMPHY-1353
  drivers: marvell: mochi: Update AP incoming masters secure level
  plat: marvell: armada: add ccu window for workaround errata-id 3033912
  plat: marvell: ap806: implement workaround for errata-id FE-4265711

5 years agoMerge "Workaround for Cortex A76 erratum 1868343" into integration
Madhukar Pappireddy [Mon, 5 Oct 2020 22:49:10 +0000 (22:49 +0000)]
Merge "Workaround for Cortex A76 erratum 1868343" into integration

5 years agoRename Neoverse Zeus to Neoverse V1
Jimmy Brisson [Wed, 30 Sep 2020 20:28:03 +0000 (15:28 -0500)]
Rename Neoverse Zeus to Neoverse V1

Change-Id: Ieb411e2f8092fa82062e619305b680673a8f184f
Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
5 years agoRename Cortex Hercules AE to Cortex 78 AE
Jimmy Brisson [Wed, 30 Sep 2020 20:34:51 +0000 (15:34 -0500)]
Rename Cortex Hercules AE to Cortex 78 AE

Change-Id: Ic0ca51a855660509264ff0d084c068e1421ad09a
Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
5 years agodocs: code review guidelines
Sandrine Bailleux [Mon, 17 Aug 2020 06:52:33 +0000 (08:52 +0200)]
docs: code review guidelines

Document the code review process in TF-A.
Specifically:

 * Give an overview of code review and best practices.
 * Give guidelines for the participants in code review.
 * Outline responsibilities of each type of participant.
 * Explain the Gerrit labels used in the review process.

Change-Id: I519ca4b2859601a7b897706e310f149a0c92e390
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Signed-off-by: David Horstmann <david.horstmann@arm.com>
5 years agobl32: add an assert on BL32_SIZE in sp_min.ld.S
Yann Gautier [Mon, 5 Oct 2020 09:39:19 +0000 (11:39 +0200)]
bl32: add an assert on BL32_SIZE in sp_min.ld.S

This assert is present in all other linker scripts. This checks the
size of BL32 doesn't exceed its defined limit.

Change-Id: I0005959b5591d3eebd870045adafe437108bc9e1
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agobl32: use SORT_BY_ALIGNMENT macro in sp_min.ld.S
Yann Gautier [Mon, 5 Oct 2020 07:54:09 +0000 (09:54 +0200)]
bl32: use SORT_BY_ALIGNMENT macro in sp_min.ld.S

The macro SORT_BY_ALIGNMENT is used for .text* and .rodata*. This allows
reducing the space lost to object alignment. This is an alignment with
the following patch:
ebd6efae67c6a086bc97d807a638bde324d936dc

Some comments are also aligned with other linker scripts.

Change-Id: I2ea59edb445af0ed8c08fd883ffbf56852570d0c
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agoMerge "doc: stm32mp1: Improve OP-TEE related documentation" into integration
Madhukar Pappireddy [Sun, 4 Oct 2020 16:12:35 +0000 (16:12 +0000)]
Merge "doc: stm32mp1: Improve OP-TEE related documentation" into integration

5 years agodocs: marvell: update mv_ddr branch
Marcin Wojtas [Sun, 4 Oct 2020 14:00:07 +0000 (16:00 +0200)]
docs: marvell: update mv_ddr branch

Now that the BLE image sources (mv_ddr) are updated, reflect
the proper branch in the Armada build howto.

Change-Id: I959d1343d0dfdd681c7e39bdcaed9b36aaddfca1
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
5 years agoplat: marvell: armada: a3k: rename the UART images archive
Konstantin Porotchkin [Thu, 24 Oct 2019 07:48:08 +0000 (10:48 +0300)]
plat: marvell: armada: a3k: rename the UART images archive

Add *.bin extension to UART recovery images archive name.
Such naming will cause the UART recovery images to be copied to the
Buildroot output folder upon flash image build.

Change-Id: I6992df1ab2ded725bed58e5baf245ae92c4cb289
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
5 years agoplat: marvell: armada: a3k: allow image load to RAM address 0
Konstantin Porotchkin [Tue, 27 Aug 2019 13:21:10 +0000 (16:21 +0300)]
plat: marvell: armada: a3k: allow image load to RAM address 0

Marvell uses RAM address 0x0 for loading BL33 stage images.
When ATF is built with DEBUG=1, its IO subsystem fails on
assert checking the destination RAM address != 0.
This patch adds PLAT_ALLOW_ZERO_ADDR_COPY to A3K platform
allowing to bypass the above check in debug mode.

Change-Id: I687e35cb2e9dc3166bdaa81b3904c20b784c5c6a
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
5 years agomarvell: comphy: cp110: add support for USB comphy polarity invert
Grzegorz Jaszczyk [Tue, 21 Jan 2020 16:02:29 +0000 (17:02 +0100)]
marvell: comphy: cp110: add support for USB comphy polarity invert

The polarity inversion for USB was not tested due to lack of hw design
which requires it. Currently all supported boards doesn't require USB
phy polarity inversion, therefore COMPHY_POLARITY_NO_INVERT is set for
all boards. Enable the option for the ones that need it.

Change-Id: Ia5f2ee313a93962e94963e2dd8a759ef6d9da369
Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
5 years agomarvell: comphy: cp110: add support for SATA comphy polarity invert
Grzegorz Jaszczyk [Tue, 21 Jan 2020 16:02:10 +0000 (17:02 +0100)]
marvell: comphy: cp110: add support for SATA comphy polarity invert

The cp110 comphy has ability to invert RX and/or TX polarity. Polarity
depends on board design. Currently all supported boards doesn't require
SATA phy polarity invert, therefore COMPHY_POLARITY_NO_INVERT is set for
all boards.

Change-Id: Ifd0bc6aaf8a76a0928132b197422f3193cf020d5
Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
5 years agomarvell: comphy: cp110: implement erratum IPCE_COMPHY-1353
Marcin Wojtas [Mon, 9 Sep 2019 01:38:18 +0000 (03:38 +0200)]
marvell: comphy: cp110: implement erratum IPCE_COMPHY-1353

According to erratum IPCE_COMPHY-1353 the TX_IDLE bit should
be toggled in addition to the XFI/SFI PHY reset.

Change-Id: Idd2c2abfcb2f960caa01e6d69db524c2e4734f50
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
5 years agodrivers: marvell: mochi: Update AP incoming masters secure level
Konstantin Porotchkin [Thu, 22 Aug 2019 11:23:34 +0000 (14:23 +0300)]
drivers: marvell: mochi: Update AP incoming masters secure level

Do not force non-secure access level for PIDI masters when LLC_SRAM
is enabled. The EIP197 is located on CP0 and need to access secure
SRAM in AP LLC. This requires EIP197 DMA to have AXPROT[1]=0 and not
changed when forwarded to address decoding tables.

Change-Id: I8962db94a124350c14220ba6d0364d294ae4664a
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
5 years agoplat: marvell: armada: add ccu window for workaround errata-id 3033912
Alex Leibovich [Wed, 25 Dec 2019 07:11:38 +0000 (09:11 +0200)]
plat: marvell: armada: add ccu window for workaround errata-id 3033912

Added ccu window to allow access to addresses
in the range [0xf100_0000, 0xf1ff_ffff].

Change-Id: I63ee68338d674114d01cd627198dc907653493e8
Signed-off-by: Alex Leibovich <alexl@marvell.com>
5 years agoplat: marvell: ap806: implement workaround for errata-id FE-4265711
Stefan Chulski [Mon, 24 Jun 2019 16:13:38 +0000 (19:13 +0300)]
plat: marvell: ap806: implement workaround for errata-id FE-4265711

ERRATA ID: FE-4265711 - Incorrect CNTVAL reading

CNTVAL reflects the global system counter value in binary format.
Due to this erratum, the CNTVAL value presented to the processor
may be incorrect for several clock cycles.

Workaround: Override the default value of AP Register Device General
control 20 [19:16] and AP Register Device General Control 21 [11:8]
to the value of 0x3.

Change-Id: I1705608d08acd9631ab98d6f7ceada34d6b8336f
Signed-off-by: Stefan Chulski <stefanc@marvell.com>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
5 years agoMerge "libfdt: Upgrade libfdt source files" into integration
Alexei Fedorov [Sat, 3 Oct 2020 13:43:13 +0000 (13:43 +0000)]
Merge "libfdt: Upgrade libfdt source files" into integration

5 years agoMerge "spmd: Fix signedness comparison warning" into integration
Alexei Fedorov [Sat, 3 Oct 2020 12:59:49 +0000 (12:59 +0000)]
Merge "spmd: Fix signedness comparison warning" into integration

5 years agoWorkaround for Cortex A76 erratum 1868343
johpow01 [Tue, 29 Sep 2020 22:19:09 +0000 (17:19 -0500)]
Workaround for Cortex A76 erratum 1868343

Cortex A76 erratum 1868343 is a Cat B erratum, present in older
revisions of the Cortex A76 processor core.  The workaround is to
set a bit in the CPUACTLR_EL1 system register, which delays instruction
fetch after branch misprediction. This workaround will have a small
impact on performance.

This workaround is the same as workarounds for errata 1262606 and
1275112, so all 3 have been combined into one function call.

SDEN can be found here:
https://documentation-service.arm.com/static/5f2bed6d60a93e65927bc8e7

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

5 years agoMerge "morello: Add Morello platform documentation" into integration
Madhukar Pappireddy [Fri, 2 Oct 2020 22:58:27 +0000 (22:58 +0000)]
Merge "morello: Add Morello platform documentation" into integration

5 years agoMerge "fdts: stm32mp1: realign device tree with kernel" into integration
Madhukar Pappireddy [Fri, 2 Oct 2020 15:07:26 +0000 (15:07 +0000)]
Merge "fdts: stm32mp1: realign device tree with kernel" into integration

5 years agolibfdt: Upgrade libfdt source files
Andre Przywara [Thu, 1 Oct 2020 21:41:48 +0000 (22:41 +0100)]
libfdt: Upgrade libfdt source files

Update the libfdt source files, the upstream commit is 73e0f143b73d
("libfdt: fdt_strerror(): Fix comparison warning").

This brings us the fixes for the signed/unsigned comparison warnings,
so platforms can enable -Wsign-compare now.

Change-Id: I303d891c82ffea0acefdde27289339db5ac5a289
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agospmd: Fix signedness comparison warning
Andre Przywara [Fri, 2 Oct 2020 10:54:56 +0000 (11:54 +0100)]
spmd: Fix signedness comparison warning

With -Wsign-compare, compilers issue a warning in the SPMD code:
====================
services/std_svc/spmd/spmd_pm.c:35:22: error: comparison of integer
expressions of different signedness: 'int' and 'unsigned int'
[-Werror=sign-compare]
   35 |  if ((id < 0) || (id >= PLATFORM_CORE_COUNT)) {
      |                      ^~
cc1: all warnings being treated as errors
====================

Since we just established that "id" is positive, we can safely cast it
to an unsigned type to make the comparison have matching types.

Change-Id: I6ef24804c88136d7e3f15de008e4fea854f10ffe
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agoMerge "morello: Add changes to fix build of Morello Platform" into integration
Alexei Fedorov [Fri, 2 Oct 2020 11:56:02 +0000 (11:56 +0000)]
Merge "morello: Add changes to fix build of Morello Platform" into integration

5 years agomorello: Add Morello platform documentation
Chandni Cherukuri [Thu, 1 Oct 2020 07:40:45 +0000 (13:10 +0530)]
morello: Add Morello platform documentation

Morello platform has a SCP which brings the primary Rainier CPU
out of reset which starts executing at BL31.

This patch provides documentation support for Morello platform.

Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
Change-Id: I38f596668e2b14862d543fabc04549ff34bfb8a2

5 years agodoc: Update list of supported FVP platforms
Manish V Badarkhe [Fri, 2 Oct 2020 06:27:27 +0000 (07:27 +0100)]
doc: Update list of supported FVP platforms

Updated the list of supported FVP platform as per latest
FVP platform release.

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

5 years agodoc: stm32mp1: Improve OP-TEE related documentation
Jan Kiszka [Fri, 2 Oct 2020 08:07:00 +0000 (10:07 +0200)]
doc: stm32mp1: Improve OP-TEE related documentation

stm32mp15_optee_defconfig has been dropped from U-Boot as it became
identical to stm32mp15_trusted_defconfig.

Furthermore give a hint how OP-TEE is supposed to be installed.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Change-Id: Id8f0bd84a87e3a62072dd4405aadddcdd3511213

5 years agomorello: Add changes to fix build of Morello Platform
Chandni Cherukuri [Thu, 1 Oct 2020 04:41:44 +0000 (10:11 +0530)]
morello: Add changes to fix build of Morello Platform

This patch makes changes required to get the morello
platform working with the tip of TF-A.

Change-Id: I095006615c9959bba49fcc75b52e1de7d7486309
Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
5 years agoMerge "Measured Boot Driver: Fix MISRA-C 2012 defects" into integration
Madhukar Pappireddy [Thu, 1 Oct 2020 18:18:32 +0000 (18:18 +0000)]
Merge "Measured Boot Driver: Fix MISRA-C 2012 defects" into integration

5 years agoMerge "Crypto library: Migrate support to MbedTLS v2.24.0" into integration
Olivier Deprez [Thu, 1 Oct 2020 13:21:14 +0000 (13:21 +0000)]
Merge "Crypto library: Migrate support to MbedTLS v2.24.0" into integration

5 years agoCrypto library: Migrate support to MbedTLS v2.24.0
Alexei Fedorov [Mon, 21 Sep 2020 11:23:54 +0000 (12:23 +0100)]
Crypto library: Migrate support to MbedTLS v2.24.0

This patch migrates the mbedcrypto dependency for TF-A
to mbedTLS repo v2.24.0 which is the latest release tag.
The relevant documentation is updated to reflect the
use of new version.

Change-Id: I116f44242e8c98e856416ea871d11abd3234dac1
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoMerge changes from topic "stm32_exceptions" into integration
Manish Pandey [Wed, 30 Sep 2020 07:58:44 +0000 (07:58 +0000)]
Merge changes from topic "stm32_exceptions" into integration

* changes:
  stm32mp1: correct crash console GPIO alternate configuration
  stm32mp1: add plat_panic_handler function
  stm32mp1: update plat_report_exception
  Align AARCH32 version of debug.S with AARCH64

5 years agoMerge changes from topic "fpga_generic" into integration
André Przywara [Wed, 30 Sep 2020 00:13:29 +0000 (00:13 +0000)]
Merge changes from topic "fpga_generic" into integration

* changes:
  arm_fpga: Add platform documentation
  arm_fpga: Add post-build linker script
  arm_fpga: Add ROM trampoline
  arm_fpga: Add devicetree file
  arm_fpga: Remove SPE PMU DT node if SPE is not available
  arm_fpga: Adjust GICR size in DT to match number of cores
  fdt: Add function to adjust GICv3 redistributor size
  drivers: arm: gicv3: Allow detecting number of cores

5 years agoMerge "Workaround for Cortex A77 erratum 1508412" into integration
Madhukar Pappireddy [Tue, 29 Sep 2020 18:43:00 +0000 (18:43 +0000)]
Merge "Workaround for Cortex A77 erratum 1508412" into integration

5 years agoarm_fpga: Add platform documentation
Andre Przywara [Thu, 27 Aug 2020 11:13:30 +0000 (12:13 +0100)]
arm_fpga: Add platform documentation

As the Arm Ltd. FPGA port is now working for all existing images, add
some documentation file.

Change-Id: I9e2c532ed15bbc121bb54b3dfc1bdfee8f1443a6
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agoarm_fpga: Add post-build linker script
Andre Przywara [Wed, 16 Sep 2020 16:13:33 +0000 (17:13 +0100)]
arm_fpga: Add post-build linker script

For the Arm Ltd. FPGAs to run, we need to load several payloads into the
FPGA's memory:
- Some trampoline code at address 0x0, to jump to BL31's entry point.
- The actual BL31 binary at the beginning of DRAM.
- The (generic) DTB image to describe the hardware.
- The actual non-secure payloads (kernel, ramdisks, ...)

The latter is application specific, but the first three blobs are rather
generic.
Since the uploader tool supports ELF binaries, it seems helpful to
combine these three images into one .axf file, as this also simplifies
the command line.

Add a post-build linker script, that combines those three bits into one
ELF file, together with their specific load addresses.
Include a call to "ld" with this linker script in the platform Makefile,
so it will be build automatically. The result will be called "bl31.axf".

Change-Id: I4a90da16fa1e0e83b51d19e5b1daf61f5a0bbfca
Signed-off-by: Andre Przywara <andre.przywara@arm.com>