Commit Graph

8048 Commits

Author SHA1 Message Date
Arunachalam Ganapathy d32113c7f3 plat: arm: Make BL32_BASE platform dependent when SPD_spmd is enabled
To support platforms without Trusted DRAM this patch defines
PLAT_ARM_SPMC_BASE and enables platform to use either Trusted DRAM or
DRAM region behind TZC.

Change-Id: Icaa5c7d33334258ff27e8e0bfd0812c304e68ae4
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
2020-10-20 20:06:59 +00:00
Arunachalam Ganapathy c398caf509 plat: tc0: Disable SPE
Statistical Profiling Extension is not supported by Matterhorn core

Change-Id: Iec652f1c6d6b6a9bf118ba682276a7c70a6abc0d
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
2020-10-20 20:06:54 +00:00
Arunachalam Ganapathy 2b036b7995 lib: el3_runtime: Fix SPE system registers in el2_sysregs_context
Include EL2 registers related to SPE in EL2 context save/restore
routines if architecture supports it and platform wants to use these
features in Secure world.

Change-Id: Ie01a2c38fa5f6c907276eddec120fdfb222561a6
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
2020-10-20 20:06:48 +00:00
Arunachalam Ganapathy 062f8aaf8a lib: el3_runtime: Conditionally save/restore EL2 NEVE registers
Include EL2 registers related to Nested Virtualization in EL2 context
save/restore routines if architecture supports it and platform wants to
use these features in Secure world.

Change-Id: If006ab83bbc2576488686f5ffdff88b91adced5c
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
2020-10-20 20:06:43 +00:00
Arunachalam Ganapathy 0f777eabd9 lib: el3_runtime: Fix aarch32 system registers in el2_sysregs_context
AArch64-only platforms do not implement AArch32 at EL1 and higher ELs.
In such cases the build option CTX_INCLUDE_AARCH32_REGS is set to 0.
So don't save/restore aarch32 system registers in el2_sysregs_context
save/restore routines if CTX_INCLUDE_AARCH32_REGS is set to 0.

Change-Id: I229cdd46136c4b4bc9623b02eb444d904e09ce5a
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
2020-10-20 20:06:36 +00:00
Alexei Fedorov 32269499cc Merge "fdts: add missing hash node in STM32MP157C-ED1 board DT" into integration 2020-10-19 12:08:21 +00:00
Joanna Farley 943aff0c16 Merge "Increase type widths to satisfy width requirements" into integration 2020-10-18 14:51:00 +00:00
Madhukar Pappireddy 4a6b33ec17 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
2020-10-16 22:00:04 +00:00
Mark Dykes 29736030f3 Merge "docs: Remove deprecated information" into integration 2020-10-16 20:35:29 +00:00
Mark Dykes 2cad7dfb76 Merge "docs: Update Release information for v2.5" into integration 2020-10-16 20:34:32 +00:00
Mark Dykes 1fa9b27179 Merge "docs: Update code freeze and release target date for v2.4" into integration 2020-10-16 20:33:24 +00:00
Manish V Badarkhe 3bd19575e8 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>
2020-10-16 15:10:09 +00:00
Manish V Badarkhe c20bbfa16d 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>
2020-10-16 15:09:56 +00:00
Manish V Badarkhe f329442c39 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>
2020-10-16 15:09:32 +00:00
Manish Pandey 3bddca4b3e 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
2020-10-15 21:12:49 +00:00
Saurabh Gorecha 4b918452bd 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>
2020-10-16 02:23:35 +05:30
Saurabh Gorecha e0caf8f57c Update in coreboot_get_memory_type API to include size as well
Change-Id: I3f563cffd58b0591b433c85c0ff6b71e486eb2c8
Signed-off-by: Saurabh Gorecha <sgorecha@codeaurora.org>
2020-10-16 02:23:35 +05:30
Mark Dykes dfe577a817 Merge "Don't return error information from console_flush" into integration 2020-10-14 18:59:27 +00:00
Alexei Fedorov 5dfe680fa8 Merge "stm32mp1: use %u in NOTICE message for board info" into integration 2020-10-14 16:55:05 +00:00
Yann Gautier b37b52ef8b 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>
2020-10-13 18:05:23 +02:00
Yann Gautier ab049ec07a 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>
2020-10-13 18:05:23 +02:00
Madhukar Pappireddy 80d9cf7808 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
2020-10-13 15:46:35 +00:00
Alexei Fedorov 113e8fdab4 Merge "stm32mp1: add asserts in get_cpu_package() and get_part_number()" into integration 2020-10-13 14:42:55 +00:00
Alexei Fedorov 5d51036c80 Merge "stm32mp1: add support for new SoC profiles" into integration 2020-10-13 14:42:26 +00:00
Alexei Fedorov 0e935f00ef Merge "stm32mp1: support of STM32MP15x Rev.Z" into integration 2020-10-13 14:42:09 +00:00
Manish Pandey cb57306fa3 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
2020-10-13 12:11:04 +00:00
Yann Gautier 6354401276 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>
2020-10-13 11:29:19 +02:00
Nicolas Le Bayon d75a340977 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>
2020-10-13 11:27:40 +02:00
Lionel Debieve 8ccf4954bf 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>
2020-10-13 11:27:40 +02:00
Lionel Debieve ffb3f27713 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>
2020-10-13 11:27:40 +02:00
Yann Gautier ade9ce03b8 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
2020-10-13 11:27:40 +02:00
Patrick Delaunay f964f5c363 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>
2020-10-13 11:27:40 +02:00
Madhukar Pappireddy cc392dd858 Merge "Fix casting bug in gicv2_main.c" into integration 2020-10-12 18:20:53 +00:00
Jimmy Brisson d7b5f40823 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>
2020-10-12 10:55:03 -05:00
Manish Pandey e180cdbac1 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
2020-10-12 14:12:59 +00:00
Lionel Debieve 495885bce6 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
2020-10-12 14:46:31 +02:00
Christophe Kerello 0c3e8acbd6 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>
2020-10-12 14:46:07 +02:00
Manish Pandey 81cf819a97 Merge "intel: platform: Include GICv2 makefile" into integration 2020-10-12 11:14:06 +00:00
Manish V Badarkhe acbe35e0f8 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>
2020-10-12 10:40:32 +00:00
Manish V Badarkhe 0e16177ea2 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>
2020-10-12 10:40:27 +00:00
Manish V Badarkhe c959ea78e5 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>
2020-10-12 10:40:22 +00:00
Manish Pandey e1b8cd1a58 Merge "TF-A: Add HASH_ALG default value to defaults.mk" into integration 2020-10-12 10:36:53 +00:00
Manish Pandey 7ad39818b1 Merge "mediatek: mt8192: add GIC600 support" into integration 2020-10-12 09:16:21 +00:00
Alexei Fedorov ae3cf1ff31 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>
2020-10-12 07:52:12 +00:00
johpow01 20d384978b 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
2020-10-10 07:14:44 +00:00
Lauren Wehrmeister 7d3a7ec704 Merge "Workaround for Cortex A77 erratum 1925769" into integration 2020-10-09 19:17:23 +00:00
Jimmy Brisson 831b0e9824 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>
2020-10-09 10:21:50 -05:00
Manish Pandey f224d3c916 Merge "drivers: stm32_fmc2_nand: fix incorrect error detection" into integration 2020-10-09 14:50:34 +00:00
Manish Pandey 210ac186ad Merge changes I99a5d96f,I89b950f0 into integration
* changes:
  lib/cpus: update MIDR value for rainier cpu
  fdts: enable virtio-rng component for morello fvp platform
2020-10-09 11:09:19 +00:00
Jagadeesh Ujja 3e0a861e3c 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>
2020-10-09 10:43:13 +00:00