]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
5 years agoFix MISRA C issues in BL1/BL2/BL31
John Powell [Fri, 20 Mar 2020 19:21:05 +0000 (14:21 -0500)]
Fix MISRA C issues in BL1/BL2/BL31

Attempts to address MISRA compliance issues in BL1, BL2, and BL31 code.
Mainly issues like not using boolean expressions in conditionals,
conflicting variable names, ignoring return values without (void), adding
explicit casts, etc.

Change-Id: If1fa18ab621b9c374db73fa6eaa6f6e5e55c146a
Signed-off-by: John Powell <john.powell@arm.com>
5 years agoMerge "Add support to pass the nt_fw_config DTB to OP-TEE." into integration
Alexei Fedorov [Wed, 1 Apr 2020 17:40:59 +0000 (17:40 +0000)]
Merge "Add support to pass the nt_fw_config DTB to OP-TEE." into integration

5 years agoMerge changes from topic "rpi_cpu_off" into integration
Manish Pandey [Wed, 1 Apr 2020 16:42:07 +0000 (16:42 +0000)]
Merge changes from topic "rpi_cpu_off" into integration

* changes:
  rpi: Implement PSCI CPU_OFF
  rpi: rpi3_pwr_domain_on(): Use MMIO accessor
  rpi: move plat_helpers.S to common

5 years agorpi: Implement PSCI CPU_OFF
Andrei Warkentin [Thu, 12 Mar 2020 05:11:06 +0000 (22:11 -0700)]
rpi: Implement PSCI CPU_OFF

We simulate the PSCI CPU_OFF operation by reseting the core via RMR.
For secondaries, that already puts them in the holding pen waiting for a
"warm boot" request as part of PSCI CPU_ON. For the BSP, we have to add
logic to distinguish a regular boot from a CPU_OFF state, where, like the
secondaries, the BSP needs to wait foor a "warm boot" request as part
of CPU_ON.

Testing done:

- ACS suite now passes more tests (since it repeatedly
calls code on secondaries via CPU_ON).

- Linux testing including offlining/onlineing CPU0, e.g.
"echo 0 > /sys/devices/system/cpu/cpu0/online".

Change-Id: Id0ae11a0ee0721b20fa2578b54dadc72dcbd69e0
Link: https://developer.trustedfirmware.org/T686
Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
[Andre: adapt to unified plat_helpers.S, smaller fixes]
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agorpi: rpi3_pwr_domain_on(): Use MMIO accessor
Andre Przywara [Sat, 21 Mar 2020 11:22:13 +0000 (11:22 +0000)]
rpi: rpi3_pwr_domain_on(): Use MMIO accessor

When writing to arbitrary locations in memory using a constructed
pointer, there is no guarantee that the compiler does not optimise away
the access, since it cannot detect any dependency.

One typical solution is to use the "volatile" keyword, but using MMIO
accessors in usually the better answer, to avoid torn writes.

Replace the usage of an array with such an MMIO accessor function in
rpi3_pwr_domain_on(), to make sure the write is really happening.

Change-Id: Ia18163c95e92f1557471089fd18abc6dc7fee0c7
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agorpi: move plat_helpers.S to common
Andre Przywara [Thu, 12 Mar 2020 14:20:04 +0000 (14:20 +0000)]
rpi: move plat_helpers.S to common

The plat_helpers.S file was almost identical between its RPi3 and RPi4
versions. Unify the two files, moving it into the common/ directory.

This adds a plat_rpi_get_model() function, which can be used to trigger
RPi4 specific action, detected at runtime. We use that to do the RPi4
specific L2 cache initialisation.

Change-Id: I2295704fd6dde7c76fe83b6d98c7bf998d4bf074
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agouniphier: support read-only xlat tables
Masahiro Yamada [Thu, 26 Mar 2020 04:18:48 +0000 (13:18 +0900)]
uniphier: support read-only xlat tables

BL2 for this platform uses mmap_add_dynamic_region(), but BL31 and
BL32 (TSP) only use static mapping. So, BL31 and BL32 can make the
tables read-only after enabling MMU.

Enable ALLOW_RO_XLAT_TABLES by default.

Change-Id: Ib59c44697163629119888bb6abd47fa144f09ba3
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agouniphier: use enable_mmu() in common function
Masahiro Yamada [Thu, 26 Mar 2020 04:18:48 +0000 (13:18 +0900)]
uniphier: use enable_mmu() in common function

Currently, enable_mmu_el1() or enable_mmu_el3() is kept outside the
common function because the appropriate one must be chosen.

Use enable_mmu() and move it to the common function.

Change-Id: If2fb651691a7b6be05674f5cf730ae067ba95d4b
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agodoc: Fix "unexpected indentation" warning.
Louis Mayencourt [Fri, 27 Mar 2020 11:49:20 +0000 (11:49 +0000)]
doc: Fix "unexpected indentation" warning.

Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
Change-Id: I521eed6466fdfef18a92f5237912cb402441044a

5 years agodoc: Update fconf uml diagrams
Louis Mayencourt [Fri, 27 Mar 2020 11:02:05 +0000 (11:02 +0000)]
doc: Update fconf uml diagrams

Update the plantuml diagrams to match the latest modification in fconf.

Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
Change-Id: I90f55bba0fd039a3f7e1bd39661cf849fccd64f5

5 years agoEnable MTE support
Manish V Badarkhe [Sun, 22 Mar 2020 05:06:38 +0000 (05:06 +0000)]
Enable MTE support

Enable MTE support by adding memory tag option in Makefile
This option is available only when ARMv8.5-MemTag is implemented

MTE options are added in latest clang and armclang compiler which
support below options:
for clang <version 11.0.0>
1. -march=arm8.5-a+memtag
2. -fsanitize=memtag

for armclang <version 6.12>
1. -march=arm8.5-a+memtag
2. -mmemtag-stack

Set the option SUPPORT_STACK_MEMTAG=yes to enable memory stack tagging.

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

5 years agoAdd support to pass the nt_fw_config DTB to OP-TEE.
Javier Almansa Sobrino [Mon, 10 Feb 2020 14:14:27 +0000 (14:14 +0000)]
Add support to pass the nt_fw_config DTB to OP-TEE.

At the moment, OP-TEE has no support to receive a DTB in Secure Memory
so it cannot receive TOS_FW_CONFIG_ID as it is supposed to happen on
any BL32 image. Instead, when OP-TEE is enable as BL32 payload,
NT_FW_CONFIG_ID is passed.

This MUST be reverted as soon as OP-TEE has support for receiving
DTBs from Secure Memory.

Change-Id: I9a873f42e94f2f99a60b638333e7afba1505aec9
Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
5 years agoMerge "doc: Fix broken external link for Odroid C2"
Sandrine Bailleux [Wed, 1 Apr 2020 07:21:51 +0000 (07:21 +0000)]
Merge "doc: Fix broken external link for Odroid C2"

5 years agoMerge "plat: imx: imx8qx: provide debug uart num as build param" into integration
Mark Dykes [Tue, 31 Mar 2020 21:27:39 +0000 (21:27 +0000)]
Merge "plat: imx: imx8qx: provide debug uart num as build param" into integration

5 years agoMerge "Update code freeze and release target date for 2.3" into integration
Mark Dykes [Tue, 31 Mar 2020 20:33:30 +0000 (20:33 +0000)]
Merge "Update code freeze and release target date for 2.3" into integration

5 years agoMerge "xlat_tables_v2: add enable_mmu()" into integration
Mark Dykes [Tue, 31 Mar 2020 19:56:31 +0000 (19:56 +0000)]
Merge "xlat_tables_v2: add enable_mmu()" into integration

5 years agoMerge "Add get_current_el_maybe_constant()" into integration
Mark Dykes [Tue, 31 Mar 2020 19:55:44 +0000 (19:55 +0000)]
Merge "Add get_current_el_maybe_constant()" into integration

5 years agoMerge "Build: define IMAGE_AT_EL1 or IMAGE_AT_EL3 globally for C files" into integration
Mark Dykes [Tue, 31 Mar 2020 19:55:06 +0000 (19:55 +0000)]
Merge "Build: define IMAGE_AT_EL1 or IMAGE_AT_EL3 globally for C files" into integration

5 years agoUpdate code freeze and release target date for 2.3
laurenw-arm [Tue, 31 Mar 2020 19:20:25 +0000 (14:20 -0500)]
Update code freeze and release target date for 2.3

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

5 years agoMerge "fconf: exclude fconf_dyn_cfg_getter.c from BL1_SOURCES" into integration
Mark Dykes [Tue, 31 Mar 2020 18:50:44 +0000 (18:50 +0000)]
Merge "fconf: exclude fconf_dyn_cfg_getter.c from BL1_SOURCES" into integration

5 years agoMerge "bl32: sp_min: reduce the alignment for fconf_populator" into integration
Mark Dykes [Tue, 31 Mar 2020 18:50:20 +0000 (18:50 +0000)]
Merge "bl32: sp_min: reduce the alignment for fconf_populator" into integration

5 years agoMerge "plat: pass -D option to BL*_CPPFLAGS instead of BL*_CFLAGS" into integration
Mark Dykes [Tue, 31 Mar 2020 18:49:48 +0000 (18:49 +0000)]
Merge "plat: pass -D option to BL*_CPPFLAGS instead of BL*_CFLAGS" into integration

5 years agoMerge "Build: introduce per-BL CPPFLAGS and ASFLAGS" into integration
Mark Dykes [Tue, 31 Mar 2020 18:48:00 +0000 (18:48 +0000)]
Merge "Build: introduce per-BL CPPFLAGS and ASFLAGS" into integration

5 years agodoc: Fix broken external link for Odroid C2
Heinrich Schuchardt [Tue, 31 Mar 2020 18:38:01 +0000 (20:38 +0200)]
doc: Fix broken external link for Odroid C2

The file README.odroid-c2 has been moved in the U-Boot repository.

Reference the official uplink repository.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Change-Id: Ie72c7aefd6363a406f88ad2c87faee1c7a2125a3

5 years agoMerge "Create separate header for ARM specific SMCCC defines" into integration
Olivier Deprez [Tue, 31 Mar 2020 14:16:40 +0000 (14:16 +0000)]
Merge "Create separate header for ARM specific SMCCC defines" into integration

5 years agoMerge "Makefile: don't use $(CC) before value is explicit set" into integration
Sandrine Bailleux [Tue, 31 Mar 2020 14:00:10 +0000 (14:00 +0000)]
Merge "Makefile: don't use $(CC) before value is explicit set" into integration

5 years agoMakefile: don't use $(CC) before value is explicit set
Ahmad Fatoum [Tue, 25 Feb 2020 10:25:08 +0000 (11:25 +0100)]
Makefile: don't use $(CC) before value is explicit set

Unless specified in the environment, $(CC) expands to some generic
host C compiler like cc or c99. We set our own value for $(CC), but
only few lines later.

Move the first use of the $(CC) variable behind the definition to
correct this.

Change-Id: I45344e063d21ddfe22b7ad77954e85c1c46087bd
Fixes: 1684b8733 ("Use clang assembler when clang compiler is used")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
5 years agoMerge "TF-A GICv3 driver: Introduce makefile" into integration
Manish Pandey [Tue, 31 Mar 2020 11:22:38 +0000 (11:22 +0000)]
Merge "TF-A GICv3 driver: Introduce makefile" into integration

5 years agoMerge "Tegra: fixup GIC init from the 'on_finish' handler" into integration
Sandrine Bailleux [Tue, 31 Mar 2020 07:42:46 +0000 (07:42 +0000)]
Merge "Tegra: fixup GIC init from the 'on_finish' handler" into integration

5 years agoMerge "Tegra186: increase memory mapped regions" into integration
Sandrine Bailleux [Tue, 31 Mar 2020 07:38:26 +0000 (07:38 +0000)]
Merge "Tegra186: increase memory mapped regions" into integration

5 years agofconf: exclude fconf_dyn_cfg_getter.c from BL1_SOURCES
Masahiro Yamada [Tue, 31 Mar 2020 05:21:59 +0000 (14:21 +0900)]
fconf: exclude fconf_dyn_cfg_getter.c from BL1_SOURCES

fconf_dyn_cfg_getter.c calls FCONF_REGISTER_POPULATOR(), which populates
the fconf_populator structure.

However, bl1/bl1.ld.S does not have:

        __FCONF_POPULATOR_START__ = .;
        KEEP(*(.fconf_populator))
        __FCONF_POPULATOR_END__ = .;

So, this is not linked to bl1.elf

We could change either bl1/bl1.lds.S or lib/fconf/fconf.mk to make
them consistent.

I chose to fix up fconf.mk to keep the current behavior.

This is a groundwork to factor out the common code from linker scripts.

Change-Id: I07b7ad4db4ec77b57acf1588fffd0b06306d7293
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agobl32: sp_min: reduce the alignment for fconf_populator
Masahiro Yamada [Wed, 25 Mar 2020 11:52:44 +0000 (20:52 +0900)]
bl32: sp_min: reduce the alignment for fconf_populator

sp_min.ld.S is used for aarch32.

ALIGN(4) is used for alignment of the other structures. I do not think
struct fconf_populator is a special case. Let's use ALIGN(4) here too.

Perhaps, this is just a copy-paste mistake of commit 26d1e0c33098
("fconf: necessary modifications to support fconf in BL31 & SP_MIN").

Change-Id: I29f4c68680842c1b5ef913934b4ccf378e9bfcfb
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoplat: pass -D option to BL*_CPPFLAGS instead of BL*_CFLAGS
Masahiro Yamada [Wed, 25 Mar 2020 08:50:39 +0000 (17:50 +0900)]
plat: pass -D option to BL*_CPPFLAGS instead of BL*_CFLAGS

-D is a preprocessor flag that defines a macro. So, adding it to
BL*_CPPFLAGS makes more sense. You can reference it not only from
.c files but also from .S files.

Change-Id: Ib4f2f27a3ed3eae476a6a32da7ab5225ad0649de
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoBuild: introduce per-BL CPPFLAGS and ASFLAGS
Masahiro Yamada [Wed, 25 Mar 2020 07:55:28 +0000 (16:55 +0900)]
Build: introduce per-BL CPPFLAGS and ASFLAGS

Currently, BL*_CFLAGS and BL*_LDFLAGS are supported.

For completion, this adds BL*_CPPFLAGS and BL*_ASFLAGS.

My main motivation is to pass -D<macro> to BL*_CPPFLAGS so that
the macro can be used from all source files.

Change-Id: I0ca1e4e26386bef7fed999af140ee7cce7c2f8ef
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoxlat_tables_v2: add enable_mmu()
Masahiro Yamada [Thu, 26 Mar 2020 04:18:48 +0000 (13:18 +0900)]
xlat_tables_v2: add enable_mmu()

enable_mmu_* has a different function name, so it is not handy in the
shared code. enable_mmu() calls an appropriate one depending on the
exception level.

Change-Id: I0657968bfcb91c32733f75f9259f550a5c35b1c3
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoAdd get_current_el_maybe_constant()
Masahiro Yamada [Thu, 26 Mar 2020 04:18:48 +0000 (13:18 +0900)]
Add get_current_el_maybe_constant()

There are some cases where we want to run EL-dependent code in the
shared code.

We could use #ifdef, but it leaves slight possibility where we do not
know the exception level at the build-time (e.g. library code).

The counter approach is to use get_current_el(), but it is run-time
detection, so all EL code is linked, some of which might be unneeded.

This commit adds get_current_el_maybe_constant(). This is a static
inline function that returns a constant value if we know the exception
level at build-time. This is mostly the case.

    if (get_current_el_maybe_constant() == 1) {
            /* do something for EL1 */
    } else if (get_current_el_maybe_constant() == 3) {
            /* do something for EL3 */
    }

If get_current_el_maybe_constant() is build-time constant, the compiler
will optimize out the unreachable code.

If such code is included from the library code, it is not built-time
constant. In this case, it falls back to get_current_el(), so it still
works.

Change-Id: Idb03c20342a5b5173fe2d6b40e1fac7998675ad3
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoBuild: define IMAGE_AT_EL1 or IMAGE_AT_EL3 globally for C files
Masahiro Yamada [Thu, 26 Mar 2020 04:18:48 +0000 (13:18 +0900)]
Build: define IMAGE_AT_EL1 or IMAGE_AT_EL3 globally for C files

The build system defines the IMAGE_BL* macro when compiling each image.
This is useful to distinguish which image the current file is being
built for by using #if defined(IMAGE_BL2) or #if defined(IMAGE_BL31),
or whatever.

There are some cases where we are more interested in which exception
level the current file is being built for.

include/lib/cpus/{aarch32,aarch64}/cpu_macros.S defines IMAGE_AT_EL3,
but we do not have it globally.

Pass IMAGE_AT_EL1 or IMAGE_AT_EL3 to BL*_CFLAGS so that it is available
from all C code.

The library code (libc.a, libmbedtls.a, etc.) is exceptional cases,
where the code can be shared between BL images.

Other than that, we know the exception level at the build time, and
this macro will be useful in the shared code.

Change-Id: I7c8a1da10726906adfba981cfe8464dff111d6b0
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoMerge "plat/sgm775: Add support for dynamic config using fconf" into integration
Manish Pandey [Mon, 30 Mar 2020 21:41:50 +0000 (21:41 +0000)]
Merge "plat/sgm775: Add support for dynamic config using fconf" into integration

5 years agoplat/sgm775: Add support for dynamic config using fconf
Madhukar Pappireddy [Fri, 27 Mar 2020 17:52:22 +0000 (12:52 -0500)]
plat/sgm775: Add support for dynamic config using fconf

1. Necessary changes to platform makefile to include fw_config
device tree and package it in fip.bin

2. Removed hw_config node from fw_config dts as there is no
HW_CONFIG device tree source for sgm775

3. Added mbedtls_heap related properties for TBBR functionality

Change-Id: I26b940c65b17ad2fb5537141f8649785bb0fd4ad
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
5 years agoMerge "Flush dcache when storing timestamp" into integration
Olivier Deprez [Mon, 30 Mar 2020 15:29:00 +0000 (15:29 +0000)]
Merge "Flush dcache when storing timestamp" into integration

5 years agoMerge changes from topic "ddr_map" into integration
Olivier Deprez [Mon, 30 Mar 2020 15:27:32 +0000 (15:27 +0000)]
Merge changes from topic "ddr_map" into integration

* changes:
  stm32mp1: use stm32mp_get_ddr_ns_size() function
  stm32mp1: set XN attribute for some areas in BL2
  stm32mp1: dynamically map DDR later and non-cacheable during its test
  stm32mp1: add a function to get non-secure DDR size

5 years agoCreate separate header for ARM specific SMCCC defines
Manish V Badarkhe [Fri, 27 Mar 2020 13:25:51 +0000 (13:25 +0000)]
Create separate header for ARM specific SMCCC defines

Moved SMCCC defines from plat_arm.h to new <smccc_def.h> header
and include this header in all ARM platforms.

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

5 years agoTF-A GICv3 driver: Introduce makefile
Alexei Fedorov [Mon, 23 Mar 2020 18:45:17 +0000 (18:45 +0000)]
TF-A GICv3 driver: Introduce makefile

This patch moves all GICv3 driver files into new added
'gicv3.mk' makefile for the benefit of the generic driver
which can evolve in the future without affecting platforms.
The patch adds GICv3 driver configuration flags
'GICV3_IMPL', 'GICV3_IMPL_GIC600_MULTICHIP' and
'GICV3_OVERRIDE_DISTIF_PWR_OPS' described in
'GICv3 driver options' section of 'build-option.rst'
document.

NOTE: Platforms with GICv3 driver need to be modified to
include 'drivers/arm/gic/v3/gicv3.mk' in their makefiles.

Change-Id: If055f6770ff20f5dee5a3c99ae7ced7cdcac5c44
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoMerge "plat/arm/sgi: fix the incorrect check for SCMI channel ID" into integration
Manish Pandey [Fri, 27 Mar 2020 21:24:33 +0000 (21:24 +0000)]
Merge "plat/arm/sgi: fix the incorrect check for SCMI channel ID" into integration

5 years agoplat/arm/sgi: fix the incorrect check for SCMI channel ID
Aditya Angadi [Tue, 11 Feb 2020 10:16:24 +0000 (15:46 +0530)]
plat/arm/sgi: fix the incorrect check for SCMI channel ID

Use ARRAY_SIZE macro instead of sizeof operator to obtain the maximum
number of SCMI channels supported on the platform.

Change-Id: Id922bb548af98ac99b4ac0c34e38e589e5a80b2d
Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
5 years agoMerge changes from topic "os/bl31-fpga-port" into integration
Manish Pandey [Fri, 27 Mar 2020 17:54:21 +0000 (17:54 +0000)]
Merge changes from topic "os/bl31-fpga-port" into integration

* changes:
  plat/arm/board/arm_fpga: Compile with additional CPU libraries
  plat/arm/board/arm_fpga: Enable position-independent execution
  plat/arm/board/arm_fpga: Enable port for alternative cluster configurations
  plat/arm/board/arm_fpga: Initialize the Generic Interrupt Controller
  plat/arm/board/arm_fpga: Initialize the System Counter
  plat/arm/board/arm_fpga: Add PSCI implementation for FPGA images
  plat/arm/board/arm_fpga: Use preloaded BL33 alternative boot flow
  plat/arm/board/arm_fpga: Enable basic BL31 port for an FPGA image

5 years agoMerge "Changelog updates for recent commits" into integration
Manish Pandey [Fri, 27 Mar 2020 17:48:31 +0000 (17:48 +0000)]
Merge "Changelog updates for recent commits" into integration

5 years agoMerge "doc: add spm and spmd related build options" into integration
Manish Pandey [Fri, 27 Mar 2020 16:17:51 +0000 (16:17 +0000)]
Merge "doc: add spm and spmd related build options" into integration

5 years agoFlush dcache when storing timestamp
Zelalem [Thu, 26 Mar 2020 21:15:34 +0000 (16:15 -0500)]
Flush dcache when storing timestamp

On DynamIQ CPU FVPs, stats test cases are failing when
hardware-assisted coherency is enabled due to a corrupt
timestamp value. Investigation of the issue indicates that
on these models the timestamp value is stored in cache
instead of memory. This patch flushes the dcache when the
timestamp is stored to make sure it is stored in memory.

Change-Id: I05cd54ba5991a5a96dd07f1e08b5212273201411
Signed-off-by: Zelalem <zelalem.aweke@arm.com>
5 years agoMerge "fconf: notify if fw_config dt is not used" into integration
Olivier Deprez [Fri, 27 Mar 2020 13:13:16 +0000 (13:13 +0000)]
Merge "fconf: notify if fw_config dt is not used" into integration

5 years agodoc: add spm and spmd related build options
Olivier Deprez [Thu, 26 Mar 2020 15:09:21 +0000 (16:09 +0100)]
doc: add spm and spmd related build options

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

5 years agofconf: notify if fw_config dt is not used
Manish Pandey [Thu, 26 Mar 2020 21:46:53 +0000 (21:46 +0000)]
fconf: notify if fw_config dt is not used

Notify if fw_config dt is either not available or not loaded from fip.

Change-Id: I4dfcbe5032503d97f532a3287c5312c581578b68
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
5 years agoplat/arm/board/arm_fpga: Compile with additional CPU libraries
Oliver Swede [Wed, 15 Jan 2020 10:20:09 +0000 (10:20 +0000)]
plat/arm/board/arm_fpga: Compile with additional CPU libraries

This change is part of the goal of enabling the port to be compatible
with multiple FPGA images.

BL31 behaves differently depending on whether or not the CPUs in the
system use cache coherency, and as a result any CPU libraries that are
compiled together must serve processors that are consistent in this
regard.

This compiles a different set of CPU libraries depending on whether or
not the HW_ASSISTED_COHERENCY is enabled at build-time to indicate the
CPUs support hardware-level support for cache coherency. This build
flag is used in the makefile in the same way as the Arm FVP port.

Signed-off-by: Oliver Swede <oli.swede@arm.com>
Change-Id: I18300b4443176b89767015e3688c0f315a91c27e

5 years agoplat/arm/board/arm_fpga: Enable position-independent execution
Oliver Swede [Tue, 7 Jan 2020 14:43:01 +0000 (14:43 +0000)]
plat/arm/board/arm_fpga: Enable position-independent execution

This allows the BL31 port to run with position-independent execution
enabled so that it can be ran from any address in the system.
This increases the flexibility of the image, allowing it to be ran from
other locations rather than only its hardcoded absolute address
(currently set to the typical DRAM base of 2GB). This may be useful for
future images that describe system configurations with other memory
layouts (e.g. where SRAM is included).

It does this by setting ENABLE_PIE=1 and changing the absolute
address to 0. The load address of bl31.bin can then be specified by
the -l [load address] argument in the fpga-run command (additionally,
this address is required by any preceding payloads that specify the
start address. For ELF payloads this is usually extracted automatically
by reading the entrypoint address in the header, however bl31.bin is a
different file format so has this additional dependency).

Signed-off-by: Oliver Swede <oli.swede@arm.com>
Change-Id: Idd74787796ab0cf605fe2701163d9c4b3223a143

5 years agoplat/arm/board/arm_fpga: Enable port for alternative cluster configurations
Oliver Swede [Mon, 16 Dec 2019 14:08:27 +0000 (14:08 +0000)]
plat/arm/board/arm_fpga: Enable port for alternative cluster configurations

This change is part of the goal of enabling the port to be compatible
with multiple FPGA images.

The BL31 port that is uploaded as a payload to the FPGA with an image
should cater for a wide variety of system configurations. This patch
makes the necessary changes to enable it to function with images whose
cluster configurations may be larger (either by utilizing more
clusters, more CPUs per cluster, more threads in each CPU, or a
combination) than the initial image being used for testing.

As part of this, the hard-coded values that configure the size of the
array describing the topology of the power domain tree are increased
to max. 8 clusters, max. 8 cores per cluster & max 4 threads per core.
This ensures the port works with cluster configurations up to these
sizes. When there are too many entries for the number of available PEs,
e.g. if there is a variable number of CPUs between clusters, then there
will be empty entries in the array. This is permitted and the PSCI
library will still function as expected. While this increases its size,
this shouldn't be an issue in the context of the size of BL31, and is
worth the trade-off for the extra compatibility.

Signed-off-by: Oliver Swede <oli.swede@arm.com>
Change-Id: I7d4ae1e20b2e99fdbac428d122a2cf9445394363

5 years agoplat/arm/board/arm_fpga: Initialize the Generic Interrupt Controller
Oliver Swede [Tue, 3 Dec 2019 14:08:21 +0000 (14:08 +0000)]
plat/arm/board/arm_fpga: Initialize the Generic Interrupt Controller

This initializes the GIC using the Arm GIC drivers in TF-A.
The initial FPGA image uses a GIC600 implementation, and so that its
power controller is enabled, this platform port calls the corresponding
implementation-specific routines.

Signed-off-by: Oliver Swede <oli.swede@arm.com>
Change-Id: I88d5a073eead4b653b1ca73273182cd98a95e4c5

5 years agoplat/arm/board/arm_fpga: Initialize the System Counter
Oliver Swede [Mon, 2 Dec 2019 13:33:40 +0000 (13:33 +0000)]
plat/arm/board/arm_fpga: Initialize the System Counter

This sets the frequency of the system counter so that the Delay Timer
driver programs the correct value to CNTCRL. This value depends on
the FPGA image being used, and is 10MHz for the initial test image.
Once configured, the BL31 platform setup sequence then enables the
system counter.

Signed-off-by: Oliver Swede <oli.swede@arm.com>
Change-Id: Ieb036a36fd990f350b5953357424a255b8ac5d5a

5 years agoplat/arm/board/arm_fpga: Add PSCI implementation for FPGA images
Oliver Swede [Mon, 2 Dec 2019 13:21:52 +0000 (13:21 +0000)]
plat/arm/board/arm_fpga: Add PSCI implementation for FPGA images

This adds a basic PSCI implementation allow secondary CPUs to be
released from an initial state and continue through to the warm boot
entrypoint.

Each secondary CPU is kept in a holding pen, whereby it polls the value
representing its hold state, by reading this from an array that acts as
a table for all the PEs. The hold states are initially set to 0 for all
cores to indicate that the executing core should continue polling.
To prevent the secondary CPUs from interfering with the platform's
initialization, they are only updated by the primary CPU once the cold
boot sequence has completed and fpga_pwr_domain_on(mpidr) is called.
The polling target CPU will then read 1 (which indicates that it should
branch to the warm reset entrypoint) and then jump to that address
rather than continue polling.

In addition to the initial polling behaviour of the secondary CPUs
before their warm boot reset sequence, they are also placed in a
low-power wfe() state at the end of each poll; accordingly, the PSCI
fpga_pwr_domain_on(mpidr) function also signals an event to all cores
(after updating the target CPU's hold entry) to wake them from this
state, allowing any secondary CPUs that are still polling to check
their hold state again.
This method is in accordance with both the PSCI and Linux kernel
recommendations, as the lessened overhead reduces the energy
consumption associated with the busy-loop.

The table of hold entries is implemented by a global array as shared SRAM
(which is used by other platforms in similar implementations) is not
available on the FPGA images.

Signed-off-by: Oliver Swede <oli.swede@arm.com>
Change-Id: I65cfd1892f8be1dfcb285f0e1e94e7a9870cdf5a

5 years agoplat/arm/board/arm_fpga: Use preloaded BL33 alternative boot flow
Oliver Swede [Mon, 11 Nov 2019 11:32:32 +0000 (11:32 +0000)]
plat/arm/board/arm_fpga: Use preloaded BL33 alternative boot flow

This makes use of the PRELOADED_BL33_BASE flag to indicate to BL31 that
the BL33 payload (kernel) has already been loaded and resides in memory;
BL31 will then jump to the non-secure address.

For this port the BL33 payload is the Linux kernel, and in accordance
with the pre-kernel setup requirements (as specified in the `Booting
AArch64 Linux' documentation:
https://www.kernel.org/doc/Documentation/arm64/booting.txt),
this change also sets up the primary CPU's registers x0-x3 so they are
the expected values, which includes the address of the DTB at x0.

An external linker script is currently required to combine BL31, the
BL33 payload, and any other software images to create an ELF file that
can be uploaded to the FPGA board along with the bit file. It therefore
has dependencies on the value of PRELOADED_BL33_BASE (kernel base) and
the DTB base (plus any other relevant base addresses used to
distinguish the different ELF sections), both of which are set in this
patch.

Signed-off-by: Oliver Swede <oli.swede@arm.com>
Change-Id: If7ae8ee82d1e09fb05f553f6077ae13680dbf66b

5 years agoplat/arm/board/arm_fpga: Enable basic BL31 port for an FPGA image
Oliver Swede [Mon, 11 Nov 2019 11:11:06 +0000 (11:11 +0000)]
plat/arm/board/arm_fpga: Enable basic BL31 port for an FPGA image

This adds the minimal functions and definitions to create a basic
BL31 port for an initial FPGA image, in order for the port to be
uploaded to one the FPGA boards operated by an internal group within
Arm, such that BL31 runs as a payload for an image.

Future changes will enable the port for a wide range of system
configurations running on the FPGA boards to ensure compatibility with
multiple FPGA images.

It is expected that this will replace the FPGA fork of the Linux kernel
bootwrapper by performing similar secure-world initialization and setup
through the use of drivers and other well-established methods, before
passing control to the kernel, which will act as the BL33 payload and
run in EL2NS.

This change introduces a basic, loadable port with the console
initialized by setting the baud rate and base address of the UART as
configured by the Zeus image.

It is a BL31-only port, and RESET_TO_BL31 is enabled to reflect this.

Signed-off-by: Oliver Swede <oli.swede@arm.com>
Change-Id: I1817ad81be00afddcdbbda1ab70eb697203178e2

5 years agoMerge "FVP: Add BL2 hash calculation in BL1" into integration
Mark Dykes [Thu, 26 Mar 2020 18:17:21 +0000 (18:17 +0000)]
Merge "FVP: Add BL2 hash calculation in BL1" into integration

5 years agostm32mp1: use stm32mp_get_ddr_ns_size() function
Yann Gautier [Wed, 26 Feb 2020 12:36:07 +0000 (13:36 +0100)]
stm32mp1: use stm32mp_get_ddr_ns_size() function

Instead of using dt_get_ddr_size() and withdrawing the secure and shared
memory areas, use stm32mp_get_ddr_ns_size() function.

Change-Id: I5608fd7873589ea0e1262ba7d2ee3e52b53d9a7d
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agostm32mp1: set XN attribute for some areas in BL2
Yann Gautier [Tue, 17 Dec 2019 16:11:10 +0000 (17:11 +0100)]
stm32mp1: set XN attribute for some areas in BL2

DTB and BL32 area should not be set as executable in MMU during BL2
execution, hence set those areas as MT_RO_DATA.

Change-Id: I87c47a1e7fda761e541ec98a5b294588384d31db
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agostm32mp1: dynamically map DDR later and non-cacheable during its test
Yann Gautier [Fri, 10 Jan 2020 17:18:59 +0000 (18:18 +0100)]
stm32mp1: dynamically map DDR later and non-cacheable during its test

A speculative accesses to DDR could be done whereas it was not reachable
and could lead to bus stall.
To correct this the dynamic mapping in MMU is used.
A first mapping is done for DDR tests with MT_NON_CACHEABLE attribute,
once DDR access is setup. It is then unmapped and a new mapping DDR is done
with cacheable attribute (through MT_MEMORY) to speed-up BL33 (or OP-TEE)
load.

The disabling of cache during DDR tests is also removed, as now useless.
A call to new functions stm32mp_{,un}map_ddr_non_cacheable() is done
instead.

PLAT_XLAT_TABLES_DYNAMIC is activated globally as used in BL2 and BL32.

BL33 max size is also updated to take into account the secure and shared
memory areas. Those are used in OP-TEE case.

Change-Id: I22c48b4a48255ee264991c34ecbb15bfe87e67c3
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agostm32mp1: add a function to get non-secure DDR size
Yann Gautier [Wed, 26 Feb 2020 12:39:44 +0000 (13:39 +0100)]
stm32mp1: add a function to get non-secure DDR size

This function gets the DDR size from DT, and withdraws (if defined) the
sizes of secure DDR and shared memory areas.
This function also checks DT values fits the default DDR range.
This non-secure memory is available for BL33 and non-secure OS.

Change-Id: I162ae5e990a0f9b6b7d07e539de029f1d61a391b
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agoMerge "Fix warnings in porting-guide.rst" into integration
Olivier Deprez [Thu, 26 Mar 2020 17:12:18 +0000 (17:12 +0000)]
Merge "Fix warnings in porting-guide.rst" into integration

5 years agoMerge "Tegra194: se: increase max. operation timeout to 1 second" into integration
Sandrine Bailleux [Thu, 26 Mar 2020 17:00:38 +0000 (17:00 +0000)]
Merge "Tegra194: se: increase max. operation timeout to 1 second" into integration

5 years agoFix warnings in porting-guide.rst
Manish V Badarkhe [Thu, 26 Mar 2020 14:20:27 +0000 (14:20 +0000)]
Fix warnings in porting-guide.rst

Fix below warnings appeared in porting-guide.rst
WARNING: Title underline too short.

Change-Id: Ibc0eba0da72a53a5f9b61c49a8bf7a10b17bc3b8
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
5 years agoMerge changes I250c3aa1,Icf816053 into integration
Sandrine Bailleux [Thu, 26 Mar 2020 15:21:20 +0000 (15:21 +0000)]
Merge changes I250c3aa1,Icf816053 into integration

* changes:
  changelog: introduce SPMD, add secure partition loading and tooling
  changelog: add debugfs functionality

5 years agochangelog: introduce SPMD, add secure partition loading and tooling
Olivier Deprez [Thu, 26 Mar 2020 10:16:46 +0000 (11:16 +0100)]
changelog: introduce SPMD, add secure partition loading and tooling

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

5 years agochangelog: add debugfs functionality
Olivier Deprez [Thu, 26 Mar 2020 09:10:52 +0000 (10:10 +0100)]
changelog: add debugfs functionality

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

5 years agoTegra186: increase memory mapped regions
Varun Wadekar [Wed, 25 Mar 2020 23:19:39 +0000 (16:19 -0700)]
Tegra186: increase memory mapped regions

This patch increases MAX_MMAP_REGIONS to 30 to accommodate the
additional dynamic memory mapped region, during Trusty boot.

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

5 years agoFVP: Add BL2 hash calculation in BL1
Alexei Fedorov [Fri, 20 Mar 2020 18:38:55 +0000 (18:38 +0000)]
FVP: Add BL2 hash calculation in BL1

This patch provides support for measured boot by adding calculation
of BL2 image hash in BL1 and writing these data in TB_FW_CONFIG DTB.

Change-Id: Ic074a7ed19b14956719c271c805b35d147b7cec1
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoMerge "Fix 'tautological-constant-compare' error" into integration
Mark Dykes [Wed, 25 Mar 2020 15:39:26 +0000 (15:39 +0000)]
Merge "Fix 'tautological-constant-compare' error" into integration

5 years agoFix 'tautological-constant-compare' error
Manish V Badarkhe [Sun, 22 Mar 2020 04:23:24 +0000 (04:23 +0000)]
Fix 'tautological-constant-compare' error

Fixed below 'tautological-constant-compare' error when building the source
code with latest clang compiler <clang version 11.0.0>.

plat/common/plat_psci_common.c:36:2:
error: converting the result of '<<' to a boolean always evaluates
to true [-Werror,-Wtautological-constant-compare]
        PMF_STORE_ENABLE)
        ^
include/lib/pmf/pmf.h:28:29: note: expanded from macro 'PMF_STORE_ENABLE'
PMF_STORE_ENABLE        (1 << 0)

This error is observed beacuse of CASSERT placed in
"PMF_DEFINE_CAPTURE_TIMESTAMP" which do below stuff:
CASSERT(_flags, select_proper_config);
where _flags = PMF_STORE_ENABLE (1 << 0) which always results true.

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

5 years agoMerge "spm: Add spci manifest binding document" into integration
Manish Pandey [Tue, 24 Mar 2020 23:06:53 +0000 (23:06 +0000)]
Merge "spm: Add spci manifest binding document" into integration

5 years agoMerge "fconf: Clean Arm IO" into integration
Mark Dykes [Tue, 24 Mar 2020 18:14:24 +0000 (18:14 +0000)]
Merge "fconf: Clean Arm IO" into integration

5 years agoMerge "plat/sgi: Bump bl1 RW limit" into integration
Mark Dykes [Tue, 24 Mar 2020 18:13:31 +0000 (18:13 +0000)]
Merge "plat/sgi: Bump bl1 RW limit" into integration

5 years agoMerge "corstone700: updating the kernel arguments to support initramfs" into integration
Mark Dykes [Tue, 24 Mar 2020 15:20:42 +0000 (15:20 +0000)]
Merge "corstone700: updating the kernel arguments to support initramfs" into integration

5 years agoMerge "context: TPIDR_EL2 register not saved/restored" into integration
Manish Pandey [Tue, 24 Mar 2020 11:22:28 +0000 (11:22 +0000)]
Merge "context: TPIDR_EL2 register not saved/restored" into integration

5 years agocorstone700: updating the kernel arguments to support initramfs
Abdellatif El Khlifi [Tue, 24 Mar 2020 11:04:17 +0000 (11:04 +0000)]
corstone700: updating the kernel arguments to support initramfs

In the context of enabling initramfs this change makes
the kernel arguments compatible with the initramfs requirements

Change-Id: Ifa955a5790ae1398fd8ad9ca1c8272f019c121a6
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
5 years agoMerge "spmd: skip loading of secure partitions on pre-v8.4 platforms" into integration
Alexei Fedorov [Tue, 24 Mar 2020 11:06:08 +0000 (11:06 +0000)]
Merge "spmd: skip loading of secure partitions on pre-v8.4 platforms" into integration

5 years agoTegra194: se: increase max. operation timeout to 1 second
Varun Wadekar [Sun, 22 Mar 2020 22:58:02 +0000 (15:58 -0700)]
Tegra194: se: increase max. operation timeout to 1 second

This patch increases the maximum timeout value for SE operation
completion to 1 second. This takes care of some corner cases where
an operation might take more time than the previous timeout value
of 100ms.

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

5 years agospmd: skip loading of secure partitions on pre-v8.4 platforms
Olivier Deprez [Thu, 19 Mar 2020 08:27:11 +0000 (09:27 +0100)]
spmd: skip loading of secure partitions on pre-v8.4 platforms

When SPD=spmd and SPMD_SPM_AT_SEL2=0, that is SPMC sits at S-EL1
then there is no need for TF-A to load secure partitions individually.
In this configuration, SPMC handles secure partition loading at
S-EL1/EL0 levels.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I06a0d88a4811274a8c347ce57b56bb5f64e345df

5 years agoMerge changes from topic "static_analysis" into integration
Manish Pandey [Mon, 23 Mar 2020 17:37:48 +0000 (17:37 +0000)]
Merge changes from topic "static_analysis" into integration

* changes:
  io: io_stm32image: correct possible NULL pointer dereference
  plat/st: correctly check pwr-regulators node
  nand: stm32_fmc2_nand: correct xor_ecc.val assigned value
  plat/st: correct static analysis tool warning
  raw_nand: correct static analysis tool warning
  spi: stm32_qspi: correct static analysis issues

5 years agoio: io_stm32image: correct possible NULL pointer dereference
Yann Gautier [Wed, 18 Mar 2020 13:50:50 +0000 (14:50 +0100)]
io: io_stm32image: correct possible NULL pointer dereference

This issue was found with cppcheck in our downstream code:
[drivers/st/io/io_stm32image.c:234] -> [drivers/st/io/io_stm32image.c:244]:
 (warning) Either the condition 'buffer!=0U' is redundant or there is
 possible null pointer dereference: local_buffer.

Change-Id: Ieb615b7e485dc93bbeeed4cd8bf845eb84c14ac9
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agoplat/st: correctly check pwr-regulators node
Yann Gautier [Wed, 18 Mar 2020 13:35:27 +0000 (14:35 +0100)]
plat/st: correctly check pwr-regulators node

This warning was issued by cppcheck in our downstream code:
[plat/st/common/stm32mp_dt.c:629] -> [plat/st/common/stm32mp_dt.c:634]:
 (warning) Identical condition 'node<0', second condition is always false

The second test has to check variable pwr_regulators_node.

Change-Id: I4a20c4a3ac0ef0639c2df36309d90a61c02b511f
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agonand: stm32_fmc2_nand: correct xor_ecc.val assigned value
Yann Gautier [Wed, 18 Mar 2020 13:07:55 +0000 (14:07 +0100)]
nand: stm32_fmc2_nand: correct xor_ecc.val assigned value

The variable is wrongly set to 0L, whereas it is an unsigned int, it should
then be 0U.

Change-Id: I0b164c0ea598ec8a503f1693da2f3789f59da238
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agoplat/st: correct static analysis tool warning
Yann Gautier [Wed, 11 Mar 2020 16:17:51 +0000 (17:17 +0100)]
plat/st: correct static analysis tool warning

Correct the following sparse warnings:
plat/st/common/stm32mp_dt.c:103:5: warning:
 symbol 'fdt_get_node_parent_address_cells' was not declared.
 Should it be static?
plat/st/common/stm32mp_dt.c:123:5: warning:
 symbol 'fdt_get_node_parent_size_cells' was not declared.
 Should it be static?

As those 2 functions are only used by assert(), put them under
ENABLE_ASSERTIONS flag.

Change-Id: Iad721f12128df83a3de3f53e7920a9c1dce64c56
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agoraw_nand: correct static analysis tool warning
Yann Gautier [Wed, 11 Mar 2020 16:16:49 +0000 (17:16 +0100)]
raw_nand: correct static analysis tool warning

Correct the following warning given by sparse tool:
include/drivers/raw_nand.h:158:3: warning:
 symbol '__packed' was not declared. Should it be static?

Change-Id: I03bd9a8aee5cdc5212ce5225be8033f1a6e92bd9
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agospi: stm32_qspi: correct static analysis issues
Yann Gautier [Wed, 11 Mar 2020 16:09:21 +0000 (17:09 +0100)]
spi: stm32_qspi: correct static analysis issues

Sparse issue:
drivers/st/spi/stm32_qspi.c:445:5:
 warning: symbol 'stm32_qspi_init' was not declared. Should it be static?

Cppcheck issue:
[drivers/st/spi/stm32_qspi.c:175] -> [drivers/st/spi/stm32_qspi.c:187]:
 (style) Variable 'len' is reassigned a value before the old one has been
 used.
[drivers/st/spi/stm32_qspi.c:178]:
 (style) The scope of the variable 'timeout' can be reduced.

Change-Id: I575fb50766355a6717cbd193fc4a80ff1923014c
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agoMerge "allwinner: H6: Fix GPIO and CCU memory map addresses" into integration
Manish Pandey [Mon, 23 Mar 2020 15:35:16 +0000 (15:35 +0000)]
Merge "allwinner: H6: Fix GPIO and CCU memory map addresses" into integration

5 years agoplat: imx: imx8qx: provide debug uart num as build param
Igor Opaniuk [Mon, 23 Mar 2020 15:21:05 +0000 (17:21 +0200)]
plat: imx: imx8qx: provide debug uart num as build param

1. This removes hardcoded iomux/clk/addr configuration for debug uart,
provides possibility (as a workaround, till that information isn't
provided via DT) to set this configuration during compile time via
IMX_DEBUG_UART build flag.

Also for Colibri i.MX8QXP different pinmux configuration is applied
for UART3, FLEXCAN2_RX/TX pads are muxed to ADMA_UART3_RX/TX.

2. Having DEBUG_CONSOLE enabled without enabling DEBUG_CONSOLE_A35
doesn't make sense (since UART pinmux/clock configuration is applied
for UART only when DEBUG_CONSOLE_A35 is enabled. Check similar commit
for i.MX8QM 98a69dfd4a("plat: imx: imx8qm: apply clk/pinmux
configuration for DEBUG_CONSOLE")).

Usage:
$ make PLAT=imx8qx IMX_DEBUG_UART=3 DEBUG_CONSOLE=1 bl31

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

5 years agoMerge changes from topic "tegra-downstream-03192020" into integration
Manish Pandey [Mon, 23 Mar 2020 15:24:02 +0000 (15:24 +0000)]
Merge changes from topic "tegra-downstream-03192020" into integration

* changes:
  Tegra194: move cluster and CPU counter to header file.
  Tegra: gicv2: initialize target masks
  spd: tlkd: support new TLK SMCs for RPMB service
  Tegra210: trigger CPU0 hotplug power on using FC
  Tegra: memctrl: cleanup streamid override registers
  Tegra: memctrl_v2: remove support to secure TZSRAM
  Tegra: include platform headers from individual makefiles
  Tegra210: rename ENABLE_WDT_LEGACY_FIQ_HANDLING macro
  Tegra194: SiP function ID to read SMMU_PER registers
  Tegra: memctrl: map video memory as uncached
  Tegra: remove support for USE_COHERENT_MEM
  Tegra: remove circular dependency with common_def.h
  Tegra: include missing stdbool.h
  Tegra: remove support for SEPARATE_CODE_AND_RODATA=0

5 years agospm: Add spci manifest binding document
Louis Mayencourt [Fri, 29 Nov 2019 15:05:14 +0000 (15:05 +0000)]
spm: Add spci manifest binding document

The manifest binding document defines the expected properties and their formats
to represent a partition manifest in device tree.

Change-Id: I5eb250c7b89e0d828e1fcfce32b121e4081879ec
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
5 years agoMerge "plat/arm/sgi: mark remote chip shared ram as non-cacheable" into integration
Manish Pandey [Mon, 23 Mar 2020 12:00:57 +0000 (12:00 +0000)]
Merge "plat/arm/sgi: mark remote chip shared ram as non-cacheable" into integration

5 years agoMerge changes I8ca411d5,Ib5f5dd81,I0488e22c into integration
Manish Pandey [Mon, 23 Mar 2020 11:28:28 +0000 (11:28 +0000)]
Merge changes I8ca411d5,Ib5f5dd81,I0488e22c into integration

* changes:
  plat: imx: imx8qm: apply clk/pinmux configuration for DEBUG_CONSOLE
  plat: imx: imx8qm: provide debug uart num as build param
  plat: imx: imx8_iomux: fix shift-overflow errors

5 years agoallwinner: H6: Fix GPIO and CCU memory map addresses
Andre Przywara [Tue, 17 Mar 2020 00:07:31 +0000 (00:07 +0000)]
allwinner: H6: Fix GPIO and CCU memory map addresses

The base address for both the GPIO and the clock unit of the H6 memory map
have been typo-ed. Fix them to match the Linux DT and the manual.

The H6 code use neither of them, so this doesn't change or fix anything
in the real world, but should be corrected anyway.

The issue was found and reported by Github user "armlabs".

Change-Id: Ic6fdfb732ce1cfc54cbb927718035624a06a9e08
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agoTegra: fixup GIC init from the 'on_finish' handler
Varun Wadekar [Sun, 22 Mar 2020 01:49:33 +0000 (18:49 -0700)]
Tegra: fixup GIC init from the 'on_finish' handler

Commit e9e19fb2fe684a740afc4820b3ee4cc38ad67d70 accidentally removed the
GIC init routine required to initialze the distributor on system resume.

This patch fixes this anomaly and initializes the distributor on system
resume.

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

5 years agoTegra194: move cluster and CPU counter to header file.
Anthony Zhou [Mon, 11 Mar 2019 07:50:32 +0000 (15:50 +0800)]
Tegra194: move cluster and CPU counter to header file.

MISRA rules request that the cluster and CPU counter be unsigned
values and have a suffix 'U'. If the define located in the makefile,
this cannot be done.

This patch moves the PLATFORM_CLUSTER_COUNT and PLATFORM_MAX_CPUS_PER_CLUSTER
macros to tegra_def.h as a result.

Change-Id: I9ef0beb29485729de204b4ffbb5241b039690e5a
Signed-off-by: Anthony Zhou <anzhou@nvidia.com>