project/bcm63xx/atf.git
6 years agoMerge pull request #1627 from sandrine-bailleux-arm/sb/object-pool-allocator
Dimitris Papastamos [Fri, 12 Oct 2018 16:45:31 +0000 (17:45 +0100)]
Merge pull request #1627 from sandrine-bailleux-arm/sb/object-pool-allocator

Introduce object pool allocator

6 years agoMerge pull request #1630 from antonio-nino-diaz-arm/an/fix-console
Dimitris Papastamos [Fri, 12 Oct 2018 16:45:09 +0000 (17:45 +0100)]
Merge pull request #1630 from antonio-nino-diaz-arm/an/fix-console

pl011: cnds: cbmem: 16550: Fix comments

6 years agopl011: cnds: cbmem: 16550: Fix comments
Antonio Nino Diaz [Mon, 8 Oct 2018 12:26:48 +0000 (13:26 +0100)]
pl011: cnds: cbmem: 16550: Fix comments

The comments with the prototypes of the register functions of the
console drivers are incorrect. The arguments are wrong. This patch fixes
them.

Change-Id: I38c4b481ee69e840780111c42f03c0752eb6315c
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoMerge pull request #1615 from Andre-ARM/make_s
Soby Mathew [Fri, 12 Oct 2018 13:39:50 +0000 (14:39 +0100)]
Merge pull request #1615 from Andre-ARM/make_s

Makefile: Support totally quiet output with -s

6 years agoMerge pull request #1606 from satheesbalya-arm/sb1_2603_misra_plat
Soby Mathew [Fri, 12 Oct 2018 13:19:28 +0000 (14:19 +0100)]
Merge pull request #1606 from satheesbalya-arm/sb1_2603_misra_plat

plat/arm: Fix misra warnings in platform code

6 years agoMerge pull request #1622 from bryanodonoghue/master+imx7-mmc_fix
Soby Mathew [Fri, 12 Oct 2018 13:17:59 +0000 (14:17 +0100)]
Merge pull request #1622 from bryanodonoghue/master+imx7-mmc_fix

drivers: imx: mxc_usdhc: Do not set MMC_RSP_48 for MMC_RESPONSE_R2

6 years agoMerge pull request #1624 from glneo/less-cache-flushing
Soby Mathew [Fri, 12 Oct 2018 13:16:57 +0000 (14:16 +0100)]
Merge pull request #1624 from glneo/less-cache-flushing

PSCI cache flush and comment fixup

6 years agoplat/arm: Fix misra warnings in platform code
Sathees Balya [Thu, 27 Sep 2018 13:41:02 +0000 (14:41 +0100)]
plat/arm: Fix misra warnings in platform code

Change-Id: Ica944acc474a099219d50b041cfaeabd4f3d362f
Signed-off-by: Sathees Balya <sathees.balya@arm.com>
6 years agoIntroduce object pool allocator
Sandrine Bailleux [Fri, 1 Jun 2018 12:17:08 +0000 (14:17 +0200)]
Introduce object pool allocator

The object pool allocator provides a simplistic interface to manage
allocation in a fixed-size static array. The caller creates a static
"object pool" out of such an array and may then call pool_alloc() to
get the next available object within the pool. There is also a variant
to get multiple consecutive objects: pool_alloc_n().

Note that this interface does not provide any way to free the objects
afterwards. This is by design and it is not a limitation. We do not
want to introduce complexity induced by memory freeing, such as
use-after-free bugs, memory fragmentation and so on.

Change-Id: Iefc2e153767851fbde5841a295f92ae48adda71f
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
6 years agoMerge pull request #1625 from ldts/psci
Soby Mathew [Thu, 11 Oct 2018 12:37:53 +0000 (13:37 +0100)]
Merge pull request #1625 from ldts/psci

psci: platform control of SYSTEM_SUSPEND entry

6 years agoMerge pull request #1621 from jts-arm/typos
Soby Mathew [Thu, 11 Oct 2018 11:00:48 +0000 (12:00 +0100)]
Merge pull request #1621 from jts-arm/typos

Various corrections of typos

6 years agoMerge pull request #1619 from antonio-nino-diaz-arm/an/norflash
Soby Mathew [Thu, 11 Oct 2018 10:59:37 +0000 (11:59 +0100)]
Merge pull request #1619 from antonio-nino-diaz-arm/an/norflash

plat/arm: Move norflash driver to drivers/ folder

6 years agopsci: platform control of SYSTEM_SUSPEND entry
ldts [Thu, 11 Oct 2018 06:40:32 +0000 (08:40 +0200)]
psci: platform control of SYSTEM_SUSPEND entry

Some platforms can only resume from system suspend from the boot
CPU, hence they should only enter that state from that same core.

The following commit presents an interface that allows the platform to
reject system suspend entry near its very last stage (last CPU).

6 years agoMerge pull request #1620 from deepan02/deepak-arm/move-reset-to-bl31
Soby Mathew [Thu, 11 Oct 2018 08:55:00 +0000 (09:55 +0100)]
Merge pull request #1620 from deepan02/deepak-arm/move-reset-to-bl31

plat/arm: allow RESET_TO_BL31 for CSS-based platforms

6 years agoPSCI: Do not flush cache when unneeded
Andrew F. Davis [Thu, 30 Aug 2018 17:13:57 +0000 (12:13 -0500)]
PSCI: Do not flush cache when unneeded

When a platform enables its caches before it accesses the
psci_non_cpu_pd_nodes structure then explicit cache maintenance
is not needed.

Signed-off-by: Andrew F. Davis <afd@ti.com>
6 years agoPSCI: Update comment on MMU disablement
Andrew F. Davis [Thu, 30 Aug 2018 17:08:01 +0000 (12:08 -0500)]
PSCI: Update comment on MMU disablement

The MMU is not disabled in this path, update the comment to
reflect this. Also clarify that both paths call prepare_cpu_pwr_dwn(),
but the second path does stack cache maintenance.

Signed-off-by: Andrew F. Davis <afd@ti.com>
6 years agoMerge pull request #1614 from MISL-EBU-System-SW/integration-fix
Soby Mathew [Wed, 10 Oct 2018 13:00:34 +0000 (14:00 +0100)]
Merge pull request #1614 from MISL-EBU-System-SW/integration-fix

Fix service CPU image load at BL2 stage and update maintainers list

6 years agoMerge pull request #1612 from antonio-nino-diaz-arm/an/tools
Soby Mathew [Wed, 10 Oct 2018 13:00:14 +0000 (14:00 +0100)]
Merge pull request #1612 from antonio-nino-diaz-arm/an/tools

tools: Make invocation of host compiler correct

6 years agoMerge pull request #1607 from girishpathak/gp/346_sgm775_earlylog_fix_v2
Soby Mathew [Wed, 10 Oct 2018 12:59:47 +0000 (13:59 +0100)]
Merge pull request #1607 from girishpathak/gp/346_sgm775_earlylog_fix_v2

plat/arm/css/sgm: Reorder early platform init

6 years agoMerge pull request #1489 from teknoraver/master
Soby Mathew [Wed, 10 Oct 2018 12:58:23 +0000 (13:58 +0100)]
Merge pull request #1489 from teknoraver/master

doimage: get rid of non null terminated strings by strncpy

6 years agodrivers: imx: mxc_usdhc: Do not set MMC_RSP_48 for MMC_RESPONSE_R2
Bryan O'Donoghue [Wed, 10 Oct 2018 11:08:33 +0000 (12:08 +0100)]
drivers: imx: mxc_usdhc: Do not set MMC_RSP_48 for MMC_RESPONSE_R2

commit 97d5db8c5cb95c7ce69ff4d36bcda2aeda143576 reverts an update to the
MMC layer that accompanied the original submission of this MMC driver this
is the right-thing-to-do in terms of the MMC spec.

Unfortunately the reversion also breaks this driver. The issue is the i.MX
controller doesn't want MMC_RSP_48 set for MMC_RESPONSE_R2.

The appropriate place to place that constraint is obviously in
drivers/imx/usdhc/imx_usdhc.c not in the shared MMC codebase. This patch
restores the logic the i.MX controller requires without breaking it for
everyone else.

Fixes: 97d5db8c5cb95c7ce69ff4d36bcda2aeda143576
Fixes: 2a82a9c95f6c06079f58d69315544a6b49cf64a4
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Jun Nie <jun.nie@linaro.org>
6 years agoFix typos in changelog
John Tsichritzis [Fri, 5 Oct 2018 13:16:26 +0000 (14:16 +0100)]
Fix typos in changelog

Change-Id: Icc6fb03abb9b4ef85931b9e3d767b5a9c271b5f3
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
6 years agodocs: Clarify usage of LOG_LEVEL
John Tsichritzis [Fri, 5 Oct 2018 11:02:29 +0000 (12:02 +0100)]
docs: Clarify usage of LOG_LEVEL

Change-Id: I1ce771a155e6e83885a00d2f05591bf98cd69854
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
6 years agoReplace S-EL3 references by EL3
John Tsichritzis [Fri, 14 Sep 2018 09:34:57 +0000 (10:34 +0100)]
Replace S-EL3 references by EL3

The "Secure" prefix (S-ELx) is valid only for S-EL0 and S-EL1 but is
meaningless for EL3, since EL3 is always secure. Hence, the "S" prefix
has been removed from wherever it was used as "S-EL3".

Change-Id: Icdeac9506d763f9f83d7297c7113aec7b85e9dbe
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
6 years agoReorder log level macro definitions for clarity
John Tsichritzis [Fri, 7 Sep 2018 13:42:09 +0000 (14:42 +0100)]
Reorder log level macro definitions for clarity

The definitions of the logging macros are reordered to be consistent
with the definitions of the log levels.

Change-Id: I6ff07b93eb64786ff147d39014d1c8e15db28444
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
6 years agoplat/arm/css/sgm: Reorder early platform init
Girish Pathak [Tue, 2 Oct 2018 14:18:34 +0000 (15:18 +0100)]
plat/arm/css/sgm: Reorder early platform init

In the function, bl1_early_platform_setup in the file
plat/arm/css/sgm/sgm_bl1_setup.c:

  plat_config_init();

  arm_bl1_early_platform_setup();

The debug messages logged by plat_config_init() are lost because
the console is initialized in the function
arm_bl1_early_platform_setup()

To see the logs of plat_config_init, this fix re-orders above calls
so that the console is initialized before call to plat_config_init.

Change-Id: I2e98f1f67c591cca24e28905acd0838ea3697a7c
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
6 years agoMerge pull request #1618 from satheesbalya-arm/sb1_2601_misra_smc_pwr
Soby Mathew [Wed, 10 Oct 2018 10:35:28 +0000 (11:35 +0100)]
Merge pull request #1618 from satheesbalya-arm/sb1_2601_misra_smc_pwr

Fix misra warnings in SMC and power mgmt code

6 years agoplat/arm: Move norflash driver to drivers/ folder
Antonio Nino Diaz [Wed, 10 Oct 2018 10:14:44 +0000 (11:14 +0100)]
plat/arm: Move norflash driver to drivers/ folder

This way it can be reused by other platforms if needed.

Note that this driver is designed to work with the Versatile Express NOR
flash of Juno and FVP. In said platforms, the memory is organized as an
interleaved memory of two chips with a 16 bit word.

Any platform that wishes to reuse it with a different configuration will
need to modify the driver so that it is more generic.

Change-Id: Ic721758425864e0cf42b7b9b04bf0d9513b6022e
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoplat/arm: allow RESET_TO_BL31 for CSS-based platforms
Deepak Pandey [Fri, 25 May 2018 07:13:30 +0000 (12:43 +0530)]
plat/arm: allow RESET_TO_BL31 for CSS-based platforms

This lets any future CSS platforms to use RESET_TO_BL31 flag.

Change-Id: I32a90fce43cb0c6f4d33589653a0fd6a7ecc9577
Signed-off-by: Deepak Pandey <Deepak.Pandey@arm.com>
6 years agoFix misra warnings in SMC and power mgmt code
Sathees Balya [Fri, 5 Oct 2018 12:30:59 +0000 (13:30 +0100)]
Fix misra warnings in SMC and power mgmt code

Change-Id: Ia00eba2b18804e6498d935d33ec104953e0e5e03
Signed-off-by: Sathees Balya <sathees.balya@arm.com>
6 years agoMerge pull request #1617 from antonio-nino-diaz-arm/an/bugfix
Dimitris Papastamos [Mon, 8 Oct 2018 16:34:59 +0000 (17:34 +0100)]
Merge pull request #1617 from antonio-nino-diaz-arm/an/bugfix

xlat: Fix checks in mmap_add() and mmap_add_ctx()

6 years agoxlat: Fix checks in mmap_add() and mmap_add_ctx()
Antonio Nino Diaz [Mon, 8 Oct 2018 15:11:11 +0000 (16:11 +0100)]
xlat: Fix checks in mmap_add() and mmap_add_ctx()

Commit 79621f0038b789de23ecc8891024f7cf6aa65999 broke sgi575.

It is possible to have a region with 0 as value for the attributes. It
means device memory, read only, secure, executable. This is legitimate
if the code is in flash and the code is executed from there.

This is the case for SGI_MAP_FLASH0_RO, defined in the file
plat/arm/css/sgi/sgi_plat.c.

This problem is solved by checking both size and attributes in xlat v1.
In xlat v2, it is enough to check the granularity, as it can never be 0.

Change-Id: I7be11f1b0e51c4c2ffd560b4a6cdfbf15de2c276
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoMakefile: Support totally quiet output with -s
Andre Przywara [Thu, 27 Sep 2018 09:56:05 +0000 (10:56 +0100)]
Makefile: Support totally quiet output with -s

"-s" is a command line option to the make tool, to suppress normal output,
something to the effect of prepending every line with '@' in the Makefile.
However with our V={0|1} support, we now print the shortened command line
output in any case (even with V=1, in addition to the long line!).
Normally -s helps to not miss non-fatal warnings, which tend to scroll out
of the window easily.

Introduce a new Makefile variable ECHO, to control the shortened output.
We only set it in the (current default) V=0 case, and replace every
occurence of "@echo" with that variable.
When the user specifies "-s", we set ECHO to some magic string which
changes the output line into a comment, so the output is suppressed.

Beside suppressing every output for "-s", we also avoid the redundant
short output when compiling with V=1.

This changes the output to:
==========
$ make -s PLAT=.... bl31

Built build/.../release/bl31.bin

==========
$ make PLAT=.... bl31
...
  CC      lib/libc/strncmp.c
  CC      lib/libc/strnlen.c
...
==========
$ make V=1 PLAT=.... bl31
...
gcc -DDEBUG=0 .... -o build/.../release/libc/strncmp.o
gcc -DDEBUG=0 .... -o build/.../release/libc/strnlen.o
...
==========

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
6 years agoplat: marvell: invoke platform specific scp_bl2 image handler
Grzegorz Jaszczyk [Thu, 4 Oct 2018 07:44:56 +0000 (09:44 +0200)]
plat: marvell: invoke platform specific scp_bl2 image handler

Before switching to new API the scp_bl2 handler was invoked from
bl2/bl2_image_load.c which was removed. Invoke the platform specific
scp_bl2 handler in analogy to ARM and HiSilicon.

Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
6 years agoadd Marvell tools to maintained sources list
Konstantin Porotchkin [Sun, 7 Oct 2018 09:21:31 +0000 (12:21 +0300)]
add Marvell tools to maintained sources list

Declate Marvell's ownership on tools/doimage

Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
6 years agoMerge pull request #1611 from antonio-nino-diaz-arm/an/misra-common
Dimitris Papastamos [Thu, 4 Oct 2018 15:46:53 +0000 (16:46 +0100)]
Merge pull request #1611 from antonio-nino-diaz-arm/an/misra-common

Remove some MISRA defects in common code

6 years agoMerge pull request #1610 from sandrine-bailleux-arm/sb/fix-makefile
Dimitris Papastamos [Thu, 4 Oct 2018 15:45:40 +0000 (16:45 +0100)]
Merge pull request #1610 from sandrine-bailleux-arm/sb/fix-makefile

Remove incorrect tabulation in Makefile

6 years agoMerge pull request #1583 from danielboulby-arm/db/AArch32_Multi_Console
Dimitris Papastamos [Thu, 4 Oct 2018 15:43:39 +0000 (16:43 +0100)]
Merge pull request #1583 from danielboulby-arm/db/AArch32_Multi_Console

Enable Multi Console API in AArch32

6 years agoRemove some MISRA defects in common code
Antonio Nino Diaz [Thu, 4 Oct 2018 08:55:23 +0000 (09:55 +0100)]
Remove some MISRA defects in common code

No functional changes.

Change-Id: I9638e02acb9b22eb794ebf45aad84348a710287e
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoMerge pull request #1595 from Yann-lms/dts_dep
Soby Mathew [Thu, 4 Oct 2018 14:23:09 +0000 (15:23 +0100)]
Merge pull request #1595 from Yann-lms/dts_dep

MAKE_DTB: dependencies on device tree source files

6 years agotools: Make invocation of host compiler correct
Antonio Nino Diaz [Thu, 4 Oct 2018 13:35:38 +0000 (14:35 +0100)]
tools: Make invocation of host compiler correct

HOSTCC should be used in any of the tools inside the tools/ directory
instead of CC. That way it is possible to override both values from the
command line when building the Trusted Firmware and the tools at the
same time. Also, use HOSTCCFLAGS instead of CFLAGS.

Also, instead of printing the strings CC and LD in the console during
the compilation of the tools, HOSTCC and HOSTLD have to be used for
clarity. This is how it is done in other projects like U-Boot or Linux.

Change-Id: Icd6f74c31eb74cdd1c353583399ab19e173e293e
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoMerge pull request #1609 from MISL-EBU-System-SW/integration-ble
Soby Mathew [Thu, 4 Oct 2018 13:31:58 +0000 (14:31 +0100)]
Merge pull request #1609 from MISL-EBU-System-SW/integration-ble

plat/marvell: Move BLE into the platform tree, minor fix in tools.

6 years agoMerge pull request #1603 from antonio-nino-diaz-arm/db/reclaim-init
Soby Mathew [Thu, 4 Oct 2018 13:23:31 +0000 (14:23 +0100)]
Merge pull request #1603 from antonio-nino-diaz-arm/db/reclaim-init

 Reclaim BL31 initialization code memory for runtime data

6 years agoMerge pull request #1608 from npoushin/integration
Soby Mathew [Wed, 3 Oct 2018 14:38:12 +0000 (15:38 +0100)]
Merge pull request #1608 from npoushin/integration

maintainers: Correct github username for nariman to npoushin

6 years agoMerge pull request #1584 from danielboulby-arm/db/Switches
Soby Mathew [Wed, 3 Oct 2018 14:36:37 +0000 (15:36 +0100)]
Merge pull request #1584 from danielboulby-arm/db/Switches

Ensure the flow through switch statements is clear

6 years agoRemove incorrect tabulation in Makefile
Sandrine Bailleux [Wed, 3 Oct 2018 12:56:38 +0000 (14:56 +0200)]
Remove incorrect tabulation in Makefile

When attempting to compile TF-A with "SPD=something ARCH=aarch32", the
following error message is printed:

 Makefile:291: *** recipe commences before first target.  Stop.

This is because the call to the error function is indented using a tab
whereas it's not part of a rule's recipe. Replace the tab by spaces.

Change-Id: Ic9b603837a0e43f2f7070cb39137541c332365d2
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
6 years agotools: Fix broken object compilation rules
Jan Kiszka [Tue, 2 Oct 2018 07:28:00 +0000 (09:28 +0200)]
tools: Fix broken object compilation rules

As these rules depend on non-existing headers as well (likely copy &
pasted from fiptool), they never matched, and the built-in rules were
used. That led to random breakages when e.g. CPPFLAGS was suddenly
evaluated and contained invalid options.

For the stm32image, this reveals that we were relying on the built-in
rules by passing -D_GNU_SOURCE via CPPFLAGS, rather than using CFLAGS as
used in the local rule. Fix that as well.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
6 years agomarvell: Move BLE from external repo to the platform folder
Konstantin Porotchkin [Wed, 3 Oct 2018 11:21:42 +0000 (14:21 +0300)]
marvell: Move BLE from external repo to the platform folder

The BLE is the pre-TF-A boot stage required by Marvell Armada
BootROM for bringing up DRAM and allow the boot image copy to it.
Since this is not a standard boot level and only uses the TF-A
as a build environment, it was introduced out of source tree.
However it turns out that such remote location introduces additional
complexity to the upstream TF-A build process.
In order to simplify the build environment the BLE source folder
is relocated from the external repository to A8K platform directory.
The build documentation is updated accordingly.

Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
6 years agoFVP: Reclaim init code for the stack
Daniel Boulby [Tue, 18 Sep 2018 10:52:49 +0000 (11:52 +0100)]
FVP: Reclaim init code for the stack

Map the initialization code for BL31 to overlap with the memory
required for the secondary cores stack. Once BL31 has been
initialized the memory can be remapped to RW data so that it can
be used for secondary cores stacks. By moving code from .text to
.text.init the size of the BL31 image is decreased by a page.

Split arm_common.ld.S into two linker scripts, one for tzc_dram
(arm_tzc_dram.ld.S) and one for reclaiming initialization code
(arm_reclaim_init.ld.S) so that platforms can chose which memory
regions they wish to include.

Change-Id: I648e88f3eda1aa71765744cf34343ecda9320b32
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
6 years agomaintainers: Correct github username for nariman to npoushin
Nariman Poushin [Wed, 3 Oct 2018 11:03:42 +0000 (12:03 +0100)]
maintainers: Correct github username for nariman to npoushin

Signed-off-by: Nariman Poushin <nariman.poushin@linaro.org>
6 years agoMark GICV3, CCI and CCN boot time code as init
Daniel Boulby [Tue, 18 Sep 2018 12:36:39 +0000 (13:36 +0100)]
Mark GICV3, CCI and CCN boot time code as init

Mark the GICv3, CCI and CCN code only used in Bl31 initialization
with __init to be reclaimed once no longer needed.

Change-Id: I3d77f36758450d9d1d87ecc60bc1c63fe4082667
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
6 years agoMark xlat tables initialization code
Daniel Boulby [Thu, 30 Aug 2018 15:48:56 +0000 (16:48 +0100)]
Mark xlat tables initialization code

Mark the xlat tables code only used in BL31 initialization as
__init to be reclaimed once no longer needed

Change-Id: I3106bfd994706a57c578624573bcfa525fbbd3c4
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
6 years agoplat/arm: Mark arm platform initialization functions
Daniel Boulby [Tue, 18 Sep 2018 12:26:03 +0000 (13:26 +0100)]
plat/arm: Mark arm platform initialization functions

Mark the initialization functions found in the BL31 boot sequence
as __init so they can be reclaimed when no longer needed.

Change-Id: I687a89346419c7710ef5097feaa325d83c527697
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
6 years agoMark BL31 initialization functions
Daniel Boulby [Thu, 20 Sep 2018 13:12:46 +0000 (14:12 +0100)]
Mark BL31 initialization functions

Mark the initialization functions in BL31, such as context management,
EHF, RAS and PSCI as __init so that they can be reclaimed by the
platform when no longer needed

Change-Id: I7446aeee3dde8950b0f410cb766b7a2312c20130
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
6 years agoIntroduce RECLAIM_INIT_CODE build flag
Daniel Boulby [Tue, 18 Sep 2018 10:45:51 +0000 (11:45 +0100)]
Introduce RECLAIM_INIT_CODE build flag

This patch introduces a build flag "RECLAIM_INIT_CODE" to mark boot time
code which allows platforms to place this memory in an appropriate
section to be reclaimed later. This features is primarily targeted for
BL31. Appropriate documentation updates are also done.

Change-Id: If0ca062851614805d769c332c771083d46599194
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
6 years agoSet the IMAGE_BLx flag for the linker preprocessor
Daniel Boulby [Wed, 19 Sep 2018 13:22:33 +0000 (14:22 +0100)]
Set the IMAGE_BLx flag for the linker preprocessor

Change-Id: Ibc91f119c99413ded59a9db3db918d22f0517bc1
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
6 years agoRemove unused ROMLIB memory region macro
Daniel Boulby [Wed, 19 Sep 2018 13:20:46 +0000 (14:20 +0100)]
Remove unused ROMLIB memory region macro

Remove ARM_MAP_BL_ROMLIB memory region macro as it is now split
into two regions for code and data

Change-Id: Ic17b5b584933c196db29fe83051d7e0a8e92911c
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
6 years agoxlat: Change check in mmap_add and mmap_add_ctx()
Daniel Boulby [Tue, 28 Aug 2018 16:44:48 +0000 (17:44 +0100)]
xlat: Change check in mmap_add and mmap_add_ctx()

Depending on the build flags it is possible that some of the memory
regions mapped in page table setup could have a size of 0. In this
case we simply want to do nothing but still wish to map the other
regions in the array. Therefore we cannot only use size == 0 as
the termination logic for the loop.

Since an attributes field with value 0 means that the region is
device memory, read only, secure and executable. Device memory
can't be executable, so this combination should never be used
and it is safe to use as a terminator value.

Therefore by changing the termination logic to use attributes
instead of size we prevent terminating the loop when we don't
intend to.

Change-Id: I92fc7f689ab08543497be6be4896dace2ed7b66a
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
6 years agoMerge pull request #1588 from satheesbalya-arm/sb1_2596_misra_tim_console
Soby Mathew [Wed, 3 Oct 2018 10:22:02 +0000 (11:22 +0100)]
Merge pull request #1588 from satheesbalya-arm/sb1_2596_misra_tim_console

Fix misra warnings in delay timer and console drivers

6 years agoMerge pull request #1591 from jts-arm/cov1
Soby Mathew [Wed, 3 Oct 2018 10:21:02 +0000 (11:21 +0100)]
Merge pull request #1591 from jts-arm/cov1

Fix static analysis defects

6 years agoMerge pull request #1604 from MISL-EBU-System-SW/integration
Soby Mathew [Wed, 3 Oct 2018 10:19:10 +0000 (11:19 +0100)]
Merge pull request #1604 from MISL-EBU-System-SW/integration

marvell: Continue migration to new APIs

6 years agoMerge pull request #1597 from antonio-nino-diaz-arm/an/optimise
Soby Mathew [Wed, 3 Oct 2018 10:18:30 +0000 (11:18 +0100)]
Merge pull request #1597 from antonio-nino-diaz-arm/an/optimise

plat/arm: Remove option ARM_BOARD_OPTIMISE_MEM

6 years agomarvell: Continue migration to new APIs
Konstantin Porotchkin [Tue, 2 Oct 2018 14:45:15 +0000 (17:45 +0300)]
marvell: Continue migration to new APIs

- Fix build issue
- Add initial memory parameters descriptors for BL2
- Migrate to image load V2

Basic build and run test passed on MacchiatoBin board.
Need to fix the service CPU (CM3) image load procesure and test
OPTEE functionality, which probably will require additional work.

Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
6 years agoMerge pull request #1602 from soby-mathew/sm/v2.0_docs_fixup
Soby Mathew [Tue, 2 Oct 2018 13:13:37 +0000 (14:13 +0100)]
Merge pull request #1602 from soby-mathew/sm/v2.0_docs_fixup

docs: Fixup filename and links to compatibility policy

6 years agodocs: Fixup filename and links to compatibility policy
Soby Mathew [Tue, 2 Oct 2018 13:01:03 +0000 (14:01 +0100)]
docs: Fixup filename and links to compatibility policy

Change-Id: I9d14faa7294578443233b84d5459fa7b62a30c07
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
6 years agoplat/arm: Remove option ARM_BOARD_OPTIMISE_MEM
Antonio Nino Diaz [Fri, 28 Sep 2018 15:39:26 +0000 (16:39 +0100)]
plat/arm: Remove option ARM_BOARD_OPTIMISE_MEM

This option makes it hard to optimize the memory definitions of all Arm
platforms because any change in the common defines must work in all of
them. The best thing to do is to remove it and move the definition to
each platform's header.

FVP, SGI and SGM were using the definitions in board_arm_def.h. The
definitions have been copied to each platform's platform_def.h. Juno
was already using the ones in platform_def.h, so there have been no
changes.

Change-Id: I9aecd11bbc72a3d0d7aad1ef9934d8df21dcfaf2
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoMerge pull request #1601 from joannafarley-arm/jf/release-2.0-changelog
Soby Mathew [Tue, 2 Oct 2018 12:48:02 +0000 (13:48 +0100)]
Merge pull request #1601 from joannafarley-arm/jf/release-2.0-changelog

Release docs updates for v2.0 release

6 years agoMerge pull request #1599 from soby-mathew/sm/update_v2.0
Soby Mathew [Tue, 2 Oct 2018 12:47:44 +0000 (13:47 +0100)]
Merge pull request #1599 from soby-mathew/sm/update_v2.0

Update the version to 2.0

6 years agoRelease docs updates for v2.0 release
Joanna Farley [Fri, 28 Sep 2018 07:38:17 +0000 (08:38 +0100)]
Release docs updates for v2.0 release

Change-Id: Iaa5c586b65f0abdd4ddbdee4c73d07811a0aff49
Signed-off-by: Joanna Farley <joanna.farley@arm.com>
6 years agoMerge pull request #1600 from soby-mathew/sm/compat_policy_doc
Soby Mathew [Tue, 2 Oct 2018 10:21:46 +0000 (11:21 +0100)]
Merge pull request #1600 from soby-mathew/sm/compat_policy_doc

docs: Add platform compatibility policy document

6 years agodocs: Add platform compatibility policy document
Soby Mathew [Wed, 26 Sep 2018 10:17:23 +0000 (11:17 +0100)]
docs: Add platform compatibility policy document

Information regarding platform compatibility policy
is added to the documentation.

Change-Id: If9f2a11160f81354ee2c678f0fca9d67fc7366e6
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
6 years agoMerge pull request #1598 from soby-mathew/sm/docs_update_deprecate_1
Soby Mathew [Tue, 2 Oct 2018 10:09:30 +0000 (11:09 +0100)]
Merge pull request #1598 from soby-mathew/sm/docs_update_deprecate_1

docs: update for removal of deprecated interfaces.

6 years agoMerge pull request #1587 from antonio-nino-diaz-arm/an/deprecated
Soby Mathew [Tue, 2 Oct 2018 09:12:32 +0000 (10:12 +0100)]
Merge pull request #1587 from antonio-nino-diaz-arm/an/deprecated

Remove deprecated interfaces for all platforms

6 years agodocs: update for removal of deprecated interfaces.
Soby Mathew [Thu, 27 Sep 2018 15:46:41 +0000 (16:46 +0100)]
docs: update for removal of deprecated interfaces.

Change-Id: I69e2720f534583a0f8d0e44f2e7b6f393f6fd093
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
6 years agoUpdate the version to 2.0
Soby Mathew [Mon, 1 Oct 2018 15:16:34 +0000 (16:16 +0100)]
Update the version to 2.0

Change-Id: Icbc556d47a58d0870577b1bf1cd27cc5827fd56d
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
6 years agoMerge pull request #1589 from hzhuang1/topic/fix_clang
Dimitris Papastamos [Mon, 1 Oct 2018 10:29:36 +0000 (11:29 +0100)]
Merge pull request #1589 from hzhuang1/topic/fix_clang

Topic/fix clang

6 years agoMerge pull request #1596 from Yann-lms/mmc_defines
Dimitris Papastamos [Mon, 1 Oct 2018 10:29:11 +0000 (11:29 +0100)]
Merge pull request #1596 from Yann-lms/mmc_defines

mmc: Update framework to use standard response type

6 years agoMerge pull request #1590 from sandrine-bailleux-arm/sb/doc-fixes
Dimitris Papastamos [Mon, 1 Oct 2018 10:28:43 +0000 (11:28 +0100)]
Merge pull request #1590 from sandrine-bailleux-arm/sb/doc-fixes

Update link to Linux coding style

6 years agommc: Update framework to use standard response type
Yann Gautier [Fri, 28 Sep 2018 14:48:37 +0000 (16:48 +0200)]
mmc: Update framework to use standard response type

Respect official response type and update response to follow
official specification.
All the MMC_RESPONSE_R(_x) are replaced with each corresponding define.

Partly revert 2a82a9c95f6c06079f58d69315544a6b49cf64a4 for dw_mmc.c:
Responses R1, R1B and R5 have CRC.

Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
6 years agouniphier: Migrate to new interfaces
Antonio Nino Diaz [Mon, 24 Sep 2018 16:16:35 +0000 (17:16 +0100)]
uniphier: Migrate to new interfaces

- Remove references to removed build options.
- Migrate to bl31_early_platform_setup2().

Change-Id: I9242c4d02a36e385bf0bf8ee56287106030153d1
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agorockchip: Migrate to new interfaces
Antonio Nino Diaz [Mon, 24 Sep 2018 16:16:20 +0000 (17:16 +0100)]
rockchip: Migrate to new interfaces

- Migrate to new GIC interfaces.
- Migrate to bl31_early_platform_setup2().
- Use bl31_warm_entrypoint() instead of psci_entrypoint().
- Use PLAT_VIRT_ADDR_SPACE_SIZE and PLAT_PHY_ADDR_SPACE_SIZE.
- Update Makefile paths.
- Remove references to removed build options.
- Use private definition of bl31_params_t.

Change-Id: I860341594b5c868b2fcaa59d23957ee718472ef1
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agotegra: Migrate to new interfaces
Antonio Nino Diaz [Mon, 24 Sep 2018 16:16:05 +0000 (17:16 +0100)]
tegra: Migrate to new interfaces

- Migrate to bl31_early_platform_setup2().
- Remove references to removed build options.
- Replace zeromem16() by zeromem().
- Use private definition of bl31_params_t.

This is an incomplete migration, the platform doesn't currently compile.

Change-Id: I67fbf2206678be80c3a16692024221a131cec42f
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agomediatek: Migrate to new interfaces
Antonio Nino Diaz [Mon, 24 Sep 2018 16:15:54 +0000 (17:15 +0100)]
mediatek: Migrate to new interfaces

- mt6795: Migrate to new GIC interfaces.
- Remove support for PSCI platform compatibility layer.
- Migrate to bl31_early_platform_setup2().
- Migrate from cm_init_context() to cm_init_my_context().
- Use PLAT_VIRT_ADDR_SPACE_SIZE and PLAT_PHY_ADDR_SPACE_SIZE.
- Update Makefile paths.
- Use private definition of bl31_params_t.

This is an incomplete migration, mt6795 doesn't currently compile.

Change-Id: Icf9307637066cd6f2166524715e4f117f5ce2350
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agomarvell: Migrate to new interfaces
Antonio Nino Diaz [Mon, 24 Sep 2018 16:15:46 +0000 (17:15 +0100)]
marvell: Migrate to new interfaces

- Migrate to bl2_early_platform_setup2().
- Remove references to removed build options.
- Use private definition of bl31_params_t.

This is an incomplete migration, the platform doesn't currently compile.

Change-Id: I1ae477b1f2489f49b651528050fdf06e4a55e425
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agols1043: Migrate to new interfaces
Antonio Nino Diaz [Tue, 25 Sep 2018 13:54:23 +0000 (14:54 +0100)]
ls1043: Migrate to new interfaces

- Migrate to new GIC interfaces.
- Remove references to removed build options.

Change-Id: I6f90a33d5438a9d7b71be3f93e8d9da278c8c6e6
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoimx8qm: imx8qx: Migrate to new interfaces
Antonio Nino Diaz [Mon, 24 Sep 2018 16:56:56 +0000 (17:56 +0100)]
imx8qm: imx8qx: Migrate to new interfaces

- Migrate to new GIC interfaces.
- Migrate to bl31_early_platform_setup2().
- Remove references to removed build options.

Change-Id: Ia7c63f75325ea4b41e32a9de3f01b0007d0ae210
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agopoplar: Migrate to new interfaces
Antonio Nino Diaz [Mon, 24 Sep 2018 16:15:15 +0000 (17:15 +0100)]
poplar: Migrate to new interfaces

- Remove support for LOAD_IMAGE_V2=0.
- Replace deprecated bl1_init_bl2_mem_layout().
- Migrate to bl2_early_platform_setup2().
- Migrate to bl31_early_platform_setup2().
- Use PLAT_VIRT_ADDR_SPACE_SIZE and PLAT_PHY_ADDR_SPACE_SIZE.
- Remove references to removed build options.
- Update Makefile paths.

Change-Id: I52e02633365b3db4244f7ff0f99a6446eae619f0
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agozynqmp: Migrate to new interfaces
Antonio Nino Diaz [Mon, 24 Sep 2018 16:16:52 +0000 (17:16 +0100)]
zynqmp: Migrate to new interfaces

- Remove references to removed build options.
- Migrate to bl31_early_platform_setup2().

Change-Id: Ibeb8982a0a841f55ce778c4f09f06b72b47b21d8
Tested-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agohikey960: Migrate to new interfaces
Antonio Nino Diaz [Mon, 24 Sep 2018 16:23:47 +0000 (17:23 +0100)]
hikey960: Migrate to new interfaces

- Migrate to new GIC interfaces.
- Remove unused bl1_init_bl2_mem_layout().
- Migrate to bl31_early_platform_setup2().
- Use PLAT_VIRT_ADDR_SPACE_SIZE and PLAT_PHY_ADDR_SPACE_SIZE.
- Remove references to removed build options.
- Update Makefile paths.

Change-Id: I583fd893555e6535f32d87ed67bbae430b8e6afe
Tested-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agohikey: Migrate to new interfaces
Antonio Nino Diaz [Mon, 24 Sep 2018 16:15:05 +0000 (17:15 +0100)]
hikey: Migrate to new interfaces

- Migrate to new GIC interfaces.
- Remove unused bl1_init_bl2_mem_layout().
- Migrate to bl31_early_platform_setup2().
- Use PLAT_VIRT_ADDR_SPACE_SIZE and PLAT_PHY_ADDR_SPACE_SIZE.
- Update Makefile paths.
- Remove references to removed build options.

Change-Id: Idd1e99b4864b2a72e9e12ff1fcd73d8285bc1c94
Tested-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoqemu: Migrate to new interfaces
Antonio Nino Diaz [Wed, 26 Sep 2018 08:29:45 +0000 (09:29 +0100)]
qemu: Migrate to new interfaces

- Remove references to removed build options.
- Remove support for LOAD_IMAGE_V2=0.
- Migrate to sp_min_early_platform_setup2().

Change-Id: I884399139fb8e2554adeded888969f44672d56c0
Co-authored-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agowarp7: Migrate to new interfaces
Antonio Nino Diaz [Mon, 24 Sep 2018 16:25:08 +0000 (17:25 +0100)]
warp7: Migrate to new interfaces

- Fix reference to bl2_el3_early_platform_setup()
- Remove references to removed build options.

Change-Id: I9733bec64fc28db15716ddf481c05bdc30700b4a
Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agosgi: sgm: Migrate to new interfaces
Antonio Nino Diaz [Tue, 25 Sep 2018 10:38:18 +0000 (11:38 +0100)]
sgi: sgm: Migrate to new interfaces

- Remove references to removed build options.
- Remove support for LOAD_IMAGE_V2=0.

Change-Id: I296385ef2ebf829446c76a54400d73f963ed265f
Tested-by: Nariman Poushin <nariman.poushin@linaro.org>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoallwinner: Remove references to removed build flags
Antonio Nino Diaz [Mon, 24 Sep 2018 16:14:53 +0000 (17:14 +0100)]
allwinner: Remove references to removed build flags

Change-Id: I206478597dd9855d3fe1577e7e2c0fe6d2af1cc5
Tested-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoti: k3: Migrate to new interfaces
Antonio Nino Diaz [Mon, 24 Sep 2018 16:16:45 +0000 (17:16 +0100)]
ti: k3: Migrate to new interfaces

- Migrate to bl31_early_platform_setup2().
- Remove references to removed build options.

Change-Id: Ie9f149e3fdec935f9329402ed3dd8e1c00b8832c
Acked-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agosynquacer: Migrate to new interfaces
Antonio Nino Diaz [Mon, 24 Sep 2018 16:16:30 +0000 (17:16 +0100)]
synquacer: Migrate to new interfaces

- Remove references to removed build options.
- Update Makefile paths.
- Migrate to bl31_early_platform_setup2().

Change-Id: I51cbf09a0297ac1ee645a959063238c9d556d8e1
Tested-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agostm32mp1: Migrate to new interfaces
Antonio Nino Diaz [Mon, 24 Sep 2018 16:16:41 +0000 (17:16 +0100)]
stm32mp1: Migrate to new interfaces

- Remove references to removed build options.
- Remove useless include to removed file.

Change-Id: I256da4135ac0a6ff80d4f211689ab4d08436206f
Tested-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agorpi3: Remove references to removed build options
Antonio Nino Diaz [Mon, 24 Sep 2018 16:16:25 +0000 (17:16 +0100)]
rpi3: Remove references to removed build options

Change-Id: Ida5364da1346261cf1636c6a4956a562a5c36ee7
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoplat/arm: Migrate to new interfaces
Antonio Nino Diaz [Tue, 25 Sep 2018 10:37:23 +0000 (11:37 +0100)]
plat/arm: Migrate to new interfaces

- Remove references to removed build options.
- Remove support for legacy GIC driver.
- Remove support for LOAD_IMAGE_V2=0.

Change-Id: I72f8c05620bdf4a682765e6e53e2c04ca749a3d5
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
6 years agoRemove all other deprecated interfaces and files
Antonio Nino Diaz [Tue, 25 Sep 2018 08:39:51 +0000 (09:39 +0100)]
Remove all other deprecated interfaces and files

Change-Id: Icd1cdd42afdc78895a9be6c46b414b0a155cfa63
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>