Commit Graph

9260 Commits

Author SHA1 Message Date
Etienne Carriere b84a850864 feat(lib/optee): introduce optee_header_is_valid()
This new function optee_header_is_valid() allows platform to know
whether OP-TEE OS is loaded from multi-image (using OP-TEE header
image as BL32_IMAGE_ID) or from a single OP-TEE binary image.
The function tee_validate_header() is reworked to return a boolean,
and is now silent.

Change-Id: Idc7dde091f2ada8898f40d02e68c3834ca39d8e8
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
2021-09-06 13:21:54 +02:00
Madhukar Pappireddy f465cc1659 Merge "feat(board/rdn2): add tzc master source ids for soc dma" into integration 2021-09-04 01:10:55 +02:00
Madhukar Pappireddy ef03e78f42 Merge changes from topic "erratas" into integration
* changes:
  errata: workaround for Neoverse N2 erratum 2138956
  errata: workaround for Neoverse N2 erratum 2189731
  errata: workaround for Cortex-A710 erratum 2017096
  errata: workaround for Cortex-A710 erratum 2055002
2021-09-03 23:58:01 +02:00
Bipin Ravi 1cafb08deb errata: workaround for Neoverse N2 erratum 2138956
Neoverse N2 erratum 2138956 is a Cat B erratum that applies to
revision r0p0 and is still open. This erratum can be avoided by
inserting a sequence of 16 DMB ST instructions prior to WFI or WFE.

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

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: I1aac87b3075992f875451e4767b21857f596d0b2
2021-09-03 15:44:56 -05:00
Bipin Ravi 7cfae93227 errata: workaround for Neoverse N2 erratum 2189731
Neoverse N2 erratum 2189731 is a Cat B erratum that applies to
revision r0p0 and is still open. The workaround is to set
CPUACTLR5_EL1[44] to 1 which will cause the CPP instruction to
invalidate the hardware prefetcher state trained from any EL.

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

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: Iddc6a59adf9fa3cab560c46f2133e1f5a8b3ad03
2021-09-03 15:44:56 -05:00
Bipin Ravi afc2ed63f9 errata: workaround for Cortex-A710 erratum 2017096
Cortex-A710 erratum 2017096 is a Cat B erratum that applies to
revisions r0p0, r1p0 & r2p0 and is still open. The workaround is to
set CPUECLTR_EL1[8] to 1 which disables store issue prefetching.

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

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: If5f61ec30dbc2fab7f2c68663996057086e374e3
2021-09-03 15:44:56 -05:00
Bipin Ravi 213afde907 errata: workaround for Cortex-A710 erratum 2055002
Cortex-A710 erratum 2055002 is a Cat B erratum that applies to
revisions r1p0 & r2p0 and is still open. The workaround is to
set CPUACTLR_EL1[46] to force L2 tag ECC inline correction mode.
This workaround works on revision r1p0 & r2p0.

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

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: I67be1dce53c4651167d8cee33c116e73b9dafe81
2021-09-03 15:44:47 -05:00
Madhukar Pappireddy b7942a91b8 Merge changes from topic "erratas" into integration
* changes:
  errata: workaround for Neoverse N2 erratum 2025414
  errata: workaround for Neoverse N2 erratum 2067956
2021-09-03 21:31:00 +02:00
Madhukar Pappireddy 81de40f23b Merge changes I3c20611a,Ib1671011,I5eab3f33,Ib149b3ea into integration
* changes:
  refactor(plat/nxp): refine api to read SVR register
  refactor(plat/nxp): each errata use a seperate source file
  refactor(plat/nxp): use a unified errata api
  refactor(plat/soc-lx2160): move errata to common directory
2021-09-03 15:17:08 +02:00
Madhukar Pappireddy 9dc2534fd7 Merge "errata: workaround for Cortex-A78 errata 1952683" into integration 2021-09-02 22:20:54 +02:00
Bipin Ravi 4618b2bfa7 errata: workaround for Neoverse N2 erratum 2025414
Neoverse N2 erratum 2025414 is a Cat B erratum that applies to
revision r0p0 and is still open. The workaround is to set
CPUECLTR_EL1[8] to 1 which disables store issue prefetching.

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

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: Ia1c63fb93a1bdb1c3f4cf019a197b2a59233885a
2021-09-02 11:00:13 -05:00
Bipin Ravi 65e04f27d4 errata: workaround for Neoverse N2 erratum 2067956
Neoverse N2 erratum 2067956 is a Cat B erratum that applies to
revision r0p0 and is still open. The workaround is to set
CPUACTLR_EL1[46] to force L2 tag ECC inline correction mode.
This workaround works on revision r0p0.

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

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: Ie92d18a379c66675b5c1c50fd0b8dde130848b21
2021-09-02 10:52:50 -05:00
Madhukar Pappireddy 3c9962a1c0 Merge "errata: workaround for Neoverse-N2 errata 2002655" into integration 2021-08-31 00:14:24 +02:00
Madhukar Pappireddy 523569d09d Merge changes I1e8c2bc3,I9bcff306 into integration
* changes:
  errata: workaround for Cortex-A710 errata 2081180
  errata: workaround for Cortex-A710 errata 1987031
2021-08-31 00:02:49 +02:00
nayanpatel-arm 9380f75418 errata: workaround for Neoverse-N2 errata 2002655
Neoverse-N2 erratum 2002655 is a Cat B erratum present in r0p0 of
the Neoverse-N2 processor core, and it is still open.

Neoverse-N2 SDEN: https://documentation-service.arm.com/static/61098b4e3d73a34b640e32c9?token=

Signed-off-by: nayanpatel-arm <nayankumar.patel@arm.com>
Change-Id: I1380418146807527abd97cdd4918265949ba5c01
2021-08-30 22:31:55 +02:00
Madhukar Pappireddy cb9ddac9fe Merge "docs(plat/marvell/a8k): document MSS_SUPPORT and SCP_BL2 build options" into integration 2021-08-26 23:07:13 +02:00
Manish Pandey 296affb793 Merge changes I75a4554a,Idce603e4 into integration
* changes:
  feat(plat/marvell): introduce t9130_cex7_eval
  feat(plat/marvell/a8k): allow overriding default paths
2021-08-26 18:05:06 +02:00
Varun Wadekar d0464435f6 Merge "feat(cpus): workaround for Cortex A78 AE erratum 1941500" into integration 2021-08-26 12:18:59 +02:00
Jiafei Pan 08695df91d refactor(plat/nxp): refine api to read SVR register
1. Refined struct soc_info_t definition.
2. Refined get_soc_info function.
3. Fixed some SVR persernality value.
4. Refined API to get cluster numbers and cores per cluster.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I3c20611a523516cc63330dce4c925e6cda1e93c4
2021-08-26 10:08:57 +08:00
Marcin Wojtas d01139f3b5 feat(plat/marvell): introduce t9130_cex7_eval
This patch adds the necessary files to support
the SolidRun CN913X CEx7 Evaluation Board.

Because the DRAM connectivity and SerDes settings
is shared with the CN913X DB - reuse relevant
board-specific files.

Change-Id: I75a4554a4373953ca3fdf3b04c4a29c2c4f8ea80
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
2021-08-26 04:08:50 +02:00
Marcin Wojtas 0b702afc3a feat(plat/marvell/a8k): allow overriding default paths
The common makefile used by every a8k/cn913x platform
(a8k_common.mk) assumed default paths in PLAT_INCLUDES,
BLE/BL31_PORTING_SOURCES. Allow overriding those
variables, in order to avoid code duplication.

It can be helpful in case using multiple board variants
or sharing common settings between different platforms.

Change-Id: Idce603e44ed04d99fb1e3e11a2bb395d552e2bf7
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
2021-08-26 04:07:11 +02:00
nayanpatel-arm a64bcc2b45 errata: workaround for Cortex-A710 errata 2081180
Cortex-A710 erratum 2081180 is a Cat B erratum present in r0p0, r1p0,
and r2p0 of the Cortex-A710 processor core, and it is still open.

A710 SDEN: https://developer.arm.com/documentation/SDEN1775101/1000

Signed-off-by: nayanpatel-arm <nayankumar.patel@arm.com>
Change-Id: I1e8c2bc3d8dc326947ccfd91daf9083d666b2542
2021-08-25 17:35:15 -07:00
André Przywara abd63ed0c5 Merge changes from topic "allwinner-r329" into integration
* changes:
  feat(plat/allwinner): add R329 support
  refactor(plat/allwinner): allow custom BL31 offset
  refactor(plat/allwinner): allow new AA64nAA32 position
  fix(plat/allwinner): delay after enabling CPU power
2021-08-25 10:49:42 +02:00
Joanna Farley 6657c1e3cc Merge "cpu: add support for Demeter CPU" into integration 2021-08-25 10:30:29 +02:00
Jiafei Pan 1ca7229529 refactor(plat/nxp): each errata use a seperate source file
Don't mix erratas together in one file.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: Ib1671011b91a41b0653210e4706d62b7e946c642
2021-08-25 09:53:20 +08:00
Jiafei Pan 9616db154b refactor(plat/nxp): use a unified errata api
Use a unfied API soc_errata() for each platforms,
add print a INFO message for each enabled errata,
so that it will be easy to check which errata is
enabled on current platform.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I5eab3f338db6b46c57cbad475819043fc60ca6d3
2021-08-25 09:53:20 +08:00
Jiafei Pan 64cadc1637 refactor(plat/soc-lx2160): move errata to common directory
Will add more Erratas, some errata can be used for multiple
platforms, so move errata to be common code which can
be share between different platforms.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: Ib149b3eac365bdb593331e9f38f0b89d92c9c0d1
2021-08-25 09:53:20 +08:00
Icenowy Zheng 13bacd3bc3 feat(plat/allwinner): add R329 support
Allwinner R329 is a new dual-core Corte-A53 SoC. Add basical TF-A
support for it, to provide a PSCI implementation containing CPU
boot/shutdown and SoC reset.

Change-Id: I0fa37ee9b4a8e0e1137bf7cf7d614b6ca9624bfe
Signed-off-by: Icenowy Zheng <icenowy@sipeed.com>
2021-08-25 02:11:59 +08:00
Icenowy Zheng f04dfbb297 refactor(plat/allwinner): allow custom BL31 offset
Not all Allwinner SoCs have the same arrangement to SRAM A2.

Allow to specify a offset at which BL31 will stay in SRAM A2.

Change-Id: I574140ffd704a796fae0a5c2d0976e85c7fcbdf9
Signed-off-by: Icenowy Zheng <icenowy@sipeed.com>
2021-08-25 00:35:24 +08:00
Icenowy Zheng 080939f924 refactor(plat/allwinner): allow new AA64nAA32 position
In newer Allwiner SoCs, the AA64nAA32 wires are mapped to a new register
called "General Control Register0" in the manual rather than the
"Cluster 0 Control Register0" in older SoCs.

Now the position of AA64nAA32 (reg and bit offset) is defined in a few
macros instead assumed to be at bit offset 24 of
SUNXI_CPUCFG_CLS_CTRL_REG0.

Change-Id: I933d00b9a914bf7103e3a9dadbc6d7be1a409668
Signed-off-by: Icenowy Zheng <icenowy@sipeed.com>
2021-08-25 00:33:59 +08:00
Icenowy Zheng 86a7429e47 fix(plat/allwinner): delay after enabling CPU power
Adds a 1us delay after enabling power to a CPU core, to prevent
inrush-caused CPU crash before it's up.

Change-Id: I8f4c1b0dc0d1d976b31ddc30efe7a77a1619b1b3
Signed-off-by: Icenowy Zheng <icenowy@sipeed.com>
2021-08-25 00:15:27 +08:00
André Przywara 19ebec9f66 Merge "fix(rpi4): drop /memreserve/ region" into integration 2021-08-24 17:52:37 +02:00
Vijayenthiran Subramaniam 3139270693 feat(board/rdn2): add tzc master source ids for soc dma
Add TZC master source id for DMA in the SoC space and for the DMAs
behind the I/O Virtualization block to allow the non-secure transactions
from these DMAs targeting DRAM.

Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
Change-Id: I77a2947b01b4b49a7c1940f09cf62b7b5257657c
2021-08-24 11:07:43 +05:30
nayanpatel-arm fbcf54aeb9 errata: workaround for Cortex-A710 errata 1987031
Cortex-A710 erratum 1987031 is a Cat B erratum present in r0p0, r1p0,
and r2p0 of the Cortex-A710 processor core, and it is still open.

A710 SDEN: https://documentation-service.arm.com/static/61099dc59ebe3a7dbd3a8a88?token=

Signed-off-by: nayanpatel-arm <nayankumar.patel@arm.com>
Change-Id: I9bcff306f82328ad5a0f6e9836020d23c07f7179
2021-08-23 15:51:26 -07:00
nayanpatel-arm 00bee99761 errata: workaround for Cortex-A78 errata 1952683
Cortex-A78 erratum 1952683 is a Cat B erratum present in r0p0 of
the Cortex-A78 processor core, and it was fixed in r1p0.

A78 SDEN : https://developer.arm.com/documentation/SDEN1401784/1400

Signed-off-by: nayanpatel-arm <nayankumar.patel@arm.com>
Change-Id: I77b03e695532cb13e8f8d3f00c43d973781ceeb0
2021-08-23 12:19:29 -07:00
Madhukar Pappireddy acfe3be282 Merge changes I976aef15,I11ae679f into integration
* changes:
  feat(plat/xilinx/zynqmp): add support for runtime feature config
  feat(plat/xilinx/zynqmp): sync IOCTL IDs
2021-08-20 21:42:19 +02:00
Madhukar Pappireddy 3b15e9ad11 Merge "fix(el3_runtime): correct CASSERT for pauth" into integration 2021-08-20 18:22:51 +02:00
Madhukar Pappireddy f8bcfa8b76 Merge "fix(plat/qemu): (NS_DRAM0_BASE + NS_DRAM0_SIZE) ADDR overflow 32bit" into integration 2021-08-20 18:07:24 +02:00
Madhukar Pappireddy 15405fccae Merge "fix(plat/st): apply security at the end of BL2" into integration 2021-08-20 16:33:57 +02:00
Pali Rohár 099c90b81d docs(plat/marvell/a8k): document MSS_SUPPORT and SCP_BL2 build options
Add missing documentation for MSS_SUPPORT and SCP_BL2 build options used
on Marvell platforms.

Signed-off-by: Pali Rohár <pali@kernel.org>
Change-Id: I852f60569a9a49269ae296c56cc83eb438528bee
2021-08-20 14:35:08 +02:00
Olivier Deprez bd4b4b03c2 Merge "docs(spmc): threat model document" into integration 2021-08-20 10:20:03 +02:00
André Przywara 9fcefe38d5 Merge "fix(plat/arm_fpga): enable AMU extension" into integration 2021-08-19 16:43:45 +02:00
Olivier Deprez b4f8d44597 fix(el3_runtime): correct CASSERT for pauth
clang build breaks when both ENABLE_PAUTH (BRANCH_PROTECTOR=1)
and CRASH_REPORTING (DEBUG=1) options are enabled:

include/lib/el3_runtime/cpu_data.h:135:2: error: redefinition of typedef
'assert_cpu_data_crash_stack_offset_mismatch' is a C11 feature [-Werror,
-Wtypedef-redefinition]
        assert_cpu_data_crash_stack_offset_mismatch);
        ^
include/lib/el3_runtime/cpu_data.h:128:2: note: previous definition is here
        assert_cpu_data_crash_stack_offset_mismatch);
        ^
1 error generated.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I22c8c45a94a64620007979d55412dbb57b11b813
2021-08-19 11:42:09 +02:00
Varun Wadekar 47d6f5ff16 feat(cpus): workaround for Cortex A78 AE erratum 1941500
Cortex A78 AE erratum 1941500 is a Cat B erratum that applies
to revisions <= r0p1. It is still open.

This erratum is avoided by by setting CPUECTLR_EL1[8] to 1.
There is a small performance cost (<0.5%) for setting this
bit.

SDEN is available at https://developer.arm.com/documentation/SDEN1707912/0900

Change-Id: I2d72666468b146714a0340ba114ccf0f5165b39c
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2021-08-19 02:15:09 -07:00
Olivier Deprez 3af9b3f0f0 docs(spmc): threat model document
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: Ib5f443a6997239d6ba4655d7df6c3fc61d45f991
2021-08-19 10:37:59 +02:00
Varun Wadekar 0ed87212a9 Merge "feat(cpus): workaround for Cortex A78 AE erratum 1951502" into integration 2021-08-19 09:58:52 +02:00
Ronak Jain 578f468ac0 feat(plat/xilinx/zynqmp): add support for runtime feature config
Add support for runtime feature configuration which are running on the
 firmware. Add new IOCTL IDs like IOCTL_SET_FEATURE_CONFIG and
 IOCTL_GET_FEATURE_CONFIG for configuring the features.

Signed-off-by: Ronak Jain <ronak.jain@xilinx.com>
Change-Id: I976aef15932783a25396b2adeb4c8f140cc87e79
2021-08-18 22:27:05 -07:00
Ronak Jain 38c0b2521a feat(plat/xilinx/zynqmp): sync IOCTL IDs
Sync IOCTL IDs in order to avoid conflict with other components like,
 Linux and firmware. Hence assigning value to IDs to make it more
 specific.

Signed-off-by: Ronak Jain <ronak.jain@xilinx.com>
Change-Id: I11ae679fbd0a953290306b62d661cc142f50dc28
2021-08-18 22:23:29 -07:00
lwpDarren 325716c97b fix(plat/qemu): (NS_DRAM0_BASE + NS_DRAM0_SIZE) ADDR overflow 32bit
after this commit: If15cf3b9d3e2e7876c40ce888f22e887893fe696
plat/qemu/common/qemu_pm.c:116:	    (entrypoint < (NS_DRAM0_BASE + NS_DRAM0_SIZE)))
the above line (NS_DRAM0_BASE + NS_DRAM0_SIZE) = 0x100000000, which will
overflow 32bit and cause ERROR
SO add ULL to fix it

tested on compiler:
gcc version 10.2.1 20201103 (GNU Toolchain for the A-profile Architecture 10.2-2020.11 (arm-10.16))

Signed-off-by: Darren Liang <lwp513@qq.com>
Change-Id: I1d769b0803142d37bd2968d765ab04a9c7c5c21a
2021-08-18 16:13:22 +01:00
Madhukar Pappireddy 459b24451a Merge "feat: enabling stack protector for diphda" into integration 2021-08-18 16:08:53 +02:00