]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
5 years agojuno/sgm: Maximize space allocated to SCP_BL2
Chris Kay [Thu, 12 Mar 2020 13:50:26 +0000 (13:50 +0000)]
juno/sgm: Maximize space allocated to SCP_BL2

To accommodate the increasing size of the SCP_BL2 binary, the base
address of the memory region allocated to SCP_BL2 has been moved
downwards from its current (mostly) arbitrary address to the beginning
of the non-shared trusted SRAM.

Change-Id: I086a3765bf3ea88f45525223d765dc0dbad6b434
Signed-off-by: Chris Kay <chris.kay@arm.com>
5 years agoMerge "Fix crash dump for lower EL" into integration
Mark Dykes [Wed, 11 Mar 2020 15:39:32 +0000 (15:39 +0000)]
Merge "Fix crash dump for lower EL" into integration

5 years agoMerge "TF-A GICv3 driver: Separate GICD and GICR accessor functions" into integration
Mark Dykes [Wed, 11 Mar 2020 15:38:45 +0000 (15:38 +0000)]
Merge "TF-A GICv3 driver: Separate GICD and GICR accessor functions" into integration

5 years agoMerge "CMake buildsystem design document" into integration
György Szing [Wed, 11 Mar 2020 14:35:37 +0000 (14:35 +0000)]
Merge "CMake buildsystem design document" into integration

5 years agoCMake buildsystem design document
Balint Dobszay [Wed, 13 Nov 2019 11:48:00 +0000 (12:48 +0100)]
CMake buildsystem design document

Change-Id: I9b69f2731b0d43ead4cacfa9844c6137c57f5aec
Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
5 years agoMerge changes from topic "stm32mp1-multi-image" into integration
Sandrine Bailleux [Wed, 11 Mar 2020 10:03:17 +0000 (10:03 +0000)]
Merge changes from topic "stm32mp1-multi-image" into integration

* changes:
  stm32mp1: platform.mk: support generating multiple images in one build
  stm32mp1: platform.mk: migrate to implicit rules
  stm32mp1: platform.mk: derive map file name from target name
  stm32mp1: platform.mk: generate linker script with fixed name
  stm32mp1: platform.mk: use PHONY for the appropriate targets

5 years agoMerge "plat: imx8mm: provide uart base as build option" into integration
Sandrine Bailleux [Wed, 11 Mar 2020 09:37:19 +0000 (09:37 +0000)]
Merge "plat: imx8mm: provide uart base as build option" into integration

5 years agoMerge "hikey960: Enable system power off callback" into integration
Sandrine Bailleux [Wed, 11 Mar 2020 09:34:12 +0000 (09:34 +0000)]
Merge "hikey960: Enable system power off callback" into integration

5 years agoMerge changes from topic "xlat" into integration
Sandrine Bailleux [Wed, 11 Mar 2020 09:08:04 +0000 (09:08 +0000)]
Merge changes from topic "xlat" into integration

* changes:
  Factor xlat_table sections in linker scripts out into a header file
  xlat_tables_v2: use ARRAY_SIZE in REGISTER_XLAT_CONTEXT_FULL_SPEC
  xlat_tables_v2: merge REGISTER_XLAT_CONTEXT_{FULL_SPEC,RO_BASE_TABLE}

5 years agoMerge "plat/arm: Retrieve the right ROTPK when using the dualroot CoT" into integration
Olivier Deprez [Wed, 11 Mar 2020 08:22:47 +0000 (08:22 +0000)]
Merge "plat/arm: Retrieve the right ROTPK when using the dualroot CoT" into integration

5 years agoFactor xlat_table sections in linker scripts out into a header file
Masahiro Yamada [Mon, 9 Mar 2020 08:39:48 +0000 (17:39 +0900)]
Factor xlat_table sections in linker scripts out into a header file

TF-A has so many linker scripts, at least one linker script for each BL
image, and some platforms have their own ones. They duplicate quite
similar code (and comments).

When we add some changes to linker scripts, we end up with touching
so many files. This is not nice in the maintainability perspective.

When you look at Linux kernel, the common code is macrofied in
include/asm-generic/vmlinux.lds.h, which is included from each arch
linker script, arch/*/kernel/vmlinux.lds.S

TF-A can follow this approach. Let's factor out the common code into
include/common/bl_common.ld.h

As a start point, this commit factors out the xlat_table section.

Change-Id: Ifa369e9b48e8e12702535d721cc2a16d12397895
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoxlat_tables_v2: use ARRAY_SIZE in REGISTER_XLAT_CONTEXT_FULL_SPEC
Masahiro Yamada [Mon, 9 Mar 2020 08:39:27 +0000 (17:39 +0900)]
xlat_tables_v2: use ARRAY_SIZE in REGISTER_XLAT_CONTEXT_FULL_SPEC

With this, it is clearer that .base_table_entries and .tables_num
are the array size of .base_table and .tables, respectively.

Change-Id: I634e65aba835ab9908cc3919355df6bc6e18d42a
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoxlat_tables_v2: merge REGISTER_XLAT_CONTEXT_{FULL_SPEC,RO_BASE_TABLE}
Masahiro Yamada [Fri, 6 Mar 2020 10:21:26 +0000 (19:21 +0900)]
xlat_tables_v2: merge REGISTER_XLAT_CONTEXT_{FULL_SPEC,RO_BASE_TABLE}

xlat_tables_v2_helpers.h defines two quite similar macros,
REGISTER_XLAT_CONTEXT_FULL_SPEC and REGISTER_XLAT_CONTEXT_RO_BASE_TABLE.

Only the difference is the section of _ctx_name##_base_xlat_table.

Parameterize it and unify these two macros.

The base xlat table goes into the .bss section by default.
If PLAT_RO_XLAT_TABLES is defined, it goes into the .rodata section.

Change-Id: I8b02f4da98f0c272e348a200cebd89f479099c55
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoMerge changes from topic "sb/dualroot" into integration
Mark Dykes [Tue, 10 Mar 2020 18:34:56 +0000 (18:34 +0000)]
Merge changes from topic "sb/dualroot" into integration

* changes:
  plat/arm: Pass cookie argument down to arm_get_rotpk_info()
  plat/arm: Add support for dualroot CoT
  plat/arm: Provide some PROTK files for development

5 years agoMerge "Necessary fix in drivers to upgrade to mbedtls-2.18.0" into integration
Mark Dykes [Tue, 10 Mar 2020 18:25:02 +0000 (18:25 +0000)]
Merge "Necessary fix in drivers to upgrade to mbedtls-2.18.0" into integration

5 years agoMerge changes from topic "sb/dualroot" into integration
Sandrine Bailleux [Tue, 10 Mar 2020 13:47:47 +0000 (13:47 +0000)]
Merge changes from topic "sb/dualroot" into integration

* changes:
  Build system: Changes to drive cert_create for dualroot CoT
  cert_create: Define the dualroot CoT
  Introduce a new "dualroot" chain of trust

5 years agoTF-A GICv3 driver: Separate GICD and GICR accessor functions
Alexei Fedorov [Fri, 21 Feb 2020 10:17:26 +0000 (10:17 +0000)]
TF-A GICv3 driver: Separate GICD and GICR accessor functions

This patch provides separation of GICD, GICR accessor
functions and adds new macros for GICv3 registers access
as a preparation for GICv3.1 and GICv4 support.
NOTE: Platforms need to modify to include both
'gicdv3_helpers.c' and 'gicrv3_helpers.c' instead of the
single helper file previously.

Change-Id: I1641bd6d217d6eb7d1228be3c4177b2d556da60a
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoMerge changes from topic "tegra-downstream-02182020" into integration
Olivier Deprez [Tue, 10 Mar 2020 08:28:21 +0000 (08:28 +0000)]
Merge changes from topic "tegra-downstream-02182020" into integration

* changes:
  Tegra186: store TZDRAM base/size to scratch registers
  Tegra186: add SE support to generate SHA256 of TZRAM
  Tegra186: add support for bpmp_ipc driver
  Tegra210: disable ERRATA_A57_829520
  Tegra194: memctrl: add support for MIU4 and MIU5
  Tegra194: memctrl: remove support to reconfigure MSS
  Tegra: fiq_glue: remove bakery locks from interrupt handler
  Tegra210: SE: add context save support
  Tegra210: update the PMC blacklisted registers
  Tegra: disable CPUACTLR access from lower exception levels
  cpus: denver: fixup register used to store return address

5 years agoTegra186: store TZDRAM base/size to scratch registers
Varun Wadekar [Thu, 28 Jun 2018 18:03:41 +0000 (11:03 -0700)]
Tegra186: store TZDRAM base/size to scratch registers

This patch saves the TZDRAM base and size values to secure scratch
registers, for the WB0. The WB0 reads these values and uses them to
verify integrity of the TZDRAM aperture.

Change-Id: Ic70914cb958249f06cb58025a24d13734a85e16e
Signed-off-by: Jeetesh Burman <jburman@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra186: add SE support to generate SHA256 of TZRAM
Jeetesh Burman [Thu, 19 Jul 2018 07:37:23 +0000 (13:07 +0530)]
Tegra186: add SE support to generate SHA256 of TZRAM

The BL3-1 firmware code is stored in TZSRAM on Tegra186 platforms. This
memory loses power when we enter System Suspend and so its contents are
stored to TZDRAM, before entry. This opens up an attack vector where the
TZDRAM contents might be tampered with when we are in the System Suspend
mode. To mitigate this attack the SE engine calculates the hash of entire
TZSRAM and stores it in PMC scratch, before we copy data to TZDRAM. The
WB0 code will validate the TZDRAM and match the hash with the one in PMC
scratch.

This patch adds driver for the SE engine, with APIs to calculate the hash
and store SE SHA256 hash-result to PMC scratch registers.

Change-Id: Ib487d5629225d3d99bd35d44f0402d6d3cf27ddf
Signed-off-by: Jeetesh Burman <jburman@nvidia.com>
5 years agoTegra186: add support for bpmp_ipc driver
Jeetesh Burman [Thu, 31 May 2018 08:45:30 +0000 (14:15 +0530)]
Tegra186: add support for bpmp_ipc driver

This patch enables the bpmp-ipc driver for Tegra186 platforms,
to ask BPMP firmware to toggle SE clock.

Change-Id: Ie63587346c4d9b7e54767dbee17d0139fa2818ae
Signed-off-by: Jeetesh Burman <jburman@nvidia.com>
5 years agoTegra210: disable ERRATA_A57_829520
Mithun Maragiri [Fri, 20 Jul 2018 21:41:33 +0000 (14:41 -0700)]
Tegra210: disable ERRATA_A57_829520

ERRATA_A57_829520 disables "indirect branch prediction" for
EL1 on cpu reset, leading to 15% drop in CPU performance
with coremark benchmarks.

Tegra210 already has a hardware fix for ARM BUG#829520,so
this errata is not needed.

This patch disables the errata to get increased performance
numbers.

Change-Id: I0b42e8badd19a8101f6a55d80eb2d953597d3c20
Signed-off-by: Mithun Maragiri <mmaragiri@nvidia.com>
5 years agoTegra194: memctrl: add support for MIU4 and MIU5
Pravin [Fri, 11 May 2018 09:44:19 +0000 (15:14 +0530)]
Tegra194: memctrl: add support for MIU4 and MIU5

This patch adds support for memqual miu 4,5.

The MEMQUAL engine has miu0 to miu7 in which miu6 and
miu7 is hardwired to bypass SMMU. So only miu0 to miu5
support is provided.

Change-Id: Ib350334eec521e65f395f1c3205e2cdaf464ebea
Signed-off-by: Pravin <pt@nvidia.com>
5 years agoTegra194: memctrl: remove support to reconfigure MSS
Stefan Kristiansson [Tue, 24 Apr 2018 13:02:17 +0000 (16:02 +0300)]
Tegra194: memctrl: remove support to reconfigure MSS

As bpmp-fw is running at the same time as ATF, and
the mss client reconfiguration sequence involves performing
a hot flush resets on bpmp, there is a chance that bpmp-fw is
trying to perform accesses while the hot flush is active.

Therefore, the mss client reconfigure has been moved to
System Suspend resume fw and bootloader, and it can be
removed from here.

Change-Id: I34019ad12abea9681f5e180af6bc86f2c4c6fc74
Signed-off-by: Stefan Kristiansson <stefank@nvidia.com>
5 years agoTegra: fiq_glue: remove bakery locks from interrupt handler
Varun Wadekar [Fri, 6 Jul 2018 17:39:32 +0000 (10:39 -0700)]
Tegra: fiq_glue: remove bakery locks from interrupt handler

This patch removes usage of bakery_locks from the FIQ handler, as it
creates unnecessary dependency whenever the watchdog timer interrupt
fires. All operations inside the interrupt handler are 'reads', so
no need for serialization.

Change-Id: I3f675e610e4dabc5b1435fdd24bc28e424f5a8e4
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra210: SE: add context save support
Harvey Hsieh [Tue, 10 Apr 2018 10:16:51 +0000 (18:16 +0800)]
Tegra210: SE: add context save support

Tegra210B01 SoCs support atomic context save for the two SE
hardware engines. Tegra210 SoCs have support for only one SE
engine and support a software based save/restore mechanism
instead.

This patch updates the SE driver to make this change.

Change-Id: Ia5e5ed75d0fe011f17809684bbc2ed2338925946
Signed-off-by: Harvey Hsieh <hhsieh@nvidia.com>
5 years agoTegra210: update the PMC blacklisted registers
kalyani chidambaram [Tue, 19 Jun 2018 20:34:39 +0000 (13:34 -0700)]
Tegra210: update the PMC blacklisted registers

Update the list to include PMC registers that the NS world cannot
access even with smc calls.

Change-Id: I588179b56ebc0c29200b55e6d61535fd3a7a3b7e
Signed-off-by: kalyani chidambaram <kalyanic@nvidia.com>
5 years agoTegra: disable CPUACTLR access from lower exception levels
Varun Wadekar [Thu, 7 Jun 2018 18:21:02 +0000 (11:21 -0700)]
Tegra: disable CPUACTLR access from lower exception levels

This patch resets the macros to update the CPUACTLR_ELx to make
them generic for all exception levels.

Change-Id: I33e9b860efb543934b654a2f5d775135df7f1aa6
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agocpus: denver: fixup register used to store return address
Kalyani Chidambaram [Tue, 9 Oct 2018 00:01:01 +0000 (17:01 -0700)]
cpus: denver: fixup register used to store return address

The denver_enable_dco and denver_disable_dco use register X3 to store
the return address. But X3 gets over-written by other functions,
downstream.

This patch stores the return address to X18 instead, to fix this
anomaly.

Change-Id: Ic40bfc1d9abaa7b90348843b9ecd09521bb4ee7b
Signed-off-by: Kalyani Chidambaram <kalyanic@nvidia.com>
5 years agoMerge "aarch32: stop speculative execution past exception returns" into integration
Mark Dykes [Mon, 9 Mar 2020 16:02:06 +0000 (16:02 +0000)]
Merge "aarch32: stop speculative execution past exception returns" into integration

5 years agoMerge changes from topic "tbbr/fw_enc" into integration
Sandrine Bailleux [Mon, 9 Mar 2020 15:23:22 +0000 (15:23 +0000)]
Merge changes from topic "tbbr/fw_enc" into integration

* changes:
  docs: qemu: Add instructions to boot using FIP image
  docs: Update docs with firmware encryption feature
  qemu: Support optional encryption of BL31 and BL32 images
  qemu: Update flash address map to keep FIP in secure FLASH0
  Makefile: Add support to optionally encrypt BL31 and BL32
  tools: Add firmware authenticated encryption tool
  TBB: Add an IO abstraction layer to load encrypted firmwares
  drivers: crypto: Add authenticated decryption framework

5 years agodocs: qemu: Add instructions to boot using FIP image
Sumit Garg [Fri, 15 Nov 2019 14:46:58 +0000 (20:16 +0530)]
docs: qemu: Add instructions to boot using FIP image

Update qemu documentation with instructions to boot using FIP image.
Also, add option to build TF-A with TBBR and firmware encryption
enabled.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Change-Id: Ib3af485d413cd595352034c82c2268d7f4cb120a

5 years agodocs: Update docs with firmware encryption feature
Sumit Garg [Fri, 15 Nov 2019 13:17:53 +0000 (18:47 +0530)]
docs: Update docs with firmware encryption feature

Update documentation with optional firmware encryption feature.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Change-Id: I26691b18e1ee52a73090954260f26f2865c4e05a

5 years agoMerge "fdts: a5ds: add ethernet node in devicetree" into integration
Manish Pandey [Mon, 9 Mar 2020 11:21:47 +0000 (11:21 +0000)]
Merge "fdts: a5ds: add ethernet node in devicetree" into integration

5 years agoMerge "uniphier: shrink UNIPHIER_ROM_REGION_SIZE" into integration
Sandrine Bailleux [Mon, 9 Mar 2020 09:25:11 +0000 (09:25 +0000)]
Merge "uniphier: shrink UNIPHIER_ROM_REGION_SIZE" into integration

5 years agoMerge "TSP: corrected log information" into integration
Sandrine Bailleux [Mon, 9 Mar 2020 07:48:30 +0000 (07:48 +0000)]
Merge "TSP: corrected log information" into integration

5 years agoNecessary fix in drivers to upgrade to mbedtls-2.18.0
Madhukar Pappireddy [Fri, 6 Mar 2020 00:18:40 +0000 (18:18 -0600)]
Necessary fix in drivers to upgrade to mbedtls-2.18.0

Include x509.h header file explicitly. Update docs.

Change-Id: If2e52c2cd3056654406b7b6779b67eea5cc04a48
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
5 years agoTSP: corrected log information
Manish Pandey [Fri, 6 Mar 2020 14:36:25 +0000 (14:36 +0000)]
TSP: corrected log information

In CPU resume function, CPU suspend count was printed instead of CPU
resume count.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I0c081dc03a4ccfb2129687f690667c5ceed00a5f

5 years agoFix crash dump for lower EL
Alexei Fedorov [Tue, 3 Mar 2020 13:31:58 +0000 (13:31 +0000)]
Fix crash dump for lower EL

This patch provides a fix for incorrect crash dump data for
lower EL when TF-A is built with HANDLE_EA_EL3_FIRST=1 option
which enables routing of External Aborts and SErrors to EL3.

Change-Id: I9d5e6775e6aad21db5b78362da6c3a3d897df977
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agouniphier: shrink UNIPHIER_ROM_REGION_SIZE
Masahiro Yamada [Fri, 6 Mar 2020 11:11:23 +0000 (20:11 +0900)]
uniphier: shrink UNIPHIER_ROM_REGION_SIZE

Currently, the ROM region is needlessly too large.

The on-chip SRAM region of the next SoC will start from 0x04000000,
and this will cause the region overlap.

Mapping 0x04000000 for the ROM is enough.

Change-Id: I85ce0bb1120ebff2e3bc7fd13dc0fd15dfff5ff6
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoMerge "driver/arm/css: minor bug fix" into integration
Alexei Fedorov [Fri, 6 Mar 2020 11:12:45 +0000 (11:12 +0000)]
Merge "driver/arm/css: minor bug fix" into integration

5 years agoqemu: Support optional encryption of BL31 and BL32 images
Sumit Garg [Thu, 14 Nov 2019 12:04:56 +0000 (17:34 +0530)]
qemu: Support optional encryption of BL31 and BL32 images

Enable encryption IO layer to be stacked above FIP IO layer for optional
encryption of Bl31 and BL32 images in case ENCRYPT_BL31 or ENCRYPT_BL32
build flag is set.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Change-Id: I24cba64728861e833abffc3d5d9807599c49feb6

5 years agoqemu: Update flash address map to keep FIP in secure FLASH0
Sumit Garg [Thu, 14 Nov 2019 12:04:09 +0000 (17:34 +0530)]
qemu: Update flash address map to keep FIP in secure FLASH0

Secure FLASH0 memory map looks like:
- Offset: 0 to 256K -> bl1.bin
- Offset: 256K to 4.25M -> fip.bin

FLASH1 is normally used via UEFI/edk2 to keep varstore.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Change-Id: I6883f556c22d6a5d3fa3846c703bebc2abe36765

5 years agoMakefile: Add support to optionally encrypt BL31 and BL32
Sumit Garg [Thu, 14 Nov 2019 11:03:45 +0000 (16:33 +0530)]
Makefile: Add support to optionally encrypt BL31 and BL32

Following build flags have been added to support optional firmware
encryption:

- FW_ENC_STATUS: Top level firmware's encryption numeric flag, values:
    0: Encryption is done with Secret Symmetric Key (SSK) which is
       common for a class of devices.
    1: Encryption is done with Binding Secret Symmetric Key (BSSK) which
       is unique per device.

- ENC_KEY: A 32-byte (256-bit) symmetric key in hex string format. It
    could be SSK or BSSK depending on FW_ENC_STATUS flag.

- ENC_NONCE: A 12-byte (96-bit) encryption nonce or Initialization Vector
    (IV) in hex string format.

- ENCRYPT_BL31: Binary flag to enable encryption of BL31 firmware.

- ENCRYPT_BL32: Binary flag to enable encryption of Secure BL32 payload.

Similar flags can be added to encrypt other firmwares as well depending
on use-cases.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Change-Id: I94374d6830ad5908df557f63823e58383d8ad670

5 years agotools: Add firmware authenticated encryption tool
Sumit Garg [Mon, 11 Nov 2019 13:16:36 +0000 (18:46 +0530)]
tools: Add firmware authenticated encryption tool

Add firmware authenticated encryption tool which utilizes OpenSSL
library to encrypt firmwares using a key provided via cmdline. Currently
this tool supports AES-GCM as an authenticated encryption algorithm.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Change-Id: I60e296af1b98f1912a19d5f91066be7ea85836e4

5 years agoTBB: Add an IO abstraction layer to load encrypted firmwares
Sumit Garg [Fri, 15 Nov 2019 10:04:55 +0000 (15:34 +0530)]
TBB: Add an IO abstraction layer to load encrypted firmwares

TBBR spec advocates for optional encryption of firmwares (see optional
requirement: R060_TBBR_FUNCTION). So add an IO abstaction layer to
support firmware decryption that can be stacked above any underlying IO/
packaging layer like FIP etc. It aims to provide a framework to load any
encrypted IO payload.

Also, add plat_get_enc_key_info() to be implemented in a platform
specific manner as handling of encryption key may vary from one platform
to another.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Change-Id: I9892e0ddf00ebecb8981301dbfa41ea23e078b03

5 years agodrivers: crypto: Add authenticated decryption framework
Sumit Garg [Fri, 15 Nov 2019 05:13:00 +0000 (10:43 +0530)]
drivers: crypto: Add authenticated decryption framework

Add framework for autheticated decryption of data. Currently this
patch optionally imports mbedtls library as a backend if build option
"DECRYPTION_SUPPORT = aes_gcm" is set to perform authenticated decryption
using AES-GCM algorithm.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Change-Id: I2966f0e79033151012bf4ffc66f484cd949e7271

5 years agoMerge changes from topic "spmd-sel2" into integration
Olivier Deprez [Fri, 6 Mar 2020 08:18:03 +0000 (08:18 +0000)]
Merge changes from topic "spmd-sel2" into integration

* changes:
  SPMD: add command line parameter to run SPM at S-EL2 or S-EL1
  SPMD: smc handler qualify secure origin using booleans
  SPMD: SPMC init, SMC handler cosmetic changes
  SPMD: [tegra] rename el1_sys_regs structure to sys_regs
  SPMD: Adds partially supported EL2 registers.
  SPMD: save/restore EL2 system registers.

5 years agoMerge changes from topic "console_t_drvdata_fix" into integration
Manish Pandey [Thu, 5 Mar 2020 22:45:12 +0000 (22:45 +0000)]
Merge changes from topic "console_t_drvdata_fix" into integration

* changes:
  imx: console: Use CONSOLE_T_BASE for UART base address
  Tegra: spe: use CONSOLE_T_BASE to save MMIO base address

5 years agoplat: imx8mm: provide uart base as build option
Igor Opaniuk [Thu, 5 Mar 2020 20:10:41 +0000 (22:10 +0200)]
plat: imx8mm: provide uart base as build option

Some boards (f.e. Verdin i.MX8M Mini) use different UART base address
for serial debug output, so make this value configurable (as a
build option).

Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Change-Id: I988492ccecbc3f64a5153b381c4a97b8a0181f52

5 years agodriver/arm/css: minor bug fix
Manish Pandey [Tue, 3 Mar 2020 17:12:10 +0000 (17:12 +0000)]
driver/arm/css: minor bug fix

The cpu index was wrongly checked causing it to assert always.
Since this code path is exercised only during TF test "NODE_HW_STAT",
which queries Power state from SCP, this bug was not detected earlier.

Change-Id: Ia25cef4c0aa23ed08092df39134937a2601c21ac
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
5 years agoimx: console: Use CONSOLE_T_BASE for UART base address
Andre Przywara [Thu, 5 Mar 2020 13:56:56 +0000 (13:56 +0000)]
imx: console: Use CONSOLE_T_BASE for UART base address

Since commit ac71344e9eca we have the UART base address in the generic
console_t structure. For most platforms the platform-specific struct
console is gone, so we *must* use the embedded base address, since there
is no storage behind the generic console_t anymore.

Replace the usage of CONSOLE_T_DRVDATA with CONSOLE_T_BASE to fix this.

Change-Id: I6d2ab0bc2c845c71f98b9dd64d89eef3252f4591
Reported-by: Varun Wadekar <vwadekar@nvidia.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agoTegra: spe: use CONSOLE_T_BASE to save MMIO base address
Varun Wadekar [Wed, 4 Mar 2020 21:47:13 +0000 (13:47 -0800)]
Tegra: spe: use CONSOLE_T_BASE to save MMIO base address

Commit ac71344e9eca1f7d1e0ce4a67aca776470639b1c moved the base address
for the MMIO aperture of the console inside the console_t struct. As
a result, the driver should now save the MMIO base address to console_t
at offset marked by the CONSOLE_T_BASE macro.

This patch updates the SPE console driver to use the CONSOLE_T_BASE macro
to save/access the MMIO base address.

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

5 years agoMerge changes from topic "sp_loading" into integration
Olivier Deprez [Thu, 5 Mar 2020 10:28:32 +0000 (10:28 +0000)]
Merge changes from topic "sp_loading" into integration

* changes:
  SPMD: loading Secure Partition payloads
  fvp: add Cactus/Ivy Secure Partition information
  fconf: Add Secure Partitions information as property

5 years agofdts: a5ds: add ethernet node in devicetree
Vishnu Banavath [Wed, 4 Mar 2020 12:13:08 +0000 (12:13 +0000)]
fdts: a5ds: add ethernet node in devicetree

This change is to add ethernet and voltage regulator nodes into
a5ds devicetree.

Change-Id: If9ed67040d54e76af1813c9f99835f51f617e9df
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
5 years agoSPMD: loading Secure Partition payloads
Manish Pandey [Tue, 25 Feb 2020 11:38:19 +0000 (11:38 +0000)]
SPMD: loading Secure Partition payloads

This patch implements loading of Secure Partition packages using
existing framework of loading other bl images.

The current framework uses a statically defined array to store all the
possible image types and at run time generates a link list and traverse
through it to load different images.

To load SPs, a new array of fixed size is introduced which will be
dynamically populated based on number of SPs available in the system
and it will be appended to the loadable images list.

Change-Id: I8309f63595f2a71b28a73b922d20ccba9c4f6ae4
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
5 years agoMerge "Update pathnames in maintainers.rst file" into integration
Sandrine Bailleux [Tue, 3 Mar 2020 11:49:44 +0000 (11:49 +0000)]
Merge "Update pathnames in maintainers.rst file" into integration

5 years agoSPMD: add command line parameter to run SPM at S-EL2 or S-EL1
Max Shvetsov [Tue, 25 Feb 2020 13:55:00 +0000 (13:55 +0000)]
SPMD: add command line parameter to run SPM at S-EL2 or S-EL1

Added SPMD_SPM_AT_SEL2 build command line parameter.
Set to 1 to run SPM at S-EL2.
Set to 0 to run SPM at S-EL1 (pre-v8.4 or S-EL2 is disabled).
Removed runtime EL from SPM core manifest.

Change-Id: Icb4f5ea4c800f266880db1d410d63fe27a1171c0
Signed-off-by: Artsem Artsemenka <artsem.artsemenka@arm.com>
Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com>
5 years agoSPMD: smc handler qualify secure origin using booleans
Olivier Deprez [Mon, 23 Dec 2019 15:21:12 +0000 (16:21 +0100)]
SPMD: smc handler qualify secure origin using booleans

Change-Id: Icc8f73660453a2cbb2241583684b615d5d1af9d4
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
5 years agoSPMD: SPMC init, SMC handler cosmetic changes
Max Shvetsov [Thu, 27 Feb 2020 14:54:21 +0000 (14:54 +0000)]
SPMD: SPMC init, SMC handler cosmetic changes

Change-Id: I8881d489994aea667e3dd59932ab4123f511d6ba
Signed-off-by: Artsem Artsemenka <artsem.artsemenka@arm.com>
Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com>
5 years agoSPMD: [tegra] rename el1_sys_regs structure to sys_regs
Max Shvetsov [Fri, 24 Jan 2020 13:48:53 +0000 (13:48 +0000)]
SPMD: [tegra] rename el1_sys_regs structure to sys_regs

Renamed the structure according to a SPMD refactoring
introduced in <c585d07aa> since this structure is used
to service both EL1 and EL2 as opposed to serving only EL1.

Change-Id: I23b7c089e53f617157a4b4e6443acce50d85c3b5
Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com>
5 years agoSPMD: Adds partially supported EL2 registers.
Max Shvetsov [Mon, 17 Feb 2020 16:15:47 +0000 (16:15 +0000)]
SPMD: Adds partially supported EL2 registers.

This patch adds EL2 registers that are supported up to ARMv8.6.
ARM_ARCH_MINOR has to specified to enable save/restore routine.

Note: Following registers are still not covered in save/restore.
 * AMEVCNTVOFF0<n>_EL2
 * AMEVCNTVOFF1<n>_EL2
 * ICH_AP0R<n>_EL2
 * ICH_AP1R<n>_EL2
 * ICH_LR<n>_EL2

Change-Id: I4813f3243e56e21cb297b31ef549a4b38d4876e1
Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com>
5 years agofvp: add Cactus/Ivy Secure Partition information
Manish Pandey [Tue, 18 Feb 2020 13:08:14 +0000 (13:08 +0000)]
fvp: add Cactus/Ivy Secure Partition information

Add load address and UUID in fw config dts for Cactus and Ivy which are
example SP's in tf-test repository.

For prototype purpose these information is added manually but later on
it will be updated at compile time from SP layout file and SP manifests
provided by platform.

Change-Id: I41f485e0245d882c7b514bad41fae34036597ce4
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
5 years agofconf: Add Secure Partitions information as property
Olivier Deprez [Thu, 23 Jan 2020 10:24:33 +0000 (11:24 +0100)]
fconf: Add Secure Partitions information as property

Use the firmware configuration framework to retrieve information about
Secure Partitions to facilitate loading them into memory.

To load a SP image we need UUID look-up into FIP and the load address
where it needs to be loaded in memory.

This patch introduces a SP populator function which gets UUID and load
address from firmware config device tree and updates its C data
structure.

Change-Id: I17faec41803df9a76712dcc8b67cadb1c9daf8cd
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
5 years agohikey960: Enable system power off callback
Leo Yan [Mon, 2 Mar 2020 14:15:08 +0000 (22:15 +0800)]
hikey960: Enable system power off callback

On Hikey960 if outputs GPIO176 low level, it can tell PMIC to power off
the whole board.  To avoid resetting the board and stay off, it also
requires the SW2201's three switches 1/2/3 need to be all set to 0.

Since current code doesn't contain complete GPIO modules and misses to
support GPIO176.  This patch adds all known GPIO modules and initialize
GPIO in BL31, and adds system power off callback to use GPIO176 for PMIC
power off operation.

Change-Id: Ia88859b8b7c87c061420ef75f0de3e2768667bb0
Signed-off-by: Leo Yan <leo.yan@linaro.org>
5 years agoMerge "doc: Fix variables names in TBBR CoT documentation" into integration
Sandrine Bailleux [Mon, 2 Mar 2020 13:41:06 +0000 (13:41 +0000)]
Merge "doc: Fix variables names in TBBR CoT documentation" into integration

5 years agodoc: Fix variables names in TBBR CoT documentation
Sandrine Bailleux [Mon, 2 Mar 2020 12:09:22 +0000 (13:09 +0100)]
doc: Fix variables names in TBBR CoT documentation

In commit 516beb585c23056820a854b12c77a6f62cbc5c8b ("TBB: apply TBBR naming
convention to certificates and extensions"), some of the variables used in the
TBBR chain of trust got renamed but the documentation did not get properly
updated everywhere to reflect these changes.

Change-Id: Ie8e2146882c2d3538c5b8c968d1bdaf5ea2a6e53
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
5 years agoSPMD: save/restore EL2 system registers.
Max Shvetsov [Tue, 25 Feb 2020 13:56:19 +0000 (13:56 +0000)]
SPMD: save/restore EL2 system registers.

NOTE: Not all EL-2 system registers are saved/restored.
This subset includes registers recognized by ARMv8.0

Change-Id: I9993c7d78d8f5f8e72d1c6c8d6fd871283aa3ce0
Signed-off-by: Jose Marinho <jose.marinho@arm.com>
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Signed-off-by: Artsem Artsemenka <artsem.artsemenka@arm.com>
Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com>
5 years agoaarch32: stop speculative execution past exception returns
Madhukar Pappireddy [Wed, 26 Feb 2020 18:37:05 +0000 (12:37 -0600)]
aarch32: stop speculative execution past exception returns

aarch32 CPUs speculatively execute instructions following a
ERET as if it was not a jump instruction. This could lead to
cache-based side channel vulnerabilities. The software fix is
to place barrier instructions following ERET.

The counterpart patch for aarch64 is merged:
https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=f461fe346b728d0e88142fd7b8f2816415af18bc

Change-Id: I2aa3105bee0b92238f389830b3a3b8650f33af3d
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
5 years agoMerge changes I75f6d135,I4add470e,I0ecd3a2b,I67a63d73 into integration
Manish Pandey [Fri, 28 Feb 2020 16:52:55 +0000 (16:52 +0000)]
Merge changes I75f6d135,I4add470e,I0ecd3a2b,I67a63d73 into integration

* changes:
  board/rddaniel: intialize tzc400 controllers
  plat/arm/tzc: add support to configure multiple tzc400
  plat/arm: allow boards to specify second DRAM Base address
  plat/arm: allow boards to define PLAT_ARM_TZC_FILTERS

5 years agoMerge "intel: Enable EMAC PHY in Intel FPGA platform" into integration
Sandrine Bailleux [Fri, 28 Feb 2020 10:51:49 +0000 (10:51 +0000)]
Merge "intel: Enable EMAC PHY in Intel FPGA platform" into integration

5 years agoMerge "mt8173: Add support for new watchdog SMC" into integration
Sandrine Bailleux [Fri, 28 Feb 2020 10:48:21 +0000 (10:48 +0000)]
Merge "mt8173: Add support for new watchdog SMC" into integration

5 years agoMerge "intel: Fix argument type for mailbox driver" into integration
Sandrine Bailleux [Fri, 28 Feb 2020 10:23:10 +0000 (10:23 +0000)]
Merge "intel: Fix argument type for mailbox driver" into integration

5 years agoMerge "fconf: Fix misra issues" into integration
Sandrine Bailleux [Fri, 28 Feb 2020 10:22:05 +0000 (10:22 +0000)]
Merge "fconf: Fix misra issues" into integration

5 years agoMerge "Add Cortex-A65/AE to the supported FVP list" into integration
Sandrine Bailleux [Fri, 28 Feb 2020 09:26:43 +0000 (09:26 +0000)]
Merge "Add Cortex-A65/AE to the supported FVP list" into integration

5 years agoMerge "intel: Update RSU driver return code" into integration
Sandrine Bailleux [Thu, 27 Feb 2020 16:29:42 +0000 (16:29 +0000)]
Merge "intel: Update RSU driver return code" into integration

5 years agofconf: Fix misra issues
Louis Mayencourt [Mon, 24 Feb 2020 14:37:25 +0000 (14:37 +0000)]
fconf: Fix misra issues

MISRA C-2012 Rule 20.7:
Macro parameter expands into an expression without being wrapped by parentheses.

MISRA C-2012 Rule 12.1:
Missing explicit parentheses on sub-expression.

MISRA C-2012 Rule 18.4:
Essential type of the left hand operand is not the same as that of the right
operand.

Include does not provide any needed symbols.

Change-Id: Ie1c6451cfbc8f519146c28b2cf15c50b1f36adc8
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
5 years agoAdd Cortex-A65/AE to the supported FVP list
Imre Kis [Thu, 27 Feb 2020 14:05:03 +0000 (15:05 +0100)]
Add Cortex-A65/AE to the supported FVP list

Cortex-A65x4 and Cortex-A65AEx8 is now included in the list of the
supported Arm Fixed Virtual Platforms.

Signed-off-by: Imre Kis <imre.kis@arm.com>
Change-Id: Ibfcaec11bc75549d60455e96858d79b679e71e5e

5 years agointel: Update RSU driver return code
Abdul Halim, Muhammad Hadi Asyrafi [Thu, 27 Feb 2020 02:23:48 +0000 (10:23 +0800)]
intel: Update RSU driver return code

Modify RSU driver error code for backward-compatibility with
Linux RSU driver

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ib9e38d4017efe35d3aceeee27dce451fbd429fb5

5 years agoMerge "Modify multithreaded dts file of DynamIQ FVPs" into integration
Sandrine Bailleux [Thu, 27 Feb 2020 11:32:11 +0000 (11:32 +0000)]
Merge "Modify multithreaded dts file of DynamIQ FVPs" into integration

5 years agoMerge "change-log: Add fconf entry" into integration
Sandrine Bailleux [Thu, 27 Feb 2020 07:33:07 +0000 (07:33 +0000)]
Merge "change-log: Add fconf entry" into integration

5 years agoMerge "Build: fix 'BL stage' comment for build macros" into integration
Sandrine Bailleux [Thu, 27 Feb 2020 07:29:49 +0000 (07:29 +0000)]
Merge "Build: fix 'BL stage' comment for build macros" into integration

5 years agoBuild: fix 'BL stage' comment for build macros
Masahiro Yamada [Thu, 27 Feb 2020 03:16:32 +0000 (12:16 +0900)]
Build: fix 'BL stage' comment for build macros

The MAKE_BL macro is invoked for 1, 2, 2u, 31, 32.

Fix the comments.

Change-Id: I35dd25cc2ea13885c184fb9c8229a322b33f7e71
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoUpdate pathnames in maintainers.rst file
Sandrine Bailleux [Wed, 26 Feb 2020 15:57:05 +0000 (16:57 +0100)]
Update pathnames in maintainers.rst file

The maintainers.rst file lists files and directories that each contributor looks
after in the TF-A source tree. As files and directories move around over time,
some pathnames had become invalid. Fix them, either by updating the path if
it has just moved, or deleting it altogether if it doesn't seem to exist
anymore.

Change-Id: Idb6ff4d8d0b593138d4f555ec206abcf68b0064f
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
5 years agoMerge "amlogic/axg: Add documentation page to the index" into integration
Sandrine Bailleux [Wed, 26 Feb 2020 15:17:23 +0000 (15:17 +0000)]
Merge "amlogic/axg: Add documentation page to the index" into integration

5 years agoamlogic/axg: Add documentation page to the index
Sandrine Bailleux [Wed, 26 Feb 2020 14:52:23 +0000 (15:52 +0100)]
amlogic/axg: Add documentation page to the index

It is needed to make it appear in the table of contents. Right now,
all Amlogic documentation pages appear under the "Platform ports"
section, except the AXG one.

Change-Id: Ibcfc3b156888d2a9574953578978b629e185c708
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
5 years agochange-log: Add fconf entry
Louis Mayencourt [Wed, 26 Feb 2020 13:49:09 +0000 (13:49 +0000)]
change-log: Add fconf entry

Change-Id: I6686f172d0c24f6c457a39cdf4debcbf05475540
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
5 years agoModify multithreaded dts file of DynamIQ FVPs
Imre Kis [Tue, 17 Dec 2019 17:06:26 +0000 (18:06 +0100)]
Modify multithreaded dts file of DynamIQ FVPs

The dts file now contains a CPU map that precisely describes the
topology including thread nodes. The map was also extended to have 16
PEs to be able to test multithreaded FVPs with 8 cores in the same
cluster.

Signed-off-by: Imre Kis <imre.kis@arm.com>
Change-Id: If39559b05d20bfd68d0ecf830ddcbc5233b288a0

5 years agoMerge "tools: Small improvement to print_memory_map script" into integration
Sandrine Bailleux [Wed, 26 Feb 2020 10:21:19 +0000 (10:21 +0000)]
Merge "tools: Small improvement to print_memory_map script" into integration

5 years agoMerge "uniphier: prepare uniphier_soc_info() for next SoC" into integration
Sandrine Bailleux [Wed, 26 Feb 2020 10:02:36 +0000 (10:02 +0000)]
Merge "uniphier: prepare uniphier_soc_info() for next SoC" into integration

5 years agoMerge "FVP: Fix incorrect GIC mapping" into integration
Olivier Deprez [Wed, 26 Feb 2020 09:52:31 +0000 (09:52 +0000)]
Merge "FVP: Fix incorrect GIC mapping" into integration

5 years agoMerge "allwinner: Implement PSCI system suspend using SCPI" into integration
Olivier Deprez [Wed, 26 Feb 2020 09:11:37 +0000 (09:11 +0000)]
Merge "allwinner: Implement PSCI system suspend using SCPI" into integration

5 years agoMerge "allwinner: Add a msgbox driver for use with SCPI" into integration
Olivier Deprez [Wed, 26 Feb 2020 09:09:22 +0000 (09:09 +0000)]
Merge "allwinner: Add a msgbox driver for use with SCPI" into integration

5 years agouniphier: prepare uniphier_soc_info() for next SoC
Masahiro Yamada [Mon, 3 Feb 2020 10:46:40 +0000 (19:46 +0900)]
uniphier: prepare uniphier_soc_info() for next SoC

The revision register address will be changed in the next SoC.

The LSI revision is needed in order to know where the revision
register is located, but you need to read out the revision
register for that. This is impossible.

We need to know the revision register address by other means.
Use BL_CODE_BASE, where the base address of the TF image that is
currently running. If it is bigger than 0x80000000 (i.e. the DRAM
base is 0x80000000), we assume it is a legacy SoC.

Change-Id: I9d7f4325fe2085a8a1ab5310025e5948da611256
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoMerge "allwinner: Reserve and map space for the SCP firmware" into integration
Olivier Deprez [Wed, 26 Feb 2020 08:35:10 +0000 (08:35 +0000)]
Merge "allwinner: Reserve and map space for the SCP firmware" into integration

5 years agoMerge "plat: imx8m: Fix the rdc memory region slot's offset" into integration
Sandrine Bailleux [Wed, 26 Feb 2020 08:33:39 +0000 (08:33 +0000)]
Merge "plat: imx8m: Fix the rdc memory region slot's offset" into integration

5 years agoMerge changes from topic "console_t_cleanup" into integration
Mark Dykes [Tue, 25 Feb 2020 23:39:33 +0000 (23:39 +0000)]
Merge changes from topic "console_t_cleanup" into integration

* changes:
  marvell: Consolidate console register calls
  uniphier: Use generic console_t data structure
  spe: Use generic console_t data structure
  LS 16550: Use generic console_t data structure
  stm32: Use generic console_t data structure
  rcar: Use generic console_t data structure
  a3700: Use generic console_t data structure
  16550: Use generic console_t data structure
  imx: Use generic console_t data structure

5 years agoMerge changes from topic "console_t_cleanup" into integration
Mark Dykes [Tue, 25 Feb 2020 23:38:46 +0000 (23:38 +0000)]
Merge changes from topic "console_t_cleanup" into integration

* changes:
  coreboot: Use generic base address
  skeletton: Use generic console_t data structure
  cdns: Use generic console_t data structure

5 years agoMerge "pl011: Use generic console_t data structure" into integration
Mark Dykes [Tue, 25 Feb 2020 23:16:14 +0000 (23:16 +0000)]
Merge "pl011: Use generic console_t data structure" into integration

5 years agoMerge "meson: Use generic console_t data structure" into integration
Mark Dykes [Tue, 25 Feb 2020 21:08:21 +0000 (21:08 +0000)]
Merge "meson: Use generic console_t data structure" into integration