]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
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 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 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 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 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 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>
5 years agoTegra: gicv2: initialize target masks
Varun Wadekar [Fri, 5 Oct 2018 18:24:54 +0000 (11:24 -0700)]
Tegra: gicv2: initialize target masks

This patch initializes the target masks in the GICv2 driver
data, for all PEs. This will allow platforms to set the PE
target for SPIs.

Change-Id: I7bf2ad79c04c2555ab310acba17823fb157327a3
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agospd: tlkd: support new TLK SMCs for RPMB service
Mustafa Yigit Bilgen [Mon, 3 Dec 2018 23:53:38 +0000 (15:53 -0800)]
spd: tlkd: support new TLK SMCs for RPMB service

This patch adds support to handle following TLK SMCs:
{TLK_SET_BL_VERSION, TLK_LOCK_BL_INTERFACE, TLK_BL_RPMB_SERVICE}

These SMCs need to be supported in ATF in order to forward them to
TLK. Otherwise, these functionalities won't work.

Brief:
TLK_SET_BL_VERSION: This SMC is issued by the bootloader to supply its
version to TLK. TLK can use this to prevent rollback attacks.

TLK_LOCK_BL_INTERFACE: This SMC is issued by bootloader before handing off
execution to the OS. This allows preventing sensitive SMCs being used
by the OS.

TLK_BL_RPMB_SERVICE: bootloader issues this SMC to sign or verify RPMB
frames.

Tested by: Tests TLK can receive the new SMCs issued by bootloader

Change-Id: I57c2d189a5f7a77cea26c3f8921866f2a6f0f944
Signed-off-by: Mustafa Yigit Bilgen <mbilgen@nvidia.com>
5 years agoTegra210: trigger CPU0 hotplug power on using FC
sumitg [Fri, 8 Feb 2019 10:44:06 +0000 (16:14 +0530)]
Tegra210: trigger CPU0 hotplug power on using FC

Hotplug poweron is not working for boot CPU as it's being
triggerred using PMC and not with Flow Controller. This is
happening because "cpu_powergate_mask" is only getting set
for non-boot CPU's as the boot CPU's first bootup follows
different code path. The patch is marking a CPU as ON within
"cpu_powergate_mask" when turning its power domain on
during power on. This will ensure only first bootup on all
CPU's is using PMC and subsequent hotplug poweron will be
using Flow Controller.

Change-Id: Ie9e86e6f9a777d41508a93d2ce286f31307932c2
Signed-off-by: sumitg <sumitg@nvidia.com>
5 years agoTegra: memctrl: cleanup streamid override registers
Pritesh Raithatha [Mon, 7 Jan 2019 06:32:09 +0000 (12:02 +0530)]
Tegra: memctrl: cleanup streamid override registers

Streamid override registers are passed to memctrl to program bypass
streamid for all the registers. There is no reason to bypass SMMU
for any of the client so need to remove register list and do not
set streamid_override_cfg.

Some Tegra186 platforms don't boot due to SDMMC failure so keep SDMMC
bypass as of now. Will revisit once these issues are fixed.

Change-Id: I3f67e2a0e1b53160e2218f3acace7da45532f934
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
5 years agoTegra: memctrl_v2: remove support to secure TZSRAM
Varun Wadekar [Thu, 24 Jan 2019 00:54:12 +0000 (16:54 -0800)]
Tegra: memctrl_v2: remove support to secure TZSRAM

This patch removes support to secure the on-chip TZSRAM memory for
Tegra186 and Tegra194 platforms as the previous bootloader does that
for them.

Change-Id: I50c7b7f9694285fe31135ada09baed1cfedaaf07
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra: include platform headers from individual makefiles
Varun Wadekar [Fri, 18 Jan 2019 00:36:23 +0000 (16:36 -0800)]
Tegra: include platform headers from individual makefiles

This patch modifies PLAT_INCLUDES to include individual Tegra SoC
headers from the platform's makefile.

Change-Id: If5248667f4e58ac18727d37a18fbba8e53f2d7b5
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra210: rename ENABLE_WDT_LEGACY_FIQ_HANDLING macro
Varun Wadekar [Tue, 29 Jan 2019 01:00:32 +0000 (17:00 -0800)]
Tegra210: rename ENABLE_WDT_LEGACY_FIQ_HANDLING macro

This patch renames 'ENABLE_WDT_LEGACY_FIQ_HANDLING' macro to
'ENABLE_TEGRA_WDT_LEGACY_FIQ_HANDLING', to indicate that this
is a Tegra feature.

Change-Id: I5c4431e662223ee80efbfd5ec2513f8b1cadfc50
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra194: SiP function ID to read SMMU_PER registers
Varun Wadekar [Mon, 10 Dec 2018 21:28:25 +0000 (13:28 -0800)]
Tegra194: SiP function ID to read SMMU_PER registers

This patch introduces SiP function ID, 0xC200FF00, to read SMMU_PER
error records from all supported SMMU blocks.

The register values are passed over to the client via CPU registers
X1 - X3, where

X1 = SMMU_PER[instance #1] | SMMU_PER[instance #0]
X2 = SMMU_PER[instance #3] | SMMU_PER[instance #2]
X3 = SMMU_PER[instance #5] | SMMU_PER[instance #4]

Change-Id: Id56263f558838ad05f6021f8432e618e99e190fc
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra: memctrl: map video memory as uncached
Ken Chang [Fri, 28 Dec 2018 00:44:12 +0000 (08:44 +0800)]
Tegra: memctrl: map video memory as uncached

Memmap video memory as uncached normal memory by adding flag
'MT_NON_CACHEABLE' in mmap_add_dynamic_region().
This improves the time taken for clearing the non-overlapping video
memory:

test conditions: 32MB memory size, EMC running at 1866MHz, t186
1) without MT_NON_CACHEABLE: 30ms ~ 40ms
<3>[  133.852885]  vpr-heap: update vpr base to 0x00000000c6000000, size=e000000
<3>[  133.860471] _tegra_set_vpr_params[120]: begin
<3>[  133.896481] _tegra_set_vpr_params[123]: end
<3>[  133.908944]  vpr-heap: update vpr base to 0x00000000c6000000, size=c000000
<3>[  133.916397] _tegra_set_vpr_params[120]: begin
<3>[  133.956369] _tegra_set_vpr_params[123]: end
<3>[  133.970394]  vpr-heap: update vpr base to 0x00000000c6000000, size=a000000
<3>[  133.977934] _tegra_set_vpr_params[120]: begin
<3>[  134.013874] _tegra_set_vpr_params[123]: end
<3>[  134.025666]  vpr-heap: update vpr base to 0x00000000c6000000, size=8000000
<3>[  134.033512] _tegra_set_vpr_params[120]: begin
<3>[  134.065996] _tegra_set_vpr_params[123]: end
<3>[  134.075465]  vpr-heap: update vpr base to 0x00000000c6000000, size=6000000
<3>[  134.082923] _tegra_set_vpr_params[120]: begin
<3>[  134.113119] _tegra_set_vpr_params[123]: end
<3>[  134.123448]  vpr-heap: update vpr base to 0x00000000c6000000, size=4000000
<3>[  134.130790] _tegra_set_vpr_params[120]: begin
<3>[  134.162523] _tegra_set_vpr_params[123]: end
<3>[  134.172413]  vpr-heap: update vpr base to 0x00000000c6000000, size=2000000
<3>[  134.179772] _tegra_set_vpr_params[120]: begin
<3>[  134.209142] _tegra_set_vpr_params[123]: end

2) with MT_NON_CACHEABLE: 10ms ~ 18ms
<3>[  102.108702]  vpr-heap: update vpr base to 0x00000000c6000000, size=e000000
<3>[  102.116296] _tegra_set_vpr_params[120]: begin
<3>[  102.134272] _tegra_set_vpr_params[123]: end
<3>[  102.145839]  vpr-heap: update vpr base to 0x00000000c6000000, size=c000000
<3>[  102.153226] _tegra_set_vpr_params[120]: begin
<3>[  102.164201] _tegra_set_vpr_params[123]: end
<3>[  102.172275]  vpr-heap: update vpr base to 0x00000000c6000000, size=a000000
<3>[  102.179638] _tegra_set_vpr_params[120]: begin
<3>[  102.190342] _tegra_set_vpr_params[123]: end
<3>[  102.197524]  vpr-heap: update vpr base to 0x00000000c6000000, size=8000000
<3>[  102.205085] _tegra_set_vpr_params[120]: begin
<3>[  102.216112] _tegra_set_vpr_params[123]: end
<3>[  102.224080]  vpr-heap: update vpr base to 0x00000000c6000000, size=6000000
<3>[  102.231387] _tegra_set_vpr_params[120]: begin
<3>[  102.241775] _tegra_set_vpr_params[123]: end
<3>[  102.248825]  vpr-heap: update vpr base to 0x00000000c6000000, size=4000000
<3>[  102.256069] _tegra_set_vpr_params[120]: begin
<3>[  102.266368] _tegra_set_vpr_params[123]: end
<3>[  102.273400]  vpr-heap: update vpr base to 0x00000000c6000000, size=2000000
<3>[  102.280672] _tegra_set_vpr_params[120]: begin
<3>[  102.290929] _tegra_set_vpr_params[123]: end

Change-Id: I5f604064ce7b8b73ea9ad5860156ae5e2c6cc42a
Signed-off-by: Ken Chang <kenc@nvidia.com>
5 years agoTegra: remove support for USE_COHERENT_MEM
Kalyani Chidambaram [Tue, 18 Dec 2018 21:51:18 +0000 (13:51 -0800)]
Tegra: remove support for USE_COHERENT_MEM

This patch removes the support for 'USE_COHERENT_MEM' as
Tegra platforms no longer support the feature.

Change-Id: If1c80fc4e5974412572b3bc1fdf9e70b1ee5d4ec
Signed-off-by: Kalyani Chidambaram <kalyanic@nvidia.com>
5 years agoTegra: remove circular dependency with common_def.h
Varun Wadekar [Fri, 21 Dec 2018 18:55:42 +0000 (10:55 -0800)]
Tegra: remove circular dependency with common_def.h

This patch stops including common_def.h from platform_def.h to
fix a circular depoendency between them.

This means platform_def.h now has to define the linker macros:
* PLATFORM_LINKER_FORMAT
* PLATFORM_LINKER_ARCH

Change-Id: Icd540b1bd32fb37e0e455e9146c8b7f4b314e012
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra: include missing stdbool.h
Varun Wadekar [Fri, 21 Dec 2018 18:53:53 +0000 (10:53 -0800)]
Tegra: include missing stdbool.h

This patch includes the missing stdbool.h header from flowctrl.h
and bpmp_ivc.c files.

Change-Id: If60d19142b1cb8ae663fbdbdf1ffe45cbbdbc1b2
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra: remove support for SEPARATE_CODE_AND_RODATA=0
Kalyani Chidambaram [Wed, 19 Dec 2018 19:06:14 +0000 (11:06 -0800)]
Tegra: remove support for SEPARATE_CODE_AND_RODATA=0

Tegra platforms will not be supporting SEPARATE_CODE_AND_RODATA=0.

This patch uses the common macros provided by bl_common.h as a result
and adds a check to assert if SEPARATE_CODE_AND_RODATA set is not set
to '1'.

Change-Id: I376ea60c00ad69cb855d89418bdb80623f14800e
Signed-off-by: Kalyani Chidambaram <kalyanic@nvidia.com>
5 years agoMerge "Bug fix: Protect TSP prints with lock" into integration
Mark Dykes [Fri, 20 Mar 2020 19:18:46 +0000 (19:18 +0000)]
Merge "Bug fix: Protect TSP prints with lock" into integration

5 years agocontext: TPIDR_EL2 register not saved/restored
Olivier Deprez [Fri, 20 Mar 2020 13:22:05 +0000 (14:22 +0100)]
context: TPIDR_EL2 register not saved/restored

TPIDR_EL2 is missing from the EL2 state register save/restore
sequence. This patch adds it to the context save restore routines.

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

5 years agoMerge "fvp: use two instances of Cactus at S-EL1" into integration
Manish Pandey [Fri, 20 Mar 2020 15:46:18 +0000 (15:46 +0000)]
Merge "fvp: use two instances of Cactus at S-EL1" into integration

5 years agoMerge "spmc: manifest changes to support two sample cactus secure partitions" into...
Manish Pandey [Fri, 20 Mar 2020 09:51:50 +0000 (09:51 +0000)]
Merge "spmc: manifest changes to support two sample cactus secure partitions" into integration

5 years agoMerge "docs: remove uefi-tools in hikey and hikey960" into integration
Manish Pandey [Fri, 20 Mar 2020 09:30:02 +0000 (09:30 +0000)]
Merge "docs: remove uefi-tools in hikey and hikey960" into integration

5 years agoChangelog updates for recent commits
Madhukar Pappireddy [Fri, 20 Mar 2020 06:32:32 +0000 (01:32 -0500)]
Changelog updates for recent commits

Change-Id: I09191a51dd9ee673c54b422ba4eb35c46c6dc30e
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
5 years agoBug fix: Protect TSP prints with lock
Madhukar Pappireddy [Fri, 20 Mar 2020 06:46:21 +0000 (01:46 -0500)]
Bug fix: Protect TSP prints with lock

CPUs use console to print debug/info messages. This critical section
must be guarded by locks to avoid overlaps in messages from multiple
CPUs.

Change-Id: I786bf90072c1ed73c4f53d8c950979d95255e67e
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
5 years agoMerge "el3_entrypoint_common: avoid overwriting arg3" into integration
Manish Pandey [Thu, 19 Mar 2020 22:35:13 +0000 (22:35 +0000)]
Merge "el3_entrypoint_common: avoid overwriting arg3" into integration

5 years agofvp: use two instances of Cactus at S-EL1
Manish Pandey [Thu, 19 Mar 2020 21:06:18 +0000 (21:06 +0000)]
fvp: use two instances of Cactus at S-EL1

To demonstrate communication between SP's two instances of Cactus at
S-EL1 has been used.
This patch replaces Ivy SP with cactus-secondary SP which aligns with
changes in tf-a-tests repository.

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

5 years agospmc: manifest changes to support two sample cactus secure partitions
Olivier Deprez [Fri, 28 Feb 2020 11:12:08 +0000 (12:12 +0100)]
spmc: manifest changes to support two sample cactus secure partitions

When using the SPM Dispatcher, the SPMC sits as a BL32 component
(BL32_IMAGE_ID). The SPMC manifest is passed as the TOS fw config
component (TOS_FW_CONFIG_ID). It defines platform specific attributes
(memory range and physical CPU layout) as well as the attributes for
each secure partition (mostly load address). This manifest is passed
to the SPMC on boot up. An SP package contains the SP dtb in the SPCI
defined partition manifest format. As the SPMC manifest was enriched
it needs an increase of tos_fw-config max-size in fvp_fw_config dts.

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

5 years agoMerge changes from topic "tegra-downstream-03122020" into integration
Sandrine Bailleux [Thu, 19 Mar 2020 11:09:37 +0000 (11:09 +0000)]
Merge changes from topic "tegra-downstream-03122020" into integration

* changes:
  Tegra: assembly version of the 'plat_core_pos_by_mpidr' handler
  Tegra194: reset power state info for CPUs
  tlkd: remove system off/reset handlers
  Tegra186: system resume from TZSRAM memory
  Tegra186: disable PROGRAMMABLE_RESET_ADDRESS
  Tegra210: SE: switch SE clock source to CLK_M
  Tegra: increase platform assert logging level to VERBOSE
  spd: trusty: disable error messages seen during boot
  Tegra194: enable dual execution for EL2 and EL3
  Tegra: aarch64: calculate core position from one place
  Tegra194: Update t194_nvg.h to v6.7

5 years agoTegra: assembly version of the 'plat_core_pos_by_mpidr' handler
Varun Wadekar [Tue, 27 Nov 2018 23:47:26 +0000 (15:47 -0800)]
Tegra: assembly version of the 'plat_core_pos_by_mpidr' handler

The 'plat_core_pos_by_mpidr' handler gets called very early during boot
and the compiler generated code overwrites the caller's registers.

This patch converts the 'plat_core_pos_by_mpidr' handler into an assembly
function and uses registers x0-x3, to fix this anomaly.

Change-Id: I8d974e007a0bad039defaf77b11a180d899ead3c
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra194: reset power state info for CPUs
Varun Wadekar [Fri, 16 Nov 2018 04:44:40 +0000 (20:44 -0800)]
Tegra194: reset power state info for CPUs

We set deepest power state when offlining a core but that may not be
requested by non-secure sw which controls idle states. It will re-init
this info from non-secure software when the core come online.

This patch resets the power state in the non-secure world context
to allow it to start with a clean slate.

Change-Id: Iafd92cb2a49571aa6eeb9580beaaff4ba55a87dc
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agotlkd: remove system off/reset handlers
Varun Wadekar [Mon, 5 Nov 2018 23:12:55 +0000 (15:12 -0800)]
tlkd: remove system off/reset handlers

TLK does not participate in the system off/reset process and so
has no use for the SYSTEM_OFF/RESET notifications.

This patch removes the system off/reset handlers as a result.

Change-Id: Icf1430b1400cea88000e6d54426eb604a43cbe6c
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra186: system resume from TZSRAM memory
Varun Wadekar [Fri, 9 Nov 2018 17:08:16 +0000 (09:08 -0800)]
Tegra186: system resume from TZSRAM memory

TZSRAM loses power during System suspend, so the entire contents
are copied to TZDRAM before Sysem Suspend entry. The warmboot code
verifies and restores the contents to TZSRAM during System Resume.

This patch removes the code that sets up CPU vector to point to
TZSRAM during System Resume as a result. The trampoline code can
also be completely removed as a result.

Change-Id: I2830eb1db16efef3dfd96c4e3afc41a307588ca1
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra186: disable PROGRAMMABLE_RESET_ADDRESS
Varun Wadekar [Thu, 9 Aug 2018 22:11:23 +0000 (15:11 -0700)]
Tegra186: disable PROGRAMMABLE_RESET_ADDRESS

This patch disables the code to program reset vector for secondary
CPUs to a different entry point, than cold boot. The cold boot entry
point has the ability to differentiate between a cold boot and a warm
boot, that is controlled by the PROGRAMMABLE_RESET_ADDRESS macro. By
reusing the same entry point, we can lock the CPU reset vector during
cold boot.

Change-Id: Iad400841d57c139469e1d29b5d467197e11958c4
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra210: SE: switch SE clock source to CLK_M
Leo He [Thu, 12 Jul 2018 09:36:12 +0000 (17:36 +0800)]
Tegra210: SE: switch SE clock source to CLK_M

In SE suspend, switch SE clock source to CLK_M,
to make sure SE clock is on when saving SE context

Change-Id: I57c559825a3ec8e0cc35f7a389afc458a5eed0cb
Signed-off-by: Leo He <leoh@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra: increase platform assert logging level to VERBOSE
Varun Wadekar [Tue, 16 Oct 2018 23:05:41 +0000 (16:05 -0700)]
Tegra: increase platform assert logging level to VERBOSE

This patch increases the assert logging level for all Tegra platforms
to VERBOSE, to print the actual assertion condition to the console,
improving debuggability.

Change-Id: If3399bde63fa4261522cab984cc9c49cd2073358
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agospd: trusty: disable error messages seen during boot
Varun Wadekar [Tue, 16 Oct 2018 22:39:55 +0000 (15:39 -0700)]
spd: trusty: disable error messages seen during boot

Platforms that do not support Trusty, usually see error
messages from the Trusty SPD, during boot. This can be
interpreted as a boot failure.

This patch lowers the logging level for those error messages
to avoid confusion.

Change-Id: I931baa2c6db0de1aee17383039bc29ed229a1f25
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra194: enable dual execution for EL2 and EL3
Kalyani Chidambaram [Wed, 12 Sep 2018 21:59:08 +0000 (14:59 -0700)]
Tegra194: enable dual execution for EL2 and EL3

This patch enables dual execution optimized translations for EL2 and EL3
CPU exception levels.

Change-Id: I28fe98bb05687400f247e94adf44a1f3a85c38b1
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra: aarch64: calculate core position from one place
Kalyani Chidambaram [Thu, 4 Oct 2018 00:00:17 +0000 (17:00 -0700)]
Tegra: aarch64: calculate core position from one place

This patch updates 'plat_my_core_pos' handler to call
'plat_core_pos_from_mpidr' instead of implementing the same logic
at two places.

Change-Id: I1e56adaa10dc2fe3440e5507e0e260d8932e6657
Signed-off-by: Kalyani Chidambaram <kalyanic@nvidia.com>
5 years agoTegra194: Update t194_nvg.h to v6.7
Kalyani Chidambaram [Wed, 19 Sep 2018 22:51:46 +0000 (15:51 -0700)]
Tegra194: Update t194_nvg.h to v6.7

This patch updates the t194_nvg.h header file received from the CPU
team to v6.7.

Change-Id: I5d25dfc60448e14b7085250946bd002fcb80a774
Signed-off-by: Kalyani Chidambaram <kalyanic@nvidia.com>
5 years agoMerge changes from topic "rpix-multi-console" into integration
Sandrine Bailleux [Wed, 18 Mar 2020 16:44:40 +0000 (16:44 +0000)]
Merge changes from topic "rpix-multi-console" into integration

* changes:
  rpi: docs: Update maintainers file to new RPi directory scheme
  rpi: console: Autodetect Mini-UART vs. PL011 configuration
  rpi3: build: Include GPIO driver in all BL stages
  rpi: Allow using PL011 UART for RPi3/RPi4
  rpi3: console: Use same "clock-less" setup scheme as RPi4
  rpi3: gpio: Simplify GPIO setup

5 years agoMerge "Implement SMCCC_ARCH_SOC_ID SMC call" into integration
Manish Pandey [Wed, 18 Mar 2020 13:55:33 +0000 (13:55 +0000)]
Merge "Implement SMCCC_ARCH_SOC_ID SMC call" into integration

5 years agoMerge "FVP: In BL31/SP_MIN, map only the needed DRAM region statically" into integration
Olivier Deprez [Wed, 18 Mar 2020 10:38:39 +0000 (10:38 +0000)]
Merge "FVP: In BL31/SP_MIN, map only the needed DRAM region statically" into integration

5 years agoMerge "board/rddaniel: add NSAID sources for TZC400 driver" into integration
Manish Pandey [Tue, 17 Mar 2020 22:04:01 +0000 (22:04 +0000)]
Merge "board/rddaniel: add NSAID sources for TZC400 driver" into integration

5 years agoFVP: In BL31/SP_MIN, map only the needed DRAM region statically
Madhukar Pappireddy [Fri, 13 Mar 2020 18:00:17 +0000 (13:00 -0500)]
FVP: In BL31/SP_MIN, map only the needed DRAM region statically

Rather than creating entry in plat_arm_mmap array to map the
entire DRAM region in BL31/SP_MIN, only map a smaller region holding
HW_CONFIG DTB. Consequently, an increase in number of sub-translation
tables(level-2 and level-3) i.e., MAX_XLAT_TABLES is necessary to map
the new region in memory.

In order to accommodate the increased code size in BL31 i.e.,
PROGBITS, the max size of BL31 image is increased by 0x1000(4K).

Change-Id: I540b8ee550588e22a3a9fb218183d2ab8061c851
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
5 years agorpi: docs: Update maintainers file to new RPi directory scheme
Andre Przywara [Fri, 24 Jan 2020 10:46:17 +0000 (10:46 +0000)]
rpi: docs: Update maintainers file to new RPi directory scheme

With the addition of the Raspberry Pi 4 port the directory structure
changed a bit, also the new port didn't have a separate entry.

Add a new entry for the RPi4 port and adjust the path names.

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