project/bcm63xx/atf.git
5 years agoamlogic: Fix prefixes in the MHU code
Carlo Caione [Wed, 28 Aug 2019 08:46:18 +0000 (09:46 +0100)]
amlogic: Fix prefixes in the MHU code

Make the MHU code AML specific adding a new aml_* prefix and remove the
GXBB prefix from the register names.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I8f20918e29f08542bd71bd679f88e65b4efaa7d2

5 years agoamlogic: Fix prefixes in the SIP/SVC code
Carlo Caione [Mon, 26 Aug 2019 12:04:12 +0000 (13:04 +0100)]
amlogic: Fix prefixes in the SIP/SVC code

All the SIP/SVC related code is currently the same between GXL and GXBB.
Rename function names and register names to avoid hardcoding the GXBB
prefix.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I7e58ab68489df8d4762663fc01fb64e6899cc8bf

5 years agoamlogic: Fix prefixes in the thermal driver
Carlo Caione [Sun, 25 Aug 2019 17:09:59 +0000 (18:09 +0100)]
amlogic: Fix prefixes in the thermal driver

No need to have a special SoC-specific prefix.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I0da543e7d92d56604e79440a98027ffd9a2eaa59

5 years agoamlogic: Fix prefixes in the private header file
Carlo Caione [Sun, 25 Aug 2019 17:09:03 +0000 (18:09 +0100)]
amlogic: Fix prefixes in the private header file

The header file is shared between all the SoCs. Better avoiding
hardcoding the SoC name in the function names.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I9074871bd1ed8a702c1a656e0f50f2d3c6cb0425

5 years agoamlogic: Fix prefixes in the efuse driver
Carlo Caione [Sun, 25 Aug 2019 16:26:27 +0000 (17:26 +0100)]
amlogic: Fix prefixes in the efuse driver

The efuse driver is hardcoding the GXBB prefix. No need to do that since
the driver is shared between multiple SoCs.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I97691b0bbd55170d8216d301a3fc04feb8c2af2e

5 years agoamlogic: Fix prefixes in the platform macros file
Carlo Caione [Sat, 24 Aug 2019 17:51:48 +0000 (18:51 +0100)]
amlogic: Fix prefixes in the platform macros file

Fixing at the same time the related register names.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Ib1130d50abe6088f1c0826878d1ae454a0f23008

5 years agoamlogic: Fix prefixes in the helpers file
Carlo Caione [Sat, 24 Aug 2019 17:47:06 +0000 (18:47 +0100)]
amlogic: Fix prefixes in the helpers file

The code is the common directory is now generic, no need to have the SoC
prefix hardcoded in the function names.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Ied3a5e506b9abd4c2d6f893bafef50019bff24f1

5 years agoamlogic: Rework Makefiles
Carlo Caione [Sat, 24 Aug 2019 17:37:46 +0000 (18:37 +0100)]
amlogic: Rework Makefiles

Now that every piece is in place, the makefiles can be refactored and
slightly beautified removing useless and redundant parts.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: If74e1909df52d475cf4b0dfed819d07d3a4c85b9

5 years agoamlogic: Move the SIP SVC code to common directory
Carlo Caione [Sat, 24 Aug 2019 16:52:40 +0000 (17:52 +0100)]
amlogic: Move the SIP SVC code to common directory

The code is the same between GXBB and GXL. Move it to the common source
directory.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I875689a6fd029971aa755fc2725217e90ed06b6c

5 years agoamlogic: Move topology file to common directory
Carlo Caione [Sat, 24 Aug 2019 16:50:16 +0000 (17:50 +0100)]
amlogic: Move topology file to common directory

As done already for multiple files, move the topology file to the common
directory.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Iaca357a089593ad58c35c05c929239132249dcda

5 years agoamlogic: Move thermal code to common directory
Carlo Caione [Sat, 24 Aug 2019 16:48:11 +0000 (17:48 +0100)]
amlogic: Move thermal code to common directory

As for most of the Amlogic code, this is common between the Amlogic
SoCs. Move the code to the common directory.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Id3f0073ff1f0b9ddbe964f80303323ee4a2f27b0

5 years agoamlogic: Move MHU code to common directory
Carlo Caione [Sat, 24 Aug 2019 16:46:04 +0000 (17:46 +0100)]
amlogic: Move MHU code to common directory

The MHU code is shared between all the supported platforms. Move it to
the common directory instead.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Iaf53122866eae85c13f772927d16836dcfa877a3

5 years agoamlogic: Move efuse code to common directory
Carlo Caione [Sat, 24 Aug 2019 16:43:33 +0000 (17:43 +0100)]
amlogic: Move efuse code to common directory

The efuse code is the same between GXL and GXBB. Move the code to common
directory.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Ie37f21d1907a36292724f1fb645a78041fe4a6b3

5 years agoamlogic: Move platform macros assembly file to common directory
Carlo Caione [Sat, 24 Aug 2019 16:36:32 +0000 (17:36 +0100)]
amlogic: Move platform macros assembly file to common directory

The platform macros are shared between all the SoCs. Move it to common
directory.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Ia04c3ffe4d7b068aa701268ed99f69995d8db92b

5 years agoamlogic: Introduce unified private header file
Carlo Caione [Sat, 24 Aug 2019 16:31:51 +0000 (17:31 +0100)]
amlogic: Introduce unified private header file

Now that also the SHA256 DMA driver is shared between all the SoCs, we
can have one single private platform header file.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I77d51915f9d8233aeceeed66ed1f491573402cfc

5 years agoamlogic: Move SCPI code to common directory
Carlo Caione [Sat, 24 Aug 2019 16:28:23 +0000 (17:28 +0100)]
amlogic: Move SCPI code to common directory

The SCPI code is the same between GXBB and GXL. No need to have it
replicated for each SoCs. Move it to the common directory.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I7e416caf1e9538b3ce7702c0363ee00a054e2451

5 years agoamlogic: Move the SHA256 DMA driver to common directory
Carlo Caione [Sat, 24 Aug 2019 16:17:30 +0000 (17:17 +0100)]
amlogic: Move the SHA256 DMA driver to common directory

The SHA256 DMA driver can be used by multiple SoCs. Move it to the
common directory.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I96319eeeeeebd503ef0dcb07c0e4ff6a67afeaa5

5 years agoamlogic: Move assembly helpers to common directory
Carlo Caione [Fri, 23 Aug 2019 19:02:32 +0000 (20:02 +0100)]
amlogic: Move assembly helpers to common directory

The assembly helpers are common to all the amlogic SoCs. Move the .S
file to the common directory.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I0d8616a7ae22dbcb14848cefd0149b6bb5814ea6

5 years agoamlogic: Introduce directory parameters in the makefiles
Carlo Caione [Fri, 23 Aug 2019 18:34:44 +0000 (19:34 +0100)]
amlogic: Introduce directory parameters in the makefiles

Make the platform name a parameter for the source directories. Besides a
cosmetic fix, this is going to be helpful when reusing the same Makefile
for different SoCs.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I307897a21800cca8ad68a5ab8972d27e9356ff2a

5 years agomeson: Rename platform directory to amlogic
Carlo Caione [Fri, 23 Aug 2019 17:28:36 +0000 (18:28 +0100)]
meson: Rename platform directory to amlogic

Meson is the internal code name for the SoC family. The correct name for
the platform should be Amlogic. Change the name of the platform
directory.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Icc140e1ea137f12117acbf64c7dcb1a8b66b345d

5 years agoMerge "intel: agilex: Clear PLL lostlock bypass mode" into integration
Paul Beesley [Wed, 28 Aug 2019 13:05:51 +0000 (13:05 +0000)]
Merge "intel: agilex: Clear PLL lostlock bypass mode" into integration

5 years agoMerge "tegra: add support for multi console interface" into integration
Sandrine Bailleux [Tue, 27 Aug 2019 22:50:42 +0000 (22:50 +0000)]
Merge "tegra: add support for multi console interface" into integration

5 years agoMerge "AArch64: Disable Secure Cycle Counter" into integration
Paul Beesley [Fri, 23 Aug 2019 11:26:57 +0000 (11:26 +0000)]
Merge "AArch64: Disable Secure Cycle Counter" into integration

5 years agoAArch64: Disable Secure Cycle Counter
Alexei Fedorov [Tue, 13 Aug 2019 14:17:53 +0000 (15:17 +0100)]
AArch64: Disable Secure Cycle Counter

This patch fixes an issue when secure world timing information
can be leaked because Secure Cycle Counter is not disabled.
For ARMv8.5 the counter gets disabled by setting MDCR_El3.SCCD
bit on CPU cold/warm boot.
For the earlier architectures PMCR_EL0 register is saved/restored
on secure world entry/exit from/to Non-secure state, and cycle
counting gets disabled by setting PMCR_EL0.DP bit.
'include\aarch64\arch.h' header file was tided up and new
ARMv8.5-PMU related definitions were added.

Change-Id: I6f56db6bc77504634a352388990ad925a69ebbfa
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoMerge "plat/arm: Introduce corstone700 platform." into integration
Paul Beesley [Tue, 20 Aug 2019 14:47:56 +0000 (14:47 +0000)]
Merge "plat/arm: Introduce corstone700 platform." into integration

5 years agoMerge "rcar_gen3: plat: Rename RCAR_PRODUCT_* to PRR_PRODUCT_*" into integration
Paul Beesley [Tue, 20 Aug 2019 14:14:03 +0000 (14:14 +0000)]
Merge "rcar_gen3: plat: Rename RCAR_PRODUCT_* to PRR_PRODUCT_*" into integration

5 years agoplat/arm: Introduce corstone700 platform.
Manish Pandey [Wed, 28 Nov 2018 11:20:37 +0000 (11:20 +0000)]
plat/arm: Introduce corstone700 platform.

This patch adds support for Corstone-700 foundation IP, which integrates
both Cortex-M0+ and Cortex-A(Host) processors in one handy, flexible
subsystem.
This is an example implementation of Corstone-700 IP host firmware.

Cortex-M0+ will take care of boot stages 1 and 2(BL1/BL2) as well as
bringing Host out RESET. Host will start execution directly from BL32 and
then will jump to Linux.

It is an initial port and additional features are expected to be added
later.

Change-Id: I7b5c0278243d574284b777b2408375d007a7736e
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
5 years agoMerge "rcar_gen3: plat: Factor out PRR_ macros into rcar_def.h" into integration
Paul Beesley [Tue, 20 Aug 2019 14:12:40 +0000 (14:12 +0000)]
Merge "rcar_gen3: plat: Factor out PRR_ macros into rcar_def.h" into integration

5 years agoMerge "intel: agilex: HMC driver calculate DDR size" into integration
Paul Beesley [Tue, 20 Aug 2019 09:38:32 +0000 (09:38 +0000)]
Merge "intel: agilex: HMC driver calculate DDR size" into integration

5 years agoMerge "console: add a flag to prepend '\r' in the multi-console framework" into integ...
Paul Beesley [Tue, 20 Aug 2019 09:37:37 +0000 (09:37 +0000)]
Merge "console: add a flag to prepend '\r' in the multi-console framework" into integration

5 years agoMerge "Fix for N1 1043202 Errata Workaround" into integration
Alexei Fedorov [Tue, 20 Aug 2019 09:31:16 +0000 (09:31 +0000)]
Merge "Fix for N1 1043202 Errata Workaround" into integration

5 years agoMerge "Coverity fix: Remove GGC ignore -Warray-bounds" into integration
Paul Beesley [Tue, 20 Aug 2019 09:25:00 +0000 (09:25 +0000)]
Merge "Coverity fix: Remove GGC ignore -Warray-bounds" into integration

5 years agoFix for N1 1043202 Errata Workaround
laurenw-arm [Mon, 19 Aug 2019 16:06:18 +0000 (11:06 -0500)]
Fix for N1 1043202 Errata Workaround

ISB instruction was removed from the N1 1043202 Errata Workaround [1], this
fix is adding the ISB instruction back in.

[1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.pjdoc-466751330-10325/index.html

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

5 years agointel: agilex: HMC driver calculate DDR size
Hadi Asyrafi [Fri, 16 Aug 2019 09:07:42 +0000 (17:07 +0800)]
intel: agilex: HMC driver calculate DDR size

Driver will calculate DDR size instead of using hardcoded value

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I642cf2180929965ef12bd5ae4393b2f3d0dcddde

5 years agoconsole: add a flag to prepend '\r' in the multi-console framework
Masahiro Yamada [Tue, 23 Jul 2019 03:32:58 +0000 (12:32 +0900)]
console: add a flag to prepend '\r' in the multi-console framework

Currently, console drivers prepend '\r' to '\n' by themselves. This is
common enough to be supported in the framework.

Add a new flag, CONSOLE_FLAG_TRANSLATE_CRLF. A driver can set this
flag to ask the framework to transform LF into CRLF instead of doing
it by itself.

Change-Id: I4f5c5887591bc0a8749a105abe62b6562eaf503b
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agointel: agilex: Clear PLL lostlock bypass mode
Hadi Asyrafi [Fri, 16 Aug 2019 03:08:14 +0000 (11:08 +0800)]
intel: agilex: Clear PLL lostlock bypass mode

To provide glitchless clock to downstream logic even if clock toggles

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I728d64d0ba3b4492125bea5b0737fc83180356f1

5 years agoCoverity fix: Remove GGC ignore -Warray-bounds
Deepika Bhavnani [Wed, 14 Aug 2019 21:56:46 +0000 (00:56 +0300)]
Coverity fix: Remove GGC ignore -Warray-bounds

GCC diagnostics were added to ignore array boundaries, instead
of ignoring GCC warning current code will check for array boundaries
and perform and array update only for valid elements.

Resolves: `CID 246574` `CID 246710` `CID 246651`

Signed-off-by: Deepika Bhavnani <deepika.bhavnani@arm.com>
Change-Id: I7530ecf7a1707351c6ee87e90cc3d33574088f57

5 years agoMerge "FVP: Add Delay Timer driver to BL1 and BL31" into integration
Paul Beesley [Fri, 16 Aug 2019 14:48:32 +0000 (14:48 +0000)]
Merge "FVP: Add Delay Timer driver to BL1 and BL31" into integration

5 years agoMerge "Reduce the number of memory leaks in cert_create" into integration
Paul Beesley [Fri, 16 Aug 2019 13:44:26 +0000 (13:44 +0000)]
Merge "Reduce the number of memory leaks in cert_create" into integration

5 years agoFVP: Add Delay Timer driver to BL1 and BL31
Alexei Fedorov [Fri, 16 Aug 2019 13:15:59 +0000 (14:15 +0100)]
FVP: Add Delay Timer driver to BL1 and BL31

SMMUv3 driver functions which are called from BL1 and BL31
currently use counter-based poll method for testing status
bits. Adding Delay Timer driver to BL1 and BL31 is required
for timeout-based implementation using timer delay functions
for SMMU and other drivers.
This patch adds new function `fvp_timer_init()` which
initialises either System level generic or SP804 timer based on
FVP_USE_SP804_TIMER build flag.
In BL2U `bl2u_early_platform_setup()` function the call to
`arm_bl2u_early_platform_setup()` (which calls
`generic_delay_timer_init()` ignoring FVP_USE_SP804_TIMER flag),
is replaced with `arm_console_boot_init()` and `fvp_timer_init()`.

Change-Id: Ifd8dcebf4019e877b9bc5641551deef77a44c0d1
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agorcar_gen3: plat: Rename RCAR_PRODUCT_* to PRR_PRODUCT_*
Marek Vasut [Tue, 6 Aug 2019 17:13:22 +0000 (19:13 +0200)]
rcar_gen3: plat: Rename RCAR_PRODUCT_* to PRR_PRODUCT_*

Rename RCAR_PRODUCT_* to PRR_PRODUCT_* and drop the duplicate
RCAR_PRODUCT_* macro.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I6b2789790b85edb79c026f0860d70f323d113d96

5 years agorcar_gen3: plat: Factor out PRR_ macros into rcar_def.h
Marek Vasut [Tue, 6 Aug 2019 16:58:38 +0000 (18:58 +0200)]
rcar_gen3: plat: Factor out PRR_ macros into rcar_def.h

Pull out the PRR_* macros into rcar_def.h and remove multiple copies of
it. Now that there are still RCAR_* macros in rcar_def.h too and they
have the exact same meaning as the PRR_* macros, but that's for another
patch.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: Icb7f61b971b1a23102bd1b9f58cda580660a55fc

5 years agoReduce the number of memory leaks in cert_create
Justin Chadwell [Mon, 12 Aug 2019 11:19:21 +0000 (12:19 +0100)]
Reduce the number of memory leaks in cert_create

The valgrind checks for cert_create have not been run in a long while -
as such there are a few memory leaks present. This patch fixes a few of
the major ones reported by valgrind. However, a few do remain.

Change-Id: Iab002fb2b0090043287d43fb54a4d18928c2ed85
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
5 years agoMerge "FVP_Base_AEMv8A platform: Fix cache maintenance operations" into integration
Paul Beesley [Fri, 16 Aug 2019 12:41:45 +0000 (12:41 +0000)]
Merge "FVP_Base_AEMv8A platform: Fix cache maintenance operations" into integration

5 years agoFVP_Base_AEMv8A platform: Fix cache maintenance operations
Alexei Fedorov [Mon, 29 Jul 2019 16:22:53 +0000 (17:22 +0100)]
FVP_Base_AEMv8A platform: Fix cache maintenance operations

This patch fixes FVP_Base_AEMv8A model hang issue with
ARMv8.4+ with cache modelling enabled configuration.
Incorrect L1 cache flush operation to PoU, using CLIDR_EL1
LoUIS field, which is required by the architecture to be
zero for ARMv8.4-A with ARMv8.4-S2FWB feature is replaced
with L1 to L2 and L2 to L3 (if L3 is present) cache flushes.
FVP_Base_AEMv8A model can be configured with L3 enabled by
setting `cluster0.l3cache-size` and `cluster1.l3cache-size`
to non-zero values, and presence of L3 is checked in
`aem_generic_core_pwr_dwn` function by reading
CLIDR_EL1.Ctype3 field value.

Change-Id: If3de3d4eb5ed409e5b4ccdbc2fe6d5a01894a9af
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoMerge changes from topic "lm/juno_dyn_cfg" into integration
Paul Beesley [Fri, 16 Aug 2019 10:24:53 +0000 (10:24 +0000)]
Merge changes from topic "lm/juno_dyn_cfg" into integration

* changes:
  Juno: Use shared mbedtls heap between bl1 and bl2
  Juno: add basic support for dynamic config

5 years agotegra: add support for multi console interface
Ambroise Vincent [Wed, 29 May 2019 13:04:16 +0000 (14:04 +0100)]
tegra: add support for multi console interface

This patch updates all Tegra platforms to use the new multi console API.

Change-Id: I27c0c7830a86e26491dea9991a689f0b01e4dbf0
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
Signed-off-by: Julius Werner <jwerner@chromium.org>
5 years agoMerge "intel: agilex: Fix memory controller driver" into integration
Paul Beesley [Thu, 15 Aug 2019 15:30:51 +0000 (15:30 +0000)]
Merge "intel: agilex: Fix memory controller driver" into integration

5 years agoMerge changes from topic "rockchip-uart-fixes" into integration
Paul Beesley [Thu, 15 Aug 2019 15:30:13 +0000 (15:30 +0000)]
Merge changes from topic "rockchip-uart-fixes" into integration

* changes:
  rockchip: rk3399: store actual debug uart information on suspend
  rockchip: move dt-coreboot uart distinction into param handling code
  rockchip: make uart baudrate configurable
  rockchip: px30: add uart5 as option for serial output

5 years agoMerge "AArch64: Align crash reporting output" into integration
Paul Beesley [Thu, 15 Aug 2019 15:18:25 +0000 (15:18 +0000)]
Merge "AArch64: Align crash reporting output" into integration

5 years agoAArch64: Align crash reporting output
Alexei Fedorov [Mon, 29 Jul 2019 12:34:07 +0000 (13:34 +0100)]
AArch64: Align crash reporting output

This patch modifies crash reporting for AArch64 to provide
aligned output of register dump and GIC registers.

Change-Id: I8743bf1d2d6d56086e735df43785ef28051c5fc3
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agointel: agilex: Fix memory controller driver
Hadi Asyrafi [Thu, 8 Aug 2019 10:52:31 +0000 (18:52 +0800)]
intel: agilex: Fix memory controller driver

Increase calibration delay, fix ddrio control config & nonsecure region
limit

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ibca3c247a3ad5104176ca9057d29755599f13c9b

5 years agoMerge "intel: agilex: Fix reliance on hard coded clock information" into integration
Paul Beesley [Wed, 14 Aug 2019 12:37:43 +0000 (12:37 +0000)]
Merge "intel: agilex: Fix reliance on hard coded clock information" into integration

5 years agointel: agilex: Fix reliance on hard coded clock information
Hadi Asyrafi [Wed, 14 Aug 2019 05:49:00 +0000 (13:49 +0800)]
intel: agilex: Fix reliance on hard coded clock information

Extract clock information for UART, MMC & Watchdog from the clock manager

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I42d3d4ceeaf45788d457472f6ddcd3fe099f0133

5 years agoMerge changes from topic "jc/coverity-fixes" into integration
Paul Beesley [Tue, 13 Aug 2019 11:20:25 +0000 (11:20 +0000)]
Merge changes from topic "jc/coverity-fixes" into integration

* changes:
  Fix Coverity #261967, Infinite loop
  Fix Coverity #343017, Missing unlock
  Fix Coverity #343008, Side affect in assertion
  Fix Coverity #342970, Uninitialized scalar variable

5 years agoJuno: Use shared mbedtls heap between bl1 and bl2
Louis Mayencourt [Wed, 31 Jul 2019 14:03:44 +0000 (15:03 +0100)]
Juno: Use shared mbedtls heap between bl1 and bl2

Change-Id: Ia1ecad58ebf9de3f3a44b17ad1de57424b431125
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
5 years agoJuno: add basic support for dynamic config
Louis Mayencourt [Mon, 29 Jul 2019 09:40:17 +0000 (10:40 +0100)]
Juno: add basic support for dynamic config

Add the disable_auth dynamic parameter, that allows to disable the
authentication when TBBR is enabled. This parameter is for development
only.

Change-Id: Ic24ad16738517f7e07c4f506dcf69a1ae8df7d2d
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
5 years agoMerge "spd: opteed: enable NS_TIMER_SWITCH" into integration
Alexei Fedorov [Mon, 12 Aug 2019 08:50:51 +0000 (08:50 +0000)]
Merge "spd: opteed: enable NS_TIMER_SWITCH" into integration

5 years agorockchip: rk3399: store actual debug uart information on suspend
Heiko Stuebner [Mon, 5 Aug 2019 14:44:36 +0000 (16:44 +0200)]
rockchip: rk3399: store actual debug uart information on suspend

The rk3399 suspend code saves and restores the debug uart settings, but
right now always does this for the default uart. Right now this works
only by chance for the majority of rk3399 boards, which do not deviate
from that default.

But both Coreboot as well as U-Boot-based platforms can actually use
different uarts for their output, which can be configured from either
devicetree or Coreboot-variables.

To fix this, just use the stored uart-base information instead of the
default constant.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Change-Id: I1ea059d59a1126f6f8702315df7e620e632b686e

5 years agorockchip: move dt-coreboot uart distinction into param handling code
Heiko Stuebner [Mon, 5 Aug 2019 14:40:35 +0000 (16:40 +0200)]
rockchip: move dt-coreboot uart distinction into param handling code

Rockchip platforms can be booted from either u-boot or coreboot.

So far the Coreboot-console was initizalized from a coreboot data struct
in the early_param2 callbacks and dt-based consoles with data from the
rockchip_get_uart_* functions.

But later code may also need this console information for example for
special suspend handling. To make this easy follow a suggestion from
Julius Werner and move the coreboot<->dt distinction into the
rockchip_get_uart_* functions, thus making correct data about the used
uart available to all Rockchip platform code at all times.

This includes a new rockchip_get_uart_clock as well, because while the
dt-platforms right now always just default the rate defined in a constant
Coreboot provides its own field for the clock rate and we don't want to
loose that information for the console init. Similarly the rk_uart_*
variables should move into the non-Coreboot code, to prevent them from
being marked as unused, which also requires the rk_get_uart_* functions
to move below the actual dt-parsing.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Change-Id: I278d595d2aa6c6864187fc8979a9fbff9814feac

5 years agoMerge changes from topic "intel-plat-refactor" into integration
Sandrine Bailleux [Wed, 7 Aug 2019 14:20:01 +0000 (14:20 +0000)]
Merge changes from topic "intel-plat-refactor" into integration

* changes:
  intel: Platform common code refactor
  intel: Platform common code refactor

5 years agointel: Platform common code refactor
Hadi Asyrafi [Thu, 1 Aug 2019 06:48:39 +0000 (14:48 +0800)]
intel: Platform common code refactor

Pull out common code from aarch64 and include

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I4d0f5e1bb01bcdacbedf8e6c359de594239b645f

5 years agoMerge changes from topic "qemu_sbsa" into integration
Sandrine Bailleux [Tue, 6 Aug 2019 14:54:35 +0000 (14:54 +0000)]
Merge changes from topic "qemu_sbsa" into integration

* changes:
  plat/qemu: add gicv3 support for qemu
  plat/qemu: move gicv2 codes to separate file

5 years agoFix Coverity #261967, Infinite loop
Justin Chadwell [Tue, 23 Jul 2019 13:56:48 +0000 (14:56 +0100)]
Fix Coverity #261967, Infinite loop

Coverity has identified that the __aeabi_imod function will loop forever
if the denominator is not a power of 2, which is probably not the
desired behaviour.

The functions in the rest of the file are compiler implementations of
division if ARMv7 does not implement division which is permitted by the
spec. However, while most of the functions in the file are documented
and referenced in other places online, __aeabi_uimod and __aeabi_imod
are not. For this reason, these functions have been removed from the
code base, which also removes the Coverity error.

Change-Id: I20066d72365329a8b03a5536d865c4acaa2139ae
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
5 years agoFix Coverity #343017, Missing unlock
Justin Chadwell [Tue, 23 Jul 2019 08:54:07 +0000 (09:54 +0100)]
Fix Coverity #343017, Missing unlock

All other returns from this function unlock the responses_lock, so we
also should release the lock in this case.

Change-Id: Ie2cfa8755723fed79e809f9480190d11f373a217
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
5 years agoFix Coverity #343008, Side affect in assertion
Justin Chadwell [Tue, 23 Jul 2019 08:48:38 +0000 (09:48 +0100)]
Fix Coverity #343008, Side affect in assertion

This patch simply splits off the increment of next_xlat into a separate
statement to ensure consistent behaviour if the assert was to ever be
removed.

Change-Id: I827f601ccea55f4da9442048419c9b8cc0c5d22e
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
5 years agoFix Coverity #342970, Uninitialized scalar variable
Justin Chadwell [Tue, 23 Jul 2019 08:45:18 +0000 (09:45 +0100)]
Fix Coverity #342970, Uninitialized scalar variable

This ensures that probe_data starts with a reasonable default, as
opposed to whatever was left on the stack.

Change-Id: I5550efea5e2bec7717f9fa063cb11e6a7005cce5
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
5 years agoMerge "meson: gxl: Fix CPU hotplug" into integration
Sandrine Bailleux [Tue, 6 Aug 2019 11:04:10 +0000 (11:04 +0000)]
Merge "meson: gxl: Fix CPU hotplug" into integration

5 years agorockchip: make uart baudrate configurable
Heiko Stuebner [Mon, 5 Aug 2019 12:46:00 +0000 (14:46 +0200)]
rockchip: make uart baudrate configurable

A previous patch already allowed to configure the uart output from the
devicetree, but on Rockchip platforms we also have the issue of different
vendors using different baudrates for their uarts.

For example, rk3399 has a default baudrate of 115200 which is true for
ChromeOS-devices and boards from Theobroma-Systems, while all the boards
using the vendor boot chain actually use a baudrate of 1500000.

Similarly the newly added px30 has a default of said 1500000 but some
boards may want to use the more widely used 115200.

The devicetree stdout-path node already contains the desired baudrate,
so add simple code to parse it from there and override the default,
which stays unchanged.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Change-Id: I7412139c3df3073a1996eb508ec08642ec6af90d

5 years agospd: opteed: enable NS_TIMER_SWITCH
Sumit Garg [Mon, 5 Aug 2019 09:04:48 +0000 (14:34 +0530)]
spd: opteed: enable NS_TIMER_SWITCH

Enable dispatcher to save/restore unbanked timer registers. So that
both secure (OP-TEE) and non-secure (Linux) worlds can have independent
access control over timer registers.

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

5 years agorockchip: px30: add uart5 as option for serial output
Heiko Stuebner [Mon, 5 Aug 2019 07:45:09 +0000 (09:45 +0200)]
rockchip: px30: add uart5 as option for serial output

The px30 mini-evb can use either uart2 (muxed with the sd-card pins) or
uart5 via its pin header for serial output. Uart5 is especially useful
when needing to boot from the sd-card, where uart2 obviously is not
useable.

So add the uart5 constants and it as uart option for the serial-param
handler.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Change-Id: Ib88df7a55d761ee104d312c9953a13de3beba1c4

5 years agoMerge "intel: stratix10: Fix BL31 memory mapping" into integration
Alexei Fedorov [Fri, 2 Aug 2019 12:50:31 +0000 (12:50 +0000)]
Merge "intel: stratix10: Fix BL31 memory mapping" into integration

5 years agoMerge "meson: gxl: Fix reset and power off" into integration
Alexei Fedorov [Fri, 2 Aug 2019 12:50:04 +0000 (12:50 +0000)]
Merge "meson: gxl: Fix reset and power off" into integration

5 years agointel: stratix10: Fix BL31 memory mapping
Hadi Asyrafi [Thu, 1 Aug 2019 03:29:48 +0000 (11:29 +0800)]
intel: stratix10: Fix BL31 memory mapping

Previous config blocks ATF runtime service communications with SDM mailbox

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ia857facd0bd0790056df94ed1e016bcf619a161e

5 years agomeson: gxl: Fix CPU hotplug
Remi Pommarel [Tue, 30 Jul 2019 16:04:38 +0000 (18:04 +0200)]
meson: gxl: Fix CPU hotplug

The CPU[1-3] are reset to initial/cold boot state (with their reset
address set to 0x0). In this state the cpus are waiting for another
one to set the reset address to bl31_warm_entrypoint and wake them up.

The CPU0 needs a bit of a workaround as changing the reset address
either through PSCI mailbox or the mmio mapped RVBAR (at 0xda834650)
does not seem to have any effect. Thus the workaround consists in
emulating the other CPUs' behavior with a WFE loop and manually jumping
to bl31_warm_entrypoint when woken back up by another one.

Change-Id: I11265620b5fd0619285e3993253a3f9a3ff6a7a4
Signed-off-by: Remi Pommarel <repk@triplefau.lt>
5 years agomeson: gxl: Fix reset and power off
Remi Pommarel [Thu, 4 Apr 2019 21:12:56 +0000 (23:12 +0200)]
meson: gxl: Fix reset and power off

Before CPU enters standby state (wfi), the AP needs to signal the SCP
through PSCI mailbox.

Also at boot time the AP has to wait for the SCP to be ready before
sending the first scpi commands or it can crash.

Change-Id: Iacc99f5bec745ad71922c5ea07ca5b87088133b6
Signed-off-by: Remi Pommarel <repk@triplefau.lt>
5 years agoMerge "Switch AARCH32/AARCH64 to __aarch64__" into integration
Alexei Fedorov [Fri, 2 Aug 2019 10:21:53 +0000 (10:21 +0000)]
Merge "Switch AARCH32/AARCH64 to __aarch64__" into integration

5 years agoMerge "Replace __ASSEMBLY__ with compiler-builtin __ASSEMBLER__" into integration
Alexei Fedorov [Fri, 2 Aug 2019 08:57:02 +0000 (08:57 +0000)]
Merge "Replace __ASSEMBLY__ with compiler-builtin __ASSEMBLER__" into integration

5 years agoSwitch AARCH32/AARCH64 to __aarch64__
Julius Werner [Tue, 9 Jul 2019 21:02:43 +0000 (14:02 -0700)]
Switch AARCH32/AARCH64 to __aarch64__

NOTE: AARCH32/AARCH64 macros are now deprecated in favor of __aarch64__.

All common C compilers pre-define the same macros to signal which
architecture the code is being compiled for: __arm__ for AArch32 (or
earlier versions) and __aarch64__ for AArch64. There's no need for TF-A
to define its own custom macros for this. In order to unify code with
the export headers (which use __aarch64__ to avoid another dependency),
let's deprecate the AARCH32 and AARCH64 macros and switch the code base
over to the pre-defined standard macro. (Since it is somewhat
unintuitive that __arm__ only means AArch32, let's standardize on only
using __aarch64__.)

Change-Id: Ic77de4b052297d77f38fc95f95f65a8ee70cf200
Signed-off-by: Julius Werner <jwerner@chromium.org>
5 years agoReplace __ASSEMBLY__ with compiler-builtin __ASSEMBLER__
Julius Werner [Tue, 9 Jul 2019 20:49:11 +0000 (13:49 -0700)]
Replace __ASSEMBLY__ with compiler-builtin __ASSEMBLER__

NOTE: __ASSEMBLY__ macro is now deprecated in favor of __ASSEMBLER__.

All common C compilers predefine a macro called __ASSEMBLER__ when
preprocessing a .S file. There is no reason for TF-A to define it's own
__ASSEMBLY__ macro for this purpose instead. To unify code with the
export headers (which use __ASSEMBLER__ to avoid one extra dependency),
let's deprecate __ASSEMBLY__ and switch the code base over to the
predefined standard.

Change-Id: Id7d0ec8cf330195da80499c68562b65cb5ab7417
Signed-off-by: Julius Werner <jwerner@chromium.org>
5 years agoMerge "doc: Suggest to use the latest version 8.3 of GCC" into integration
Alexei Fedorov [Thu, 1 Aug 2019 10:41:59 +0000 (10:41 +0000)]
Merge "doc: Suggest to use the latest version 8.3 of GCC" into integration

5 years agodoc: Suggest to use the latest version 8.3 of GCC
Louis Mayencourt [Mon, 15 Jul 2019 09:23:58 +0000 (10:23 +0100)]
doc: Suggest to use the latest version 8.3 of GCC

At the time of writting, GCC 8.3-2019.03 is the latest version available
on developer.arm.com.

Switch to bare-metal toolchain (arm-eabi-) for AArch32. This allows to
have a finer control on the use of floating-point and SIMD instructions.

Change-Id: I4438401405eae1e5f6d531b0162e8fa06f69135e
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
5 years agointel: Platform common code refactor
Hadi Asyrafi [Thu, 1 Aug 2019 07:21:20 +0000 (15:21 +0800)]
intel: Platform common code refactor

Pull out common code from agilex and stratix10

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Iddc0a9e6eccb30823d7b15615d5ce9c6bedb2abc

5 years agoMerge "intel: agilex: Fix BL31 memory mapping" into integration
Alexei Fedorov [Wed, 31 Jul 2019 16:21:46 +0000 (16:21 +0000)]
Merge "intel: agilex: Fix BL31 memory mapping" into integration

5 years agoMerge "Enable AMU for Cortex-Hercules" into integration
Alexei Fedorov [Wed, 31 Jul 2019 16:15:44 +0000 (16:15 +0000)]
Merge "Enable AMU for Cortex-Hercules" into integration

5 years agoEnable AMU for Cortex-Hercules
Balint Dobszay [Mon, 15 Jul 2019 09:46:20 +0000 (11:46 +0200)]
Enable AMU for Cortex-Hercules

Change-Id: Ie0a94783d0c8e111ae19fd592304e6485f04ca29
Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
5 years agoMerge "uniphier: fix typo and coding style" into integration
Alexei Fedorov [Wed, 31 Jul 2019 14:28:26 +0000 (14:28 +0000)]
Merge "uniphier: fix typo and coding style" into integration

5 years agoMerge "uniphier: replace DIV_ROUND_UP() with div_round_up() from utils_def.h" into...
Alexei Fedorov [Wed, 31 Jul 2019 14:28:21 +0000 (14:28 +0000)]
Merge "uniphier: replace DIV_ROUND_UP() with div_round_up() from utils_def.h" into integration

5 years agoMerge "rockchip: px30: Use new bl31_params_parse functions" into integration
Alexei Fedorov [Wed, 31 Jul 2019 14:16:45 +0000 (14:16 +0000)]
Merge "rockchip: px30: Use new bl31_params_parse functions" into integration

5 years agouniphier: fix typo and coding style
Masahiro Yamada [Fri, 26 Jul 2019 11:04:28 +0000 (20:04 +0900)]
uniphier: fix typo and coding style

Fix the typo "warn" -> "warm".

Also fix the following checkpatch.pl warnings:

  CHECK: Prefer using the BIT macro
  CHECK: No space is necessary after a cast
  CHECK: Alignment should match open parenthesis
  CHECK: Unnecessary parentheses around uniphier_io_policies[image_id].dev_handle

Change-Id: Ic11eea2668c4bf2d1e8f089e6338ba7b7156d80b
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agouniphier: replace DIV_ROUND_UP() with div_round_up() from utils_def.h
Masahiro Yamada [Fri, 26 Jul 2019 11:07:08 +0000 (20:07 +0900)]
uniphier: replace DIV_ROUND_UP() with div_round_up() from utils_def.h

Use the helper in utils_def.h instead of the own macro.

Change-Id: I527f9e75914d60f66354e365006b960ba5e8cbae
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agointel: agilex: Fix BL31 memory mapping
Hadi Asyrafi [Tue, 30 Jul 2019 02:56:38 +0000 (10:56 +0800)]
intel: agilex: Fix BL31 memory mapping

Previous config blocks ATF runtime service communications with SDM mailbox

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ic97aa381d3ceb96395595ec192132859d626b8d1

5 years agorockchip: px30: Use new bl31_params_parse functions
Ambroise Vincent [Mon, 29 Jul 2019 13:52:20 +0000 (14:52 +0100)]
rockchip: px30: Use new bl31_params_parse functions

This change is needed for the platform to compile following the changes
made in commits cbdc72b559ab and 3e02c7436cf4.

Change-Id: I3468dd27f3b4f3095fb82f445d51cd8714311eb7
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
5 years agoMerge "sgm775: Fix build fail for TSP support on sgm775" into integration
Soby Mathew [Fri, 26 Jul 2019 17:06:14 +0000 (17:06 +0000)]
Merge "sgm775: Fix build fail for TSP support on sgm775" into integration

5 years agoplat/qemu: add gicv3 support for qemu
Hongbo Zhang [Thu, 19 Apr 2018 06:42:23 +0000 (14:42 +0800)]
plat/qemu: add gicv3 support for qemu

This patch adds gicv3 support for qemu, in order not to break any legacy
use case, gicv2 is still set by default, gicv3 can be selected by
compiling parameter QEMU_USE_GIC_DRIVER=QEMU_GICV3.

Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
Reviewed-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
Tested-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
Change-Id: Ic63f38abf16ed3c36aa60e80d50103cf05cf797b

5 years agoplat/qemu: move gicv2 codes to separate file
Hongbo Zhang [Thu, 19 Apr 2018 05:06:07 +0000 (13:06 +0800)]
plat/qemu: move gicv2 codes to separate file

This file moves gicv2 codes to a new separate files, target is to add
gicv3 support later.

Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
Reviewed-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
Tested-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
Change-Id: I30eb1fda5ea5c2b35d79360c52f46601cbca1bcc

5 years agoMerge "rockchip: px30: Fix build error" into integration
Soby Mathew [Fri, 26 Jul 2019 10:26:37 +0000 (10:26 +0000)]
Merge "rockchip: px30: Fix build error" into integration

5 years agoMerge changes from topic "advk-serror" into integration
Soby Mathew [Fri, 26 Jul 2019 09:26:14 +0000 (09:26 +0000)]
Merge changes from topic "advk-serror" into integration

* changes:
  marvell/a3700: Prevent SError accessing PCIe link while it is down
  marvell: Switch to xlat_tables_v2

5 years agoMerge changes from topic "jun-add-imx7-pico" into integration
Soby Mathew [Fri, 26 Jul 2019 09:25:54 +0000 (09:25 +0000)]
Merge changes from topic "jun-add-imx7-pico" into integration

* changes:
  plat: imx7: Add PicoPi iMX7D basic support
  plat: imx7: refactor code for reuse

5 years agoMerge changes from topic "gby/cryptocell-multi-vers" into integration
Soby Mathew [Thu, 25 Jul 2019 15:38:10 +0000 (15:38 +0000)]
Merge changes from topic "gby/cryptocell-multi-vers" into integration

* changes:
  cryptocell: add product version awareness support
  cryptocell: move Cryptocell specific API into driver