project/bcm63xx/atf.git
6 years agoCreate a library file for libmbedtls
Roberto Vargas [Tue, 8 May 2018 09:27:10 +0000 (10:27 +0100)]
Create a library file for libmbedtls

TF Makefile was linking all the objects files generated for the
Mbed TLS library instead of creating a static library that could be
used in the linking stage.

Change-Id: I8e4cd843ef56033c9d3faeee71601d110b7e4c12
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
6 years agoCreate a library file for libc
Roberto Vargas [Tue, 8 May 2018 09:27:10 +0000 (10:27 +0100)]
Create a library file for libc

TF Makefile was linking all the objects files generated for the
c library instead of creating a static library that could be
used in the linking stage.

Change-Id: I721daea097e9b13cbb42c9f8eaa2af8fea0799cf
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
6 years agoCreate a library file for libfdt
Roberto Vargas [Tue, 8 May 2018 09:27:10 +0000 (10:27 +0100)]
Create a library file for libfdt

TF Makefile was linking all the objects files generated for the
fdt library instead of creating a static library that could be
used in the linking stage.

Change-Id: If3705bba188ec39e1fbf2322a7f2a9a941e1b90d
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
6 years agoAdd make macros to build library archives
Roberto Vargas [Tue, 8 May 2018 09:27:10 +0000 (10:27 +0100)]
Add make macros to build library archives

This patch adds all the make macros needed to create a library archive
and to use it in the link stage.

Change-Id: I26597bfd6543649d0b68a9b1e06aec1ba353e6de
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
6 years agoMerge pull request #1506 from danielboulby-arm/db/SeparateCodeAndROData
Dimitris Papastamos [Fri, 3 Aug 2018 09:56:47 +0000 (10:56 +0100)]
Merge pull request #1506 from danielboulby-arm/db/SeparateCodeAndROData

Fix build for SEPARATE_CODE_AND_RODATA=0

6 years agoMerge pull request #1509 from antonio-nino-diaz-arm/an/bool
Dimitris Papastamos [Fri, 3 Aug 2018 09:53:12 +0000 (10:53 +0100)]
Merge pull request #1509 from antonio-nino-diaz-arm/an/bool

xlat: psci: Use bool instead of int

6 years agoMerge pull request #1503 from ARM-software/dh/dual-lic
Dimitris Papastamos [Fri, 3 Aug 2018 08:36:49 +0000 (09:36 +0100)]
Merge pull request #1503 from ARM-software/dh/dual-lic

Update license information in readme.rst

6 years agoMerge pull request #1508 from sandrine-bailleux-arm/sb/fix-trusty-build
Dimitris Papastamos [Fri, 3 Aug 2018 08:34:58 +0000 (09:34 +0100)]
Merge pull request #1508 from sandrine-bailleux-arm/sb/fix-trusty-build

Fix handler prototype in Trusty generic dispatcher

6 years agopsci: Use bool in internal interfaces
Antonio Nino Diaz [Wed, 1 Aug 2018 15:42:10 +0000 (16:42 +0100)]
psci: Use bool in internal interfaces

Change-Id: I77c9cd2d1d6d0122cc49917fa686014bee154589
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoxlat: Use bool instead of int
Antonio Nino Diaz [Thu, 2 Aug 2018 08:57:29 +0000 (09:57 +0100)]
xlat: Use bool instead of int

Change-Id: I35d5b6a7c219f6f38983b30f157c1ed3808af17f
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoMerge pull request #1507 from jeenu-arm/bool
Dimitris Papastamos [Thu, 2 Aug 2018 09:21:27 +0000 (10:21 +0100)]
Merge pull request #1507 from jeenu-arm/bool

Define bool type

6 years agoFix build for SEPARATE_CODE_AND_RODATA=0
Daniel Boulby [Mon, 16 Jul 2018 13:09:15 +0000 (14:09 +0100)]
Fix build for SEPARATE_CODE_AND_RODATA=0

TF won't build since no memory region is specified
for when SEPARATE_CODE_AND_RODATA=0 it still relies on
the ARM_MAP_BL_RO_DATA region which is never defined for
this case. Create memory region combining code and RO data for
when the build flag SEPARATE_CODE_AND_RODATA=0 to fix this

Change-Id: I6c129eb0833497710cce55e76b8908ce03e0a638
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
6 years agoDefine bool type
Jeenu Viswambharan [Wed, 1 Aug 2018 13:56:52 +0000 (14:56 +0100)]
Define bool type

This would enable us to write semantically sensible code.

Change-Id: Ie7c75f9c024f671a037448f5c0922174fff3f0ce
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
6 years agoFix handler prototype in Trusty generic dispatcher
Sandrine Bailleux [Wed, 1 Aug 2018 13:55:34 +0000 (15:55 +0200)]
Fix handler prototype in Trusty generic dispatcher

Fix the types of the arguments of trusty_generic_platform_smc()
to match the expected prototype of a runtime service handler
(see rt_svc_handle_t type).

Change-Id: Ie839d116ca924b4b018ea2abbef72a1073da2a32
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
6 years agoMerge pull request #1500 from danielboulby-arm/db/RORedirection
Dimitris Papastamos [Tue, 31 Jul 2018 15:09:07 +0000 (16:09 +0100)]
Merge pull request #1500 from danielboulby-arm/db/RORedirection

Set console function pointers to const

6 years agoUpdate license information in readme.rst
Dan Handley [Wed, 25 Jul 2018 15:42:10 +0000 (16:42 +0100)]
Update license information in readme.rst

Added information on how disjunctively dual licensed code from
other projects is treated in the TF-A project.

Change-Id: Idca329abba4d36bd3c4fd722ac1556940b9135a2
Signed-off-by: Dan Handley <dan.handley@arm.com>
6 years agoMerge pull request #1498 from glneo/cache-early-fixes
Dimitris Papastamos [Mon, 30 Jul 2018 15:53:34 +0000 (16:53 +0100)]
Merge pull request #1498 from glneo/cache-early-fixes

Early cache enable and coherency fixes

6 years agoMerge pull request #1493 from antonio-nino-diaz-arm/an/xlat-misra
Dimitris Papastamos [Mon, 30 Jul 2018 15:44:43 +0000 (16:44 +0100)]
Merge pull request #1493 from antonio-nino-diaz-arm/an/xlat-misra

Fix MISRA defects in xlat tables lib and SP805 driver

6 years agoSet console function pointers to const
Daniel Boulby [Thu, 7 Jun 2018 13:15:15 +0000 (14:15 +0100)]
Set console function pointers to const

Set the function pointers in the console struct and the functions
they point to to const since they only need to be defined when
the console is being initialised and should not be changed after

Change-Id: I0574307111e3ab2f13d1a4a74c3fa75532dfa4be
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
6 years agoFix MISRA defects in SP805 driver
Antonio Nino Diaz [Tue, 24 Jul 2018 10:27:52 +0000 (11:27 +0100)]
Fix MISRA defects in SP805 driver

Fix violations of MISRA C-2012 Rules 10.1, 10.3 and 10.4.

Change-Id: I13c6acda798c1666892f630f097a23e68748f9e4
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoxlat: Fix MISRA defects
Antonio Nino Diaz [Tue, 24 Jul 2018 09:20:53 +0000 (10:20 +0100)]
xlat: Fix MISRA defects

Fix defects of MISRA C-2012 rules 8.13, 10.1, 10.3, 10.4, 10.8, 11.6,
14.4, 15.7, 17.8, 20.10, 20.12, 21.1 and Directive 4.9.

Change-Id: I7ff61e71733908596dbafe2e99d99b4fce9765bd
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoMerge pull request #1497 from SNG-ARM/master
Soby Mathew [Fri, 27 Jul 2018 10:03:13 +0000 (11:03 +0100)]
Merge pull request #1497 from SNG-ARM/master

RAS changes for SGI575 platform

6 years agoMerge pull request #1494 from hzhuang1/pcie_pin
Soby Mathew [Fri, 27 Jul 2018 10:02:36 +0000 (11:02 +0100)]
Merge pull request #1494 from hzhuang1/pcie_pin

Hikey960: configure pins for PCIe controller

6 years agoHikey960: configure pins for PCIe controller
Kaihua Zhong [Mon, 16 Jul 2018 09:33:48 +0000 (17:33 +0800)]
Hikey960: configure pins for PCIe controller

GPIO_089 connects to PCIE_PERST_N. It needs to be configured as
output low.

Signed-off-by: Kaihua Zhong <zhongkaihua@huawei.com>
Signed-off-by: Xiaowei Song <songxiaowei@hisilicon.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
6 years agoti: k3: common: Only enable caches early
Andrew F. Davis [Thu, 26 Jul 2018 19:25:03 +0000 (14:25 -0500)]
ti: k3: common: Only enable caches early

We can enter and exit coherency without any software operations,
but HW_ASSISTED_COHERENCY has stronger implications that are
causing issues. Until these can be resolved, only use the weaker
WARMBOOT_ENABLE_DCACHE_EARLY flag.

Signed-off-by: Andrew F. Davis <afd@ti.com>
6 years agoGIC: Do not flush cache when unneeded
Andrew F. Davis [Thu, 26 Jul 2018 18:50:14 +0000 (13:50 -0500)]
GIC: Do not flush cache when unneeded

When a platform enables its caches before it initializes the
GICC/GICR interface then explicit cache maintenance is not
needed. Remove these here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
6 years agoPSCI: Fix logic error to skip cache flushing
Andrew F. Davis [Thu, 26 Jul 2018 19:00:32 +0000 (14:00 -0500)]
PSCI: Fix logic error to skip cache flushing

If either USE_COHERENT_MEM or HW_ASSISTED_COHERENCY being true
should cause us to not enter the ifdef block, then the logic
is not correct here. Posibly bad use of De Morgan's law?
Fix this.

Signed-off-by: Andrew F. Davis <afd@ti.com>
6 years agoRAS: SGI: Add flags needed to build components for RAS feature
Sughosh Ganu [Wed, 16 May 2018 13:18:56 +0000 (18:48 +0530)]
RAS: SGI: Add flags needed to build components for RAS feature

Add the various flags that are required to build the components needed
to enable the RAS feature on SGI575 platform. By default, all flags
are set to 0, disabling building of all corresponding components.

Change-Id: I7f8536fba895043ef6e397cc33ac9126cb572132
Signed-off-by: Sughosh Ganu <sughosh.ganu@arm.com>
6 years agoRAS: SGI575: Add platform specific RAS changes
Sughosh Ganu [Wed, 16 May 2018 11:56:40 +0000 (17:26 +0530)]
RAS: SGI575: Add platform specific RAS changes

Add platform specific changes needed to add support for the RAS
feature on SGI575 platform, including adding a mapping for the
CPER buffer being used on SGI575 platform.

Change-Id: I01a982e283609b5c48661307906346fa2738a43b
Signed-off-by: Sughosh Ganu <sughosh.ganu@arm.com>
6 years agoRAS: SGI: Add platform handler for RAS interrupts
Sughosh Ganu [Wed, 16 May 2018 11:52:35 +0000 (17:22 +0530)]
RAS: SGI: Add platform handler for RAS interrupts

Add a platform specific handler for RAS interrupts and configure the
platform RAS interrupts for EL3 handling. The interrupt handler passes
control to StandaloneMM code executing in S-EL0, which populates the
CPER buffer with relevant error information. The handler subsequently
invokes the SDEI client which processes the information in the error
information in the CPER buffer. The helper functions
plat_sgi_get_ras_ev_map and plat_sgi_get_ras_ev_map_size would be
defined for sgi platforms in the subsequent patch, which adds sgi575
specific RAS changes.

Change-Id: I490f16c15d9917ac40bdc0441659b92380108d63
Signed-off-by: Sughosh Ganu <sughosh.ganu@arm.com>
6 years agoSPM: SGI: Map memory allocated for secure partitions
Sughosh Ganu [Wed, 16 May 2018 11:49:56 +0000 (17:19 +0530)]
SPM: SGI: Map memory allocated for secure partitions

The secure partition manager reserves chunks of memory which are used
for the S-EL0 StandaloneMM image and the buffers required for
communication between the Non-Secure world with the StandaloneMM
image. Add the memory chunks to relevant arrays for mapping the
regions of memory with corresponding attributes.

Change-Id: If371d1afee0a50ca7cacd55e16aeaca949d5062b
Signed-off-by: Sughosh Ganu <sughosh.ganu@arm.com>
6 years agoARM platforms: Allow board specific definition of SP stack base
Sughosh Ganu [Wed, 16 May 2018 10:05:25 +0000 (15:35 +0530)]
ARM platforms: Allow board specific definition of SP stack base

The SGI platforms need to allocate memory for CPER buffers. These
platform buffers would be placed between the shared reserved memory
and the per cpu stack memory, thus the need to redefine stack base
pointer for these platforms. This patch allows each board in ARM
platform to define the PLAT_SP_IMAGE_STACK_BASE.

Change-Id: Ib5465448b860ab7ab0f645f7cb278a67acce7be9
Signed-off-by: Sughosh Ganu <sughosh.ganu@arm.com>
6 years agoSGI: Include arm_spm_def.h in platform_def.h
Sughosh Ganu [Wed, 16 May 2018 09:43:25 +0000 (15:13 +0530)]
SGI: Include arm_spm_def.h in platform_def.h

Include arm_spm_def.h in the platform_def.h file. Without this
inclusion, we get build errors like

In file included from services/std_svc/spm/sp_setup.c:12:0:
services/std_svc/spm/sp_setup.c: In function 'spm_sp_setup':
services/std_svc/spm/sp_setup.c:61:57: error: 'PLAT_SPM_BUF_BASE'
  undeclared (first use in this function)
  write_ctx_reg(get_gpregs_ctx(ctx), CTX_GPREG_X0, PLAT_SPM_BUF_BASE);

Now that the platform_def.h includes arm_spm_def.h, remove inclusion
of platform_def.h in arm_spm_def.h to remove the circular dependency.

Change-Id: I5225c8ca33fd8d288849524395e436c3d56daf17
Signed-off-by: Sughosh Ganu <sughosh.ganu@arm.com>
6 years agoRAS: ras_common: Add null pointer check for error record probe function
Sughosh Ganu [Sat, 12 May 2018 05:32:31 +0000 (11:02 +0530)]
RAS: ras_common: Add null pointer check for error record probe function

Add a null pointer check for the error record probe
function -- avoids a panic in case a platform has not defined it.

Change-Id: I1139fa0df33297a12ec16615cacd07540925f991
Signed-off-by: Sughosh Ganu <sughosh.ganu@arm.com>
6 years agoInclude board_arm_def.h through the platform's header
Sughosh Ganu [Sat, 10 Mar 2018 13:42:28 +0000 (19:12 +0530)]
Include board_arm_def.h through the platform's header

The board_arm_def.h header file needs to be included via the platform
definition header. Not doing so, results in a redefinition error of
PLAT_ARM_MAX_BL31_SIZE macro, if defined in the platform definition
file.

Change-Id: I1d178f6e8a6a41461e7fbcab9f6813a2faa2d82b
Signed-off-by: Sughosh Ganu <sughosh.ganu@arm.com>
6 years agoMerge pull request #1486 from antonio-nino-diaz-arm/an/psci-misra
danh-arm [Wed, 25 Jul 2018 15:09:54 +0000 (16:09 +0100)]
Merge pull request #1486 from antonio-nino-diaz-arm/an/psci-misra

Fix several MISRA defects in PSCI library

6 years agoMerge pull request #1466 from Yann-lms/stm32mp1
danh-arm [Wed, 25 Jul 2018 15:05:35 +0000 (16:05 +0100)]
Merge pull request #1466 from Yann-lms/stm32mp1

Add STMicroelectronics STM32MP1 platform support

6 years agoMerge pull request #1492 from jts-arm/docs
danh-arm [Wed, 25 Jul 2018 14:23:58 +0000 (15:23 +0100)]
Merge pull request #1492 from jts-arm/docs

Reword LOAD_IMAGE_V2 in user guide & fix a typo

6 years agoMerge pull request #1491 from jeenu-arm/misra-fix
danh-arm [Wed, 25 Jul 2018 14:23:25 +0000 (15:23 +0100)]
Merge pull request #1491 from jeenu-arm/misra-fix

Arm platforms: Fix type mismatch for arm_pm_idle_states

6 years agoMerge pull request #1472 from danielboulby-arm/db/Reclaim
danh-arm [Wed, 25 Jul 2018 14:16:24 +0000 (15:16 +0100)]
Merge pull request #1472 from danielboulby-arm/db/Reclaim

Rework page table setup for varying number of mem regions

6 years agoUpdate list of maintainers for STM32MP1
Yann Gautier [Thu, 5 Jul 2018 14:52:00 +0000 (16:52 +0200)]
Update list of maintainers for STM32MP1

Signed-off-by: Yann Gautier <yann.gautier@st.com>
6 years agostm32mp1: Add platform documentation
Yann Gautier [Mon, 16 Jul 2018 12:49:34 +0000 (14:49 +0200)]
stm32mp1: Add platform documentation

Signed-off-by: Yann Gautier <yann.gautier@st.com>
6 years agostm32mp1: Link BL2, BL32 and DTB in one binary
Yann Gautier [Mon, 16 Jul 2018 12:34:50 +0000 (14:34 +0200)]
stm32mp1: Link BL2, BL32 and DTB in one binary

platform.mk is updated to have compilation rules for DTB, stm32image tool,
and the concatenation of the 3 binaries.
A new linker script and an assembly file are added to manage this.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Mathieu Belou <mathieu.belou@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
6 years agotools: Add stm32image tool into TF-A
Yann Gautier [Thu, 5 Jul 2018 14:50:22 +0000 (16:50 +0200)]
tools: Add stm32image tool into TF-A

This tools adds a specific header to ST TF-A binary.
This header is used by STM32MP1 ROM code to check the bootloader.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
6 years agostm32mp1: Add device tree files
Yann Gautier [Thu, 5 Jul 2018 14:49:51 +0000 (16:49 +0200)]
stm32mp1: Add device tree files

Those device tree files are taken from STM32MP1 U-Boot and Linux.
And they are updated to fit TF-A needs.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
6 years agostm32mp1: Add BL32 SP_min secure monitor
Yann Gautier [Mon, 16 Jul 2018 17:36:06 +0000 (19:36 +0200)]
stm32mp1: Add BL32 SP_min secure monitor

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Mathieu Belou <mathieu.belou@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
6 years agostm32mp1: Add DDR support and its security with TZC400
Yann Gautier [Tue, 24 Jul 2018 15:18:19 +0000 (17:18 +0200)]
stm32mp1: Add DDR support and its security with TZC400

The DDR driver is under dual license, BSD and GPLv2.
The configuration parameters are taken from device tree.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
6 years agostm32mp1: Add PMIC support
Yann Gautier [Mon, 16 Jul 2018 15:55:07 +0000 (17:55 +0200)]
stm32mp1: Add PMIC support

If a PMIC companion chip is present on board, it has to be configured
for regulators supplies.
This check is done with board DT configuration.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Pascal Paillet <p.paillet@st.com>
6 years agostm32mp1: Add console support
Yann Gautier [Thu, 5 Jul 2018 14:48:16 +0000 (16:48 +0200)]
stm32mp1: Add console support

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
6 years agostm32mp1: save boot information in backup registers
Yann Gautier [Fri, 20 Jul 2018 09:36:05 +0000 (11:36 +0200)]
stm32mp1: save boot information in backup registers

This will be used by BL33 to get boot device and instance.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Mathieu Belou <mathieu.belou@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
6 years agostm32mp1: Add GPIO support
Yann Gautier [Fri, 13 Jul 2018 19:33:09 +0000 (21:33 +0200)]
stm32mp1: Add GPIO support

The management of pinctrl nodes of device tree is also added.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Mathieu Belou <mathieu.belou@st.com>
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
6 years agostm32mp1: Add clock and reset support
Yann Gautier [Tue, 24 Jul 2018 15:13:36 +0000 (17:13 +0200)]
stm32mp1: Add clock and reset support

The clock driver is under dual license, BSD and GPLv2.
The clock driver uses device tree, so a minimal support for this is added.
The required files for driver and DTS files are in include/dt-bindings/.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
6 years agoIntroduce STMicroelectronics STM32MP1 platform
Yann Gautier [Mon, 16 Jul 2018 08:54:09 +0000 (10:54 +0200)]
Introduce STMicroelectronics STM32MP1 platform

STM32MP1 is a microprocessor designed by STMicroelectronics,
based on a dual Arm Cortex-A7.
It is an Armv7-A platform, using dedicated code from TF-A.

STM32MP1 uses BL2 compiled with BL2_AT_EL3.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Mathieu Belou <mathieu.belou@st.com>
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Pascal Paillet <p.paillet@st.com>
6 years agoAdd STMicroelectronics to the list of contributors
Yann Gautier [Thu, 5 Jul 2018 14:45:46 +0000 (16:45 +0200)]
Add STMicroelectronics to the list of contributors

Signed-off-by: Yann Gautier <yann.gautier@st.com>
6 years agoRework page table setup for varying number of mem regions
Daniel Boulby [Fri, 6 Jul 2018 15:54:44 +0000 (16:54 +0100)]
Rework page table setup for varying number of mem regions

Change arm_setup_page_tables() to take a variable number of memory
regions. Remove coherent memory region from BL1, BL2 and BL2U as
their coherent memory region doesn't contain anything and
therefore has a size of 0. Add check to ensure this
doesn't change without us knowing.

Change-Id: I790054e3b20b056dda1043a4a67bd7ac2d6a3bc0
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
6 years agoMerge pull request #1488 from b49020/integration
danh-arm [Tue, 24 Jul 2018 13:37:23 +0000 (14:37 +0100)]
Merge pull request #1488 from b49020/integration

synquacer: Enable optional OP-TEE support

6 years agoMerge pull request #1485 from jeenu-arm/ras
danh-arm [Tue, 24 Jul 2018 13:36:43 +0000 (14:36 +0100)]
Merge pull request #1485 from jeenu-arm/ras

Double-fault and fatal error handling support

6 years agoReword LOAD_IMAGE_V2 in user guide & fix a typo
John Tsichritzis [Mon, 23 Jul 2018 08:18:04 +0000 (09:18 +0100)]
Reword LOAD_IMAGE_V2 in user guide & fix a typo

Change-Id: Id2639218dfffec84d8b0fa295d7e896129d4fcd7
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
6 years agosynquacer: Enable optional OP-TEE support
Sumit Garg [Thu, 19 Jul 2018 12:35:50 +0000 (18:05 +0530)]
synquacer: Enable optional OP-TEE support

OP-TEE loading is optional on Developerbox controlled via SCP
firmware. To check if OP-TEE is loaded or not, we use DRAM1 region
info passed by SCP firmware.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
6 years agoMerge pull request #1487 from hzhuang1/tbb_bl1
danh-arm [Tue, 24 Jul 2018 10:06:24 +0000 (11:06 +0100)]
Merge pull request #1487 from hzhuang1/tbb_bl1

hikey: include TBB in BL1

6 years agoArm platforms: Fix type mismatch for arm_pm_idle_states
Jeenu Viswambharan [Thu, 19 Jul 2018 07:03:46 +0000 (08:03 +0100)]
Arm platforms: Fix type mismatch for arm_pm_idle_states

This also gets rid of MISRA violations for Rule 8.3 and 8.4.

Change-Id: I45bba011b16f90953dd4b260fcd58381f978eedc
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
6 years agoPSCI: Fix MISRA defects in common and setup code
Antonio Nino Diaz [Tue, 17 Jul 2018 14:10:08 +0000 (15:10 +0100)]
PSCI: Fix MISRA defects in common and setup code

MISRA C-2012 Rules 10.1, 10.3, 17.8 and 20.7.

Change-Id: I3980bd2a1d845559af4bbe2887a0250d0506a064
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoPSCI: Fix MISRA defects in stat code
Antonio Nino Diaz [Wed, 18 Jul 2018 15:21:11 +0000 (16:21 +0100)]
PSCI: Fix MISRA defects in stat code

MISRA C-2012 Rules 10.1, 10.3 and 20.7.

Change-Id: I972ce63f0d8fa157ed17e826b84f218fe498c517
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoPSCI: Fix MISRA defects in MEM_PROTECT
Antonio Nino Diaz [Mon, 16 Jul 2018 22:36:10 +0000 (23:36 +0100)]
PSCI: Fix MISRA defects in MEM_PROTECT

MISRA C-2012 Rules 10.1 and 10.3.

Change-Id: I88cd5f56cda5780f2e0ba541c0f5b561309ab3af
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoPSCI: Fix MISRA defects in ON/OFF/SUSPEND/SYSTEM_OFF
Antonio Nino Diaz [Mon, 16 Jul 2018 22:19:25 +0000 (23:19 +0100)]
PSCI: Fix MISRA defects in ON/OFF/SUSPEND/SYSTEM_OFF

Fix violations of MISRA C-2012 Rules 8.13, 10.1, 10.3, 17.7 and 20.7.

Change-Id: I6f45a1069b742aebf9e1d6a403717b1522083f51
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoPSCI: Fix MISRA defects in platform code
Antonio Nino Diaz [Wed, 18 Jul 2018 15:24:16 +0000 (16:24 +0100)]
PSCI: Fix MISRA defects in platform code

Fix violations of MISRA C-2012 Rules 10.1, 10.3, 13.3, 14.4, 17.7 and
17.8.

Change-Id: I6c9725e428b5752f1d80684ec29cb6c52a5c0c2d
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agohikey: include TBB in BL1
Haojian Zhuang [Wed, 18 Jul 2018 09:07:00 +0000 (17:07 +0800)]
hikey: include TBB in BL1

BL1 is used in recovery mode on HiKey. The TBB implementation
on HiKey is in BL2. It means that user need to build ATF BL2
with TBB and ATF BL1 with non-TBB. It's inconvenient.

So include TBB in BL1, too.

Signed-off-by: Teddy Reed <teddy@prosauce.org>
Signed-off-by: Victor Chong <victor.chong@linaro.org>
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
6 years agoPSCI: Fix types of definitions
Antonio Nino Diaz [Fri, 20 Jul 2018 08:17:26 +0000 (09:17 +0100)]
PSCI: Fix types of definitions

Also change header guards to fix defects of MISRA C-2012 Rule 21.1.

Change-Id: Ied0d4b0e557ef6119ab669d106d2ac5d99620c57
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Acked-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoPMF: Fix MISRA defects
Antonio Nino Diaz [Wed, 18 Jul 2018 12:26:25 +0000 (13:26 +0100)]
PMF: Fix MISRA defects

Fix instances of MISRA C-2012 Rule 10.1 and 21.1.

Change-Id: I5676edede0703481e3635be0bc4a635df8e48f5e
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoPSCI: Refactor lock macros to comply with MISRA
Antonio Nino Diaz [Tue, 17 Jul 2018 08:51:33 +0000 (09:51 +0100)]
PSCI: Refactor lock macros to comply with MISRA

Fix MISRA C-2012 Directive 4.9 defects.

Change-Id: Ibd5364d8f138ddcf59c8074c32b35769366807dc
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoPSCI: Add missing function argument names
Antonio Nino Diaz [Mon, 16 Jul 2018 16:32:37 +0000 (17:32 +0100)]
PSCI: Add missing function argument names

Fix MISRA C-2012 Rules 8.2 and 21.1.

Change-Id: I7f41fe76fe16399734d11847ab601ad8eb78df1a
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoPSCI: Replace macros by static inline functions
Antonio Nino Diaz [Wed, 18 Jul 2018 10:57:21 +0000 (11:57 +0100)]
PSCI: Replace macros by static inline functions

Fix MISRA C-2012 Directive 4.9 and Rule 21.1 defects.

Change-Id: I96c216317d38741ee632d2640cd7b36e6723d5c2
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoIncrease BL2U stack size
Daniel Boulby [Fri, 20 Jul 2018 11:28:55 +0000 (12:28 +0100)]
Increase BL2U stack size

BL2U is running out of stack during firmware update. Increase
stack size to prevent this

Change-Id: I9b1a4e237a00172c6738c84b455b3878ab184cb8
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
6 years agoFix check_[uptr/u32]_overflow() macros MISRA defects
Antonio Nino Diaz [Wed, 18 Jul 2018 12:23:07 +0000 (13:23 +0100)]
Fix check_[uptr/u32]_overflow() macros MISRA defects

Add missing parentheses to fix MISRA C-2012 Rule 12.1.

Also, the result of a comparison is an essentially boolean value, it
isn't needed to return 1 or 0 depending on it.

Also, fix header guards (MISRA C-2012 Rule 21.1).

Change-Id: I90c0bcdeb2787c1ca659fc9a981808ece7958de3
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoIntroduce UL(), L() and LL() macros
Antonio Nino Diaz [Wed, 18 Jul 2018 10:56:00 +0000 (11:56 +0100)]
Introduce UL(), L() and LL() macros

utils_def.h already has U() and ULL(), but not UL(), which is needed for
types like uinptr_t and u_register_t.

Also added L() and LL() for signed values.

Change-Id: I0654df80d57149ff49507c52f1b27f3d500486a0
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoMerge pull request #1450 from MISL-EBU-System-SW/marvell-support-v6
danh-arm [Thu, 19 Jul 2018 16:11:32 +0000 (17:11 +0100)]
Merge pull request #1450 from MISL-EBU-System-SW/marvell-support-v6

Marvell support for Armada 8K SoC family

6 years agoMerge pull request #1483 from antonio-nino-diaz-arm/an/rpi3-psci
danh-arm [Thu, 19 Jul 2018 14:37:54 +0000 (15:37 +0100)]
Merge pull request #1483 from antonio-nino-diaz-arm/an/rpi3-psci

rpi3: PSCI and Linux boot improvements

6 years agoMerge pull request #1481 from antonio-nino-diaz-arm/an/xlat-refactor
danh-arm [Thu, 19 Jul 2018 14:33:19 +0000 (15:33 +0100)]
Merge pull request #1481 from antonio-nino-diaz-arm/an/xlat-refactor

xlat: More refactoring

6 years agoMerge pull request #1449 from theopolis/hikey-tbb
danh-arm [Thu, 19 Jul 2018 10:49:56 +0000 (11:49 +0100)]
Merge pull request #1449 from theopolis/hikey-tbb

hikey: Add experimental TBB support

6 years agoMerge pull request #1482 from sandrine-bailleux-arm/sb/fix-hcptr
danh-arm [Thu, 19 Jul 2018 10:36:58 +0000 (11:36 +0100)]
Merge pull request #1482 from sandrine-bailleux-arm/sb/fix-hcptr

Misc arch.h fixes and cleanup

6 years agoRAS: Update porting guide with RAS platform handlers
Jeenu Viswambharan [Thu, 12 Jul 2018 09:00:01 +0000 (10:00 +0100)]
RAS: Update porting guide with RAS platform handlers

Change-Id: I76cb1d387ab51ee48fa91fd7458c7041b454ceee
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
6 years agoRAS: Introduce handler for EL3 EAs
Jeenu Viswambharan [Fri, 6 Jul 2018 15:50:06 +0000 (16:50 +0100)]
RAS: Introduce handler for EL3 EAs

External Aborts while executing in EL3 is fatal in nature. This patch
allows for the platform to define a handler for External Aborts received
while executing in EL3. A default implementation is added which falls
back to platform unhandled exception.

Change-Id: I466f2c8113a33870f2c7d2d8f2bf20437d9fd354
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
6 years agoRAS: Introduce handler for Double Faults
Jeenu Viswambharan [Thu, 17 May 2018 10:24:01 +0000 (11:24 +0100)]
RAS: Introduce handler for Double Faults

Double fault is when the PE receives another error whilst one is being
handled. To detect double fault condition, a per-CPU flag is introduced
to track the status of error handling. The flag is checked/modified
while temporarily masking external aborts on the PE.

This patch routes double faults to a separate platform-defined handler.

Change-Id: I70e9b7ba4c817273c55a0af978d9755ff32cc702
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
6 years agoRAS: Introduce handler for Uncontainable errors
Jeenu Viswambharan [Thu, 17 May 2018 08:52:36 +0000 (09:52 +0100)]
RAS: Introduce handler for Uncontainable errors

Uncontainable errors are the most severe form of errors, which typically
mean that the system state can't be trusted any more. This further means
that normal error recovery process can't be followed, and an orderly
shutdown of the system is often desirable.

This patch allows for the platform to define a handler for Uncontainable
errors received. Due to the nature of Uncontainable error, the handler
is expected to initiate an orderly shutdown of the system, and therefore
is not expected to return. A default implementation is added which falls
back to platform unhandled exception.

Also fix ras_arch.h header guards.

Change-Id: I072e336a391a0b382e77e627eb9e40729d488b55
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
6 years agomake: support libraries in MAKE_BL macro
Konstantin Porotchkin [Thu, 21 Jun 2018 10:40:33 +0000 (13:40 +0300)]
make: support libraries in MAKE_BL macro

Add support for BLx stages to use libraries in MAKE_BL macro.
This change does not affect BL stages that do not have
BL_LIBS variable defined in their makefiles.
However in case that BL wants to use external library
(for instance vendor-specific DDR initialization code supplied
as a library), this patch will allow to build BL image linked
with such library.

Change-Id: Ife29069a72dc4aff833db6ef8b828736d6689b78
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
6 years agoio: Allow image load to address zero
Konstantin Porotchkin [Mon, 7 May 2018 09:52:48 +0000 (12:52 +0300)]
io: Allow image load to address zero

Remove assert on buffer address equal zero.
Marvell uses address 0x0 for loading BL33,
so this check is irrelevant and breaks the
debug builds on Marvell platforms.

Change-Id: Ie56a51138e2e4ddd8986dd7036797dc2d8b10125
Signed-off-by: Haim Boot <hayim@marvell.com>
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Reviewed-on: http://vgitil04.il.marvell.com:8080/54589

6 years agoplat: marvell: Add board support for A8K platform
Konstantin Porotchkin [Thu, 7 Jun 2018 15:48:49 +0000 (18:48 +0300)]
plat: marvell: Add board support for A8K platform

Add support for A8K platform boards

Change-Id: Ife025d930d2ab6cabbc13bbe19b2273cc1c938c8
Signed-off-by: Hanna Hawa <hannah@marvell.com>
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
6 years agoplat: marvell: Add common ARMADA platform components
Konstantin Porotchkin [Thu, 7 Jun 2018 15:31:14 +0000 (18:31 +0300)]
plat: marvell: Add common ARMADA platform components

Add common Marvell ARMADA platform components.
This patch also includes common components for Marvell
ARMADA 8K platforms.

Change-Id: I42192fdc6525a42e46b3ac2ad63c83db9bcbfeaf
Signed-off-by: Hanna Hawa <hannah@marvell.com>
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
6 years agodocs: Add Marvell build and porting documents
Konstantin Porotchkin [Mon, 26 Feb 2018 14:32:35 +0000 (16:32 +0200)]
docs: Add Marvell build and porting documents

Change-Id: I341440701b7e5e3555e604dd9d0a356795e6c4fb
Signed-off-by: Hanna Hawa <hannah@marvell.com>
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
6 years agotools: add support for Marvell doimage
Konstantin Porotchkin [Mon, 26 Feb 2018 14:28:40 +0000 (16:28 +0200)]
tools: add support for Marvell doimage

Add Marvell "doimage" utility support.
The "doimage" utility allows to create flash images compatible
with Marvell BootROM image format. Additionally this tool
allows the flash image parsing and verification.

Change-Id: Ie8d7ccd0cc2978684e7eecb695f375395fc749ee
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
6 years agomarvell: drivers: Add i2c driver
Konstantin Porotchkin [Mon, 26 Feb 2018 14:06:35 +0000 (16:06 +0200)]
marvell: drivers: Add i2c driver

Add i2c driver for A8K SoC family.

Change-Id: I5932b2fce286d84fc3ad5a74c4c456001faa3196
Signed-off-by: Hanna Hawa <hannah@marvell.com>
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
6 years agomvebu: cp110: add COMPHY driver
Konstantin Porotchkin [Tue, 24 Apr 2018 16:23:09 +0000 (19:23 +0300)]
mvebu: cp110: add COMPHY driver

Add COMPHY driver for usage in a runtime service.

Change-Id: I6fb42d0a099496d5699ee24684ae2b93ed35770b
Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
6 years agomarvell: drivers: Add thermal driver
Konstantin Porotchkin [Mon, 26 Feb 2018 14:08:26 +0000 (16:08 +0200)]
marvell: drivers: Add thermal driver

Add thermal driver for A8K SoC family.
The termal unit data is used by Marvell DRAM initialization
code for optimizing the memory controller configuration

Change-Id: Iad92689fa6e4224a89d872e9aa015393abd9cf73
Signed-off-by: Hanna Hawa <hannah@marvell.com>
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
6 years agomarvell: drivers: Add L3/system cache management drivers
Konstantin Porotchkin [Mon, 26 Feb 2018 14:04:25 +0000 (16:04 +0200)]
marvell: drivers: Add L3/system cache management drivers

Add LLC (L3) cache management drivers for Marvell SoCs
AP806, AP807 and AP810

Change-Id: Ic70710f9bc5b6b48395d62212df7011e2fbb5894
Signed-off-by: Hanna Hawa <hannah@marvell.com>
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
6 years agolib: cpu: Add L2 cache aux control register definition to CA72
Konstantin Porotchkin [Thu, 5 Jul 2018 08:28:02 +0000 (11:28 +0300)]
lib: cpu: Add L2 cache aux control register definition to CA72

Add definition of EL1 L2 Auxilary Control register to
Cortex A72 library headers.

Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
6 years agomarvell: drivers: Add MoChi drivers
Konstantin Porotchkin [Mon, 26 Feb 2018 14:01:57 +0000 (16:01 +0200)]
marvell: drivers: Add MoChi drivers

Add ModularChip and MCI drivers for A8K SoC family.
ModularChip drivers include support for the internal building
blocks of Marvell ARMADA SoCs - APN806, APN807 and CP110

Change-Id: I9559343788fa2e5eb47e6384a4a7d47408787c02
Signed-off-by: Hanna Hawa <hannah@marvell.com>
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
6 years agomarvell: drivers: Add address decoding units drivers
Konstantin Porotchkin [Mon, 26 Feb 2018 13:51:11 +0000 (15:51 +0200)]
marvell: drivers: Add address decoding units drivers

Add address decoding unit drivers for Marvell SoCs.

Address decoding flow and address translation units chart
are located at docs/marvell/misc/mvebu-a8k-addr-map.txt

Change-Id: Id6ce311fa1f4f112df3adfac5d20449f495f71ed
Signed-off-by: Hanna Hawa <hannah@marvell.com>
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
6 years agomaintainers: Add Marvell to maintainers list
Konstantin Porotchkin [Mon, 2 Jul 2018 12:01:32 +0000 (15:01 +0300)]
maintainers: Add Marvell to maintainers list

Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
6 years agoMerge pull request #1471 from Anson-Huang/master
Soby Mathew [Wed, 18 Jul 2018 12:35:29 +0000 (13:35 +0100)]
Merge pull request #1471 from Anson-Huang/master

Add i.MX8QX/i.MX8QM power management feature

6 years agoFix HCPTR.TCP11 bit definition
Sandrine Bailleux [Fri, 13 Jul 2018 08:04:12 +0000 (10:04 +0200)]
Fix HCPTR.TCP11 bit definition

Change-Id: I98f23f6cebcf984b57efc5449b75ff702e1984a0
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>