project/bcm63xx/atf.git
7 years agoMerge pull request #1037 from douglas-raillard-arm/dr/doc_fix_errata_a53
davidcunado-arm [Mon, 31 Jul 2017 13:30:27 +0000 (14:30 +0100)]
Merge pull request #1037 from douglas-raillard-arm/dr/doc_fix_errata_a53

Add doc for some Cortex A53 errata workarounds

7 years agoMerge pull request #1035 from sandrine-bailleux-arm/sb/xlat-lib-ctx
davidcunado-arm [Mon, 31 Jul 2017 13:29:54 +0000 (14:29 +0100)]
Merge pull request #1035 from sandrine-bailleux-arm/sb/xlat-lib-ctx

Translation table library v2 improvements

7 years agoMerge pull request #1036 from jeenu-arm/fix-ordering
davidcunado-arm [Mon, 31 Jul 2017 13:27:19 +0000 (14:27 +0100)]
Merge pull request #1036 from jeenu-arm/fix-ordering

Fix alphabetic ordering

7 years agoMerge pull request #1034 from dp-arm/dp/uart-clock
davidcunado-arm [Mon, 31 Jul 2017 07:45:57 +0000 (08:45 +0100)]
Merge pull request #1034 from dp-arm/dp/uart-clock

Fix CSS UART clock value

7 years agoMerge pull request #1033 from davidcunado-arm/dc/psci_flush
davidcunado-arm [Mon, 31 Jul 2017 07:45:44 +0000 (08:45 +0100)]
Merge pull request #1033 from davidcunado-arm/dc/psci_flush

Address edge case for stale PSCI CPU data in cache

7 years agoMerge pull request #1032 from soby-mathew/sm/css_scp_reorg
davidcunado-arm [Wed, 26 Jul 2017 11:31:41 +0000 (12:31 +0100)]
Merge pull request #1032 from soby-mathew/sm/css_scp_reorg

Reorganise CSS SCP bootloader layer

7 years agoMerge pull request #1031 from robertovargas-arm/assert_format
davidcunado-arm [Wed, 26 Jul 2017 11:31:18 +0000 (12:31 +0100)]
Merge pull request #1031 from robertovargas-arm/assert_format

Use standard UNIX file:line format in assert

7 years agoAddress edge case for stale PSCI CPU data in cache
David Cunado [Wed, 19 Jul 2017 11:14:07 +0000 (12:14 +0100)]
Address edge case for stale PSCI CPU data in cache

There is a theoretical edge case during CPU_ON where the cache
may contain stale data for the target CPU data - this can occur
under the following conditions:

- the target CPU is in another cluster from the current
- the target CPU was the last CPU to shutdown on its cluster
- the cluster was removed from coherency as part of the CPU shutdown

In this case the cache maintenace that was performed as part of the
target CPUs shutdown was not seen by the current CPU's cluster. And
so the cache may contain stale data for the target CPU.

This patch adds a cache maintenance operation (flush) for the
cache-line containing the target CPU data - this ensures that the
target CPU data is read from main memory.

Change-Id: If8cfd42639b03174f60669429b7f7a757027d0fb
Signed-off-by: David Cunado <david.cunado@arm.com>
7 years agoEmphasize that TF only supports 4 KB granule size
Sandrine Bailleux [Thu, 20 Jul 2017 15:11:01 +0000 (16:11 +0100)]
Emphasize that TF only supports 4 KB granule size

At the moment, various parts of the Trusted Firmware code assume
that the granule size used is 4 KB. For example, the linker scripts
enforce 4 KB alignment restrictions on some sections.

However, the ARMv8-A architecture allows 16 KB and 64 KB granule
sizes as well. Some other parts of the TF code, particularly the
architectural code and definitions, have been implemented with
this in mind and cater for all 3 cases.

This discrepancy creates some confusion as to what is effectively
supported in TF. This patch adds some code comments and clarification
in the documentation to make this limitation clearer.

Change-Id: I1f202369b240d8bed9d43d57ecd2a548c86c8598
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
7 years agoxlat lib: Fix some types
Sandrine Bailleux [Wed, 19 Jul 2017 09:11:13 +0000 (10:11 +0100)]
xlat lib: Fix some types

Fix the type length and signedness of some of the constants and
variables used in the translation table library.

This patch supersedes Pull Request #1018:
https://github.com/ARM-software/arm-trusted-firmware/pull/1018

Change-Id: Ibd45faf7a4fb428a0bf71c752551d35800212fb2
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
7 years agoImport ctzdi2.c from LLVM compiler-rt
Sandrine Bailleux [Wed, 19 Jul 2017 13:05:47 +0000 (14:05 +0100)]
Import ctzdi2.c from LLVM compiler-rt

When using __builtin_ctzll() in AArch32 code, the compiler may translate
that into a call to the __ctzdi2() function. In this case, the linking
phase fails because TF doesn't provide an implementation for it.

This patch imports the implementation of the __ctzdi2() function from
LLVM's compiler-rt project and hooks it into TF's build system. The
ctzdi2.c file is an unmodified copy from the master branch as of
July 19 2017 (SVN revision: 308480).

Change-Id: I96766a025ba28e1afc6ef6a5c4ef91d85fc8f32b
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
7 years agoxlat lib v2: Remove hard-coded virtual address space size
Sandrine Bailleux [Tue, 11 Jul 2017 14:11:10 +0000 (15:11 +0100)]
xlat lib v2: Remove hard-coded virtual address space size

Previous patches have made it possible to specify the physical and
virtual address spaces sizes for each translation context. However,
there are still some places in the code where the physical (resp.
virtual) address space size is assumed to be PLAT_PHY_ADDR_SPACE_SIZE
(resp. PLAT_VIRT_ADDR_SPACE_SIZE).

This patch removes them and reads the relevant address space size
from the translation context itself instead. This information is now
passed in argument to the enable_mmu_arch() function, which needs it
to configure the TCR_ELx.T0SZ field (in AArch64) or the TTBCR.T0SZ
field (in AArch32) appropriately.

Change-Id: I20b0e68b03a143e998695d42911d9954328a06aa
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
7 years agoxlat lib v2: Refactor the functions enabling the MMU
Sandrine Bailleux [Wed, 31 May 2017 12:38:51 +0000 (13:38 +0100)]
xlat lib v2: Refactor the functions enabling the MMU

This patch refactors both the AArch32 and AArch64 versions of the
function enable_mmu_arch().

In both versions, the code now computes the VMSA-related system
registers upfront then program them in one go (rather than interleaving
the 2).

In the AArch64 version, this allows to reduce the amount of code
generated by the C preprocessor and limits it to the actual differences
between EL1 and EL3.

In the AArch32 version, this patch also removes the function
enable_mmu_internal_secure() and moves its code directly inside
enable_mmu_arch(), as it was its only caller.

Change-Id: I35c09b6db4404916cbb2e2fd3fda2ad59f935954
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
7 years agoxlat lib v2: Remove init_xlat_tables_arch() function
Sandrine Bailleux [Wed, 31 May 2017 12:31:48 +0000 (13:31 +0100)]
xlat lib v2: Remove init_xlat_tables_arch() function

In both the AArch32 and AArch64 versions, this function used to check
the sanity of the PLAT_PHY_ADDR_SPACE_SIZE in regard to the
architectural maximum value. Instead, export the
xlat_arch_get_max_supported_pa() function and move the debug
assertion in AArch-agnostic code.

The AArch64 used to also precalculate the TCR.PS field value, based
on the size of the physical address space. This is now done directly
by enable_mmu_arch(), which now receives the physical address space size
in argument.

Change-Id: Ie77ea92eb06db586f28784fdb479c6e27dd1acc1
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
7 years agoxlat lib v2: Expose *_ctx() APIs
Sandrine Bailleux [Tue, 18 Jul 2017 12:26:36 +0000 (13:26 +0100)]
xlat lib v2: Expose *_ctx() APIs

In a previous patch, the xlat_ctx_t type has been made public.
This patch now makes the *_ctx() APIs public.

Each API now has a *_ctx() variant. Most of them were already implemented
and this patch just makes them public. However, some of them were missing
so this patch introduces them.

Now that all these APIs are public, there's no good reason for splitting
them accross 2 files (xlat_tables_internal.c and xlat_tables_common.c).
Therefore, this patch moves all code into xlat_tables_internal.c and
removes xlat_tables_common.c. It removes it from the library's makefile
as well.

This last change introduces a compatibility break for platform ports
that specifically include the xlat_tables_common.c file instead of
including the library's Makefile. The UniPhier platform makefile has
been updated to now omit this file from the list of source files.

The prototype of mmap_add_region_ctx() has been slightly changed. The
mmap_region_t passed in argument needs to be constant because it gets
called from map_add(), which receives a constant region. The former
implementation of mmap_add() used to cast the const qualifier away,
which is not a good practice.

Also remove init_xlation_table(), which was a sub-function of
init_xlat_tables(). Now there's just init_xlat_tables() (and
init_xlat_tables_ctx()). Both names were too similar, which was
confusing. Besides, now that all the code is in a single file,
it's no longer needed to have 2 functions for that.

Change-Id: I4ed88c68e44561c3902fbebb89cb197279c5293b
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
7 years agoMerge pull request #1030 from danh-arm/dh/readme-lic-tweak
davidcunado-arm [Tue, 25 Jul 2017 20:05:47 +0000 (21:05 +0100)]
Merge pull request #1030 from danh-arm/dh/readme-lic-tweak

Clarify third party license info in readme

7 years agoxlat lib v2: Export translation context as an opaque type
Sandrine Bailleux [Mon, 10 Jul 2017 12:37:48 +0000 (13:37 +0100)]
xlat lib v2: Export translation context as an opaque type

At the moment, the translation context type (xlat_ctx_t) is a private
type reserved for the internal usage of the translation table library.
All exported APIs (implemented in xlat_tables_common.c) are wrappers
over the internal implementations that use such a translation context.

These wrappers unconditionally pass the current translation context
representing the memory mappings of the executing BL image. This means
that the caller has no control over which translation context the
library functions act on.

As a first step to make this code more flexible, this patch exports
the 'xlat_ctx_t' type. Note that, although the declaration of this type
is now public, its definition stays private. A macro is introduced to
statically allocate and initialize such a translation context.

The library now internally uses this macro to allocate the default
translation context for the running BL image.

Change-Id: Icece1cde4813fac19452c782b682c758142b1489
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
7 years agoxlat lib: Reorganize architectural defs
Sandrine Bailleux [Fri, 19 May 2017 08:59:37 +0000 (09:59 +0100)]
xlat lib: Reorganize architectural defs

Move the header files that provide translation tables architectural
definitions from the library v2 source files to the library include
directory. This allows to share these definitions between both
versions (v1 and v2) of the library.

Create a new header file that includes the AArch32 or AArch64
definitions based on the AARCH32 build flag, so that the library user
doesn't have to worry about handling it on their side.

Also repurpose some of the definitions the header files provide to
concentrate on the things that differ between AArch32 and AArch64.
As a result they now contain the following information:
 - the first table level that allows block descriptors;
 - the architectural limits of the virtual address space;
 - the initial lookup level to cover the entire address space.

Additionally, move the XLAT_TABLE_LEVEL_MIN macro from
xlat_tables_defs.h to the AArch32/AArch64 architectural definitions.

This new organisation eliminates duplicated information in the AArch32
and AArch64 versions. It also decouples these architectural files from
any platform-specific information. Previously, they were dependent on
the address space size, which is platform-specific.

Finally, for the v2 of the library, move the compatibility code for
ADDR_SPACE_SIZE into a C file as it is not needed outside of this
file. For v1, this code hasn't been changed and stays in a header
file because it's needed by several files.

Change-Id: If746c684acd80eebf918abd3ab6e8481d004ac68
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
7 years agoFVP: Do not map DEVICE2 memory range when TBB is disabled
Sandrine Bailleux [Fri, 26 May 2017 14:48:10 +0000 (15:48 +0100)]
FVP: Do not map DEVICE2 memory range when TBB is disabled

The DEVICE2 memory range is needed to access the Root of Trust Public
Key registers. This is not needed when Trusted Board Boot is disabled
so it's safer to not map it in this case. This also saves one level-2
page table in each of BL1 and BL2 images.

Also add some comments.

Change-Id: I67456b44f3fd5e145f6510a8499b7fdf720a7273
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
7 years agoxlat lib v2: Print some debug statistics
Sandrine Bailleux [Fri, 26 May 2017 14:47:08 +0000 (15:47 +0100)]
xlat lib v2: Print some debug statistics

This patch adds some debug prints to display some statistics about page
tables usage. They are printed only if the LOG_LEVEL is at least 50
(i.e. VERBOSE).

Sample output for BL1:

VERBOSE:    Translation tables state:
VERBOSE:      Max allowed PA:  0xffffffff
VERBOSE:      Max allowed VA:  0xffffffff
VERBOSE:      Max mapped PA:   0x7fffffff
VERBOSE:      Max mapped VA:   0x7fffffff
VERBOSE:      Initial lookup level: 1
VERBOSE:      Entries @initial lookup level: 4
VERBOSE:      Used 4 sub-tables out of 5 (spare: 1)

Change-Id: If38956902e9616cdcd6065ecd140fe21482597ea
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
7 years agoFix CSS UART clock value
Dimitris Papastamos [Tue, 25 Jul 2017 09:49:26 +0000 (10:49 +0100)]
Fix CSS UART clock value

Fixes ARM-software/tf-issues#479

Change-Id: Iadbde2595ad6a0ac3988d17e614c698986959277
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
7 years agoAdd doc for some Cortex A53 errata workarounds
Douglas Raillard [Mon, 17 Jul 2017 13:14:52 +0000 (14:14 +0100)]
Add doc for some Cortex A53 errata workarounds

Add documentation for errata 835769 and 843419 workarounds introduced in
commit a94cc374ab57b80d86974f8771565d65b38403ef

Fixes ARM-software/tf-issues#504

Change-Id: I7f3db53dfc5f3827b32663f483d3302bc9679b19
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
7 years agoFix alphabetic ordering
Jeenu Viswambharan [Wed, 19 Jul 2017 12:52:12 +0000 (13:52 +0100)]
Fix alphabetic ordering

Commit d832aee90, which added SPE support, got the alphabetical ordering
wrong for documentation and Makefile addition. This patch fixes that.

Change-Id: I061ecfba4db363902c9d7d577d2ce6c612cb9e1d
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agoMerge pull request #1029 from islmit01/im/fix_includes
davidcunado-arm [Thu, 20 Jul 2017 21:01:00 +0000 (22:01 +0100)]
Merge pull request #1029 from islmit01/im/fix_includes

Fix order of includes

7 years agoCSS: Prevent SCP_BL2/2U from overwriting BL1 RW data
Soby Mathew [Tue, 13 Jun 2017 17:00:53 +0000 (18:00 +0100)]
CSS: Prevent SCP_BL2/2U from overwriting BL1 RW data

On ARM CSS platforms, the SCP_BL2/2U image is loaded below
BL1 read-write data. This same memory is used to load BL31
later on. But sufficient checks were not done to ensure that the
SCP_BL2 would not overwrite BL1 rw data. This patch adds the
required CASSERT checks to prevent overwrite into BL1 or BL2
memory by load of SCP_BL2/2U. Also the size of BL31 is increased
and SCP_BL2/2U size is decreased to accomodate it within the
allocated region.

Change-Id: I23b28b5e1589e91150852a06452bd52b273216ee
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
7 years agoCSS: Reorganize the SCP Image transfer functionality
Soby Mathew [Wed, 3 May 2017 11:58:41 +0000 (12:58 +0100)]
CSS: Reorganize the SCP Image transfer functionality

The SCP_BL2 is transferred to SCP during BL2 image load and authenticate
sequence. The Boot-Over-MHU (BOM) protocol is used as transport for this. After
the SCP boots using the transferred image, the AP CPU waits till the `READY`
message is received from SCP. This patch separates the API for transport of
image from the wait for `READY` message and also moves the related files to
the `css/drivers` folder. The previous API `scp_bootloader_transfer` is
renamed to `css_scp_boot_image_xfer` to reflect the css naming convention.
This reorganisation also allows easier switch to a different transport
(eg: Shared Data Structure based transfer) in future

Change-Id: I8a96f9c4616ffde6dbfdf7c18f6f6f8bfa40bbf0
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
7 years agoResize the BL2 size limit for Juno
Soby Mathew [Tue, 13 Jun 2017 16:59:17 +0000 (17:59 +0100)]
Resize the BL2 size limit for Juno

Recent patches to reduce the memory footprint of BL images have
resulted in saving several pages of memory. This patch reduces
the BL2 size limit by 20KB for Juno when ARM_BOARD_OPTIMISE_MEM=1
so that more free space can be freed up for Trusted OS (BL32). Also
SCP_BL2/SCP_BL2U size is now restricted to 80K.

Change-Id: I1573d7a34e24d15e4abce8a14da40dbb5dc81e37
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
7 years agoUse standard UNIX file:line format in assert
Roberto Vargas [Tue, 18 Jul 2017 15:02:50 +0000 (16:02 +0100)]
Use standard UNIX file:line format in assert

This format is understood by almost all the UNIX tools (vi, emacs, acme, ...),
and it allows these tools to jump directly to the line where the assert
failed.

Change-Id: I648fa93c7cc65f911a17dcad5e1a775ac1ae5ed4
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
7 years agoClarify third party license info in readme
Dan Handley [Mon, 17 Jul 2017 14:19:37 +0000 (15:19 +0100)]
Clarify third party license info in readme

Clarify the license information for imported third party code in
the readme.rst file.

Change-Id: I96e26fda687a290a6dffb475aca20b169d85784d
Signed-off-by: Dan Handley <dan.handley@arm.com>
7 years agoMerge pull request #1005 from ldts/v1
davidcunado-arm [Fri, 14 Jul 2017 15:37:31 +0000 (16:37 +0100)]
Merge pull request #1005 from ldts/v1

Poplar: Initial commit for Poplar E-96Boards

7 years agoMerge pull request #1028 from vchong/bl32_optee_support_v2
davidcunado-arm [Fri, 14 Jul 2017 15:37:02 +0000 (16:37 +0100)]
Merge pull request #1028 from vchong/bl32_optee_support_v2

hikey: Add BL32 (OP-TEE) support v2

7 years agoPoplar: Initial commit for Poplar E-96Boards
Jorge Ramirez-Ortiz [Wed, 28 Jun 2017 08:11:31 +0000 (10:11 +0200)]
Poplar: Initial commit for Poplar E-96Boards

The board features the Hi3798C V200 with an integrated quad-core
64-bit ARM Cortex A53 processor and high performance Mali T720 GPU,
making it capable of running any commercial set-top solution based on
Linux or Android. Its high performance specification also supports a
premium user experience with up to H.265 HEVC decoding of 4K video at
60 frames per second.

SOC  Hisilicon Hi3798CV200
CPU  Quad-core ARM Cortex-A53 64 bit
DRAM DDR3/3L/4 SDRAM interface, maximum 32-bit data width 2 GB
USB  Two USB 2.0 ports One USB 3.0 ports
CONSOLE  USB-micro port for console support
ETHERNET  1 GBe Ethernet
PCIE  One PCIe 2.0 interfaces
JTAG  8-Pin JTAG
EXPANSION INTERFACE  Linaro 96Boards Low Speed Expansion slot
DIMENSION Standard 160×120 mm 96Boards Enterprice Edition form factor
WIFI  802.11AC 2*2 with Bluetooth
CONNECTORS  One connector for Smart Card One connector for TSI

The platform boot sequence is as follows:
    l-loader --> arm_trusted_firmware --> u-boot

Repositories:
 - https://github.com/Linaro/poplar-l-loader.git
 - https://github.com/Linaro/poplar-u-boot.git

U-Boot is also upstream in the project's master branch.

Make sure you are using the correct branch on each one of these
repositories. The definition of "correct" might change over time (at
this moment in time this would be the "latest" branch).

Build Line:
make CROSS_COMPILE=aarch64-linux-gnu-  all fip SPD=none DEBUG=1
PLAT=poplar BL33=/path/to/u-boot.bin

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Alex Elder <elder@linaro.org>
Tested-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Tested-by: Leo Yan <leo.yan@linaro.org>
Tested-by: Alex Elder <elder@linaro.org>
7 years agoMerge pull request #1027 from vchong/960_bl32_optee_support
davidcunado-arm [Fri, 14 Jul 2017 13:03:26 +0000 (14:03 +0100)]
Merge pull request #1027 from vchong/960_bl32_optee_support

hikey960 updates

7 years agoFix order of remaining platform #includes
Isla Mitchell [Fri, 14 Jul 2017 09:46:32 +0000 (10:46 +0100)]
Fix order of remaining platform #includes

This fix modifies the order of system includes to meet the ARM TF coding
standard. There are some exceptions to this change in order to retain
header groupings and where there are headers within #if statements.

Change-Id: Ib5b668c992d817cc860e97b29e16ef106d17e404
Signed-off-by: Isla Mitchell <isla.mitchell@arm.com>
7 years agoFix order of ARM platform #includes
Isla Mitchell [Fri, 14 Jul 2017 09:48:25 +0000 (10:48 +0100)]
Fix order of ARM platform #includes

This fix modifies the order of #includes in ARM standard platforms
to meet the ARM TF coding standard.

Change-Id: Ide19aad6233babda4eea2d17d49e523645fed1b2
Signed-off-by: Isla Mitchell <isla.mitchell@arm.com>
7 years agohikey960: Add BL32 (OP-TEE) support
Victor Chong [Sat, 27 May 2017 15:14:37 +0000 (00:14 +0900)]
hikey960: Add BL32 (OP-TEE) support

Signed-off-by: Victor Chong <victor.chong@linaro.org>
Acked-by: Haojian Zhuang <haojian.zhuang@linaro.org>
7 years agoFix order of #includes
Isla Mitchell [Tue, 11 Jul 2017 13:54:08 +0000 (14:54 +0100)]
Fix order of #includes

This fix modifies the order of system includes to meet the ARM TF coding
standard. There are some exceptions in order to retain header groupings,
minimise changes to imported headers, and where there are headers within
the #if and #ifndef statements.

Change-Id: I65085a142ba6a83792b26efb47df1329153f1624
Signed-off-by: Isla Mitchell <isla.mitchell@arm.com>
7 years agohikey: Add BL32 (OP-TEE) support
Victor Chong [Sat, 27 May 2017 15:14:25 +0000 (00:14 +0900)]
hikey: Add BL32 (OP-TEE) support

Signed-off-by: Victor Chong <victor.chong@linaro.org>
7 years agohikey: Remove unnecessary code
Victor Chong [Sat, 27 May 2017 15:14:25 +0000 (00:14 +0900)]
hikey: Remove unnecessary code

PLATFORM_LINKER_FORMAT
and
PLATFORM_LINKER_ARCH
defines are removed from
plat/hisilicon/hikey/include/platform_def.h
since there are already defined in
include/plat/common/common_def.h
which is included by
plat/hisilicon/hikey/hikey_def.h
which is included by
plat/hisilicon/hikey/include/platform_def.h

The line
$(eval $(call FIP_ADD_IMG,SCP_BL2,--scp-fw))
is removed from
plat/hisilicon/hikey/platform.mk
to clear the warning below:

Makefile:544: warning: overriding commands for target `check_SCP_BL2'
plat/hisilicon/hikey/platform.mk:19: warning: ignoring old commands for target `check_SCP_BL2'

$(eval $(call FIP_ADD_IMG,SCP_BL2,--scp-fw))
already exists in
Makefile
and applies to plat hikey so is redundant in
plat/hisilicon/hikey/platform.mk

Signed-off-by: Victor Chong <victor.chong@linaro.org>
7 years agohikey: Fix errors in doc
Victor Chong [Wed, 12 Jul 2017 07:13:43 +0000 (16:13 +0900)]
hikey: Fix errors in doc

Signed-off-by: Victor Chong <victor.chong@linaro.org>
7 years agohikey: Fix DDR_SIZE
Victor Chong [Wed, 12 Jul 2017 07:27:51 +0000 (16:27 +0900)]
hikey: Fix DDR_SIZE

Signed-off-by: Victor Chong <victor.chong@linaro.org>
7 years agohikey960: platform.mk: Remove FIP_ADD_IMG SCP_BL2
Victor Chong [Sat, 27 May 2017 15:14:37 +0000 (00:14 +0900)]
hikey960: platform.mk: Remove FIP_ADD_IMG SCP_BL2

The line
$(eval $(call FIP_ADD_IMG,SCP_BL2,--scp-fw))
is removed from
plat/hisilicon/hikey960/platform.mk
to clear the warning below:

Makefile:544: warning: overriding commands for target `check_SCP_BL2'
plat/hisilicon/hikey960/platform.mk:13: warning: ignoring old commands for
target `check_SCP_BL2'

$(eval $(call FIP_ADD_IMG,SCP_BL2,--scp-fw))
already exists in
Makefile
and applies to plat hikey960 so is redundant in
plat/hisilicon/hikey960/platform.mk

Signed-off-by: Victor Chong <victor.chong@linaro.org>
Acked-by: Haojian Zhuang <haojian.zhuang@linaro.org>
7 years agohikey960: Fix errors in doc
Victor Chong [Tue, 11 Jul 2017 14:48:39 +0000 (23:48 +0900)]
hikey960: Fix errors in doc

Signed-off-by: Victor Chong <victor.chong@linaro.org>
Acked-by: Haojian Zhuang <haojian.zhuang@linaro.org>
7 years agohikey960: enable options to fix errata
Victor Chong [Tue, 11 Jul 2017 16:07:29 +0000 (01:07 +0900)]
hikey960: enable options to fix errata

Fix cortex a53 errata issues: #836870, #843419, #855873.

Signed-off-by: Victor Chong <victor.chong@linaro.org>
Acked-by: Haojian Zhuang <haojian.zhuang@linaro.org>
7 years agoMerge pull request #1016 from Xilinx/dup-const
davidcunado-arm [Mon, 10 Jul 2017 19:52:09 +0000 (20:52 +0100)]
Merge pull request #1016 from Xilinx/dup-const

zynqmp: Remove duplicate 'const' declaration

7 years agoMerge pull request #1012 from rockchip-linux/rk3399/l2cache
davidcunado-arm [Mon, 10 Jul 2017 17:37:18 +0000 (18:37 +0100)]
Merge pull request #1012 from rockchip-linux/rk3399/l2cache

rockchip/rk3399: fixes the typo and the WARNINGS during suspend/resume

7 years agoMerge pull request #993 from rockchip-linux/hdcp-rk3399
davidcunado-arm [Mon, 10 Jul 2017 15:37:48 +0000 (16:37 +0100)]
Merge pull request #993 from rockchip-linux/hdcp-rk3399

rockchip: support to use hdcp for rk3399

7 years agohikey: enable options to fix errata
Haojian Zhuang [Fri, 30 Jun 2017 08:21:54 +0000 (16:21 +0800)]
hikey: enable options to fix errata

Fix cortex a53 errata issues: #836870, #843419, #855873.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
7 years agoMerge pull request #1025 from davidcunado-arm/dc/version_update
davidcunado-arm [Fri, 7 Jul 2017 21:12:10 +0000 (22:12 +0100)]
Merge pull request #1025 from davidcunado-arm/dc/version_update

Release v1.4: Update minor version number to 4

7 years agoMerge pull request #1026 from eleanorbonnici-arm/eb/OoB_test
davidcunado-arm [Fri, 7 Jul 2017 21:11:45 +0000 (22:11 +0100)]
Merge pull request #1026 from eleanorbonnici-arm/eb/OoB_test

Updates user guide following out of box testing.

7 years agoUpdates user guide following out of box testing.
Eleanor Bonnici [Fri, 7 Jul 2017 13:33:24 +0000 (14:33 +0100)]
Updates user guide following out of box testing.

Change-Id: I0cd355d9fc7f14fb4eabb443d596d6f0858f609e
Signed-off-by: Eleanor Bonnici <Eleanor.bonnici@arm.com>
7 years agoMerge pull request #1022 from danh-arm/dh/v1.4-readme
davidcunado-arm [Thu, 6 Jul 2017 17:42:37 +0000 (18:42 +0100)]
Merge pull request #1022 from danh-arm/dh/v1.4-readme

Update readme for v1.4 release

7 years agoRelease v1.4: Update minor version number to 4
David Cunado [Thu, 6 Jul 2017 16:50:47 +0000 (17:50 +0100)]
Release v1.4: Update minor version number to 4

Change-Id: I8676a22649dce92d0ddd98013fc6dafcfbe94c90
Signed-off-by: David Cunado <david.cunado@arm.com>
7 years agoMerge pull request #1024 from davidcunado-arm/dc/update_userguide
davidcunado-arm [Thu, 6 Jul 2017 17:07:35 +0000 (18:07 +0100)]
Merge pull request #1024 from davidcunado-arm/dc/update_userguide

Release v1.4: update change-log.rst

7 years agoRelease v1.4: update change-log.rst
David Cunado [Mon, 3 Jul 2017 17:59:07 +0000 (18:59 +0100)]
Release v1.4: update change-log.rst

Updated change-log.rst with summary of changes since release v1.3.

Change-Id: Iecd31ed315bd9ad7ffe8bce6550f7c90e1e3a9b0
Signed-off-by: David Cunado <david.cunado@arm.com>
7 years agoMerge pull request #1023 from davidcunado-arm/dc/update_userguide
davidcunado-arm [Thu, 6 Jul 2017 14:25:15 +0000 (15:25 +0100)]
Merge pull request #1023 from davidcunado-arm/dc/update_userguide

Migrate to Linaro release 17.04

7 years agoMigrate to Linaro release 17.04
David Cunado [Thu, 29 Jun 2017 11:01:33 +0000 (12:01 +0100)]
Migrate to Linaro release 17.04

ARM TF has been tested against Linaro Release 17.04 - the Linaro
binaries have been update and also the version of the compiler.

Linaro binaries: 17.01 --> 17.04
AArch64 & AArch32 compilers: 5.3-2015.05 (gcc 5.3) -> 6.2-2016.11 (gcc 6.2)

This patch updates the User Guide is to state that Linaro
release 17.04 is supported.

Additionally, the following fixes are made to the User Guide:
- Removed out of date reference to Linaro release 16.06.
- Updated the Juno variant coverage to include r2.

Change-Id: Iebbced3356f8c6b3c2bff2df62574db9f937ca7b
Signed-off-by: David Cunado <david.cunado@arm.com>
7 years agoMerge pull request #1010 from davidcunado-arm/dc/update_userguide
davidcunado-arm [Thu, 6 Jul 2017 13:03:26 +0000 (14:03 +0100)]
Merge pull request #1010 from davidcunado-arm/dc/update_userguide

Update Foundation, AEM and Cortex Models versions

7 years agoUpdate readme for v1.4 release
Dan Handley [Wed, 5 Jul 2017 16:40:29 +0000 (17:40 +0100)]
Update readme for v1.4 release

Update the release notes (readme.rst) for the ARM Trusted Firmware v1.4 release.

Also, reorder and fix some of the links following the conversion to
reStructured text format.

Change-Id: I8f5e8aa86cb891f61b6b62cf9fab0ad0f0ebb36b
Signed-off-by: Dan Handley <dan.handley@arm.com>
7 years agoUpdate Foundation, AEM and Cortex Models versions
David Cunado [Tue, 27 Jun 2017 16:31:12 +0000 (17:31 +0100)]
Update Foundation, AEM and Cortex Models versions

Trusted Firmware has been tested as part of its CI system against Cortex
and Foundation models in the 11.0 Model release available on
developer.arm.com. Trusted Firmware has also been tested against the v8.5
AEM model.

This patch updates the user guide documentation to reflect the version of
the Foundation, AEM and Cortex Models that Trusted Firmware has been
tested against.

Change-Id: I3b5b4d1e4220bda1dcc88aa9cfa01fa711ed92cd
Signed-off-by: David Cunado <david.cunado@arm.com>
7 years agoMerge pull request #1011 from douglas-raillard-arm/dr/doc_convert_to_rst
danh-arm [Wed, 5 Jul 2017 11:27:34 +0000 (12:27 +0100)]
Merge pull request #1011 from douglas-raillard-arm/dr/doc_convert_to_rst

Convert Markdown to reStructuredText

7 years agorockchip: implement hdcp key decryption feature for rk3399
Ziyuan Xu [Fri, 10 Feb 2017 03:54:52 +0000 (11:54 +0800)]
rockchip: implement hdcp key decryption feature for rk3399

Decrypt device private keys which transfer from kernel, then stuff it to
DP controller. So that DP driver could start HDCP authentication in
kernel.

Change-Id: If3c2cd99bca811fe5fc30acc88bf5dc1afd7416d
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
7 years agozynqmp: Remove duplicate 'const' declaration
Soren Brinkmann [Sun, 2 Jul 2017 03:24:47 +0000 (20:24 -0700)]
zynqmp: Remove duplicate 'const' declaration

Fixing compilation errors due to duplicate 'const' keyword:
  plat/xilinx/zynqmp/pm_service/pm_client.c:39:29: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
   static const struct pm_proc const pm_procs_all[] = {
                               ^~~~~

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
7 years agorockchip/rk3399: fixes the typo and the WARNINGS during suspend/resume
Caesar Wang [Mon, 19 Jun 2017 06:02:52 +0000 (14:02 +0800)]
rockchip/rk3399: fixes the typo and the WARNINGS during suspend/resume

This patch fixes the two things as follows:

1) rk3399_flash_l2_b" seems to be a typo. That's "flush", not "flash".

2) fixes the warnings log.
We always hit the warnings thing during the suspend, as below log:
..
[   51.022334] CPU5: shutdown
[   51.025069] psci: CPU5 killed.
INFO:    sdram_params->ddr_freq = 928000000
WARNING: rk3399_flash_l2_b:reg 28830380,wait

When the L2 completes the clean and invalidate sequence, it asserts the
L2FLUSHDONE signal. The SoC can now deassert L2FLUSHREQ signal and then
the L2 deasserts L2FLUSHDONE.

Then, a loop without a delay isn't really great to measure time. We should
probably add a udelay(10) or so in there and then maybe replace the WARN()
after the loop. In the actual tests, the L2 cache will take ~4ms by
default for big cluster.

In the real world that give 10ms for the enough margin, like the
ddr/cpu/cci frequency and other factors that will affect it.

Change-Id: I55788c897be232bf72e8c7b0e10cf9b06f7aa50d
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
7 years agoRemove Markdown documentation
Douglas Raillard [Thu, 29 Jun 2017 15:22:45 +0000 (16:22 +0100)]
Remove Markdown documentation

Removed Markdown documents as they have been converted to
reStructuredText.

Change-Id: I3148222eb31258f158f64de4ddcdda4b232ce483
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
7 years agoManual fixes to reST documentations
Douglas Raillard [Wed, 28 Jun 2017 15:14:55 +0000 (16:14 +0100)]
Manual fixes to reST documentations

Non-automated fixes to the converted documentation.

Change-Id: I61f3d37c7a8d6a56a7351048060b970c5b3751e4
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
7 years agoConvert documentation to reStructuredText
Douglas Raillard [Wed, 28 Jun 2017 14:23:03 +0000 (15:23 +0100)]
Convert documentation to reStructuredText

Due to recent issues in the rendering of the documentation on GitHub and
some long-standing issues like the lack of automatic table of content in
Markdown, the documentation has been converted to reStructuredText.
Basic constructs looks pretty similar to Markdown.

Automatically convert GitHub markdown documentation to reStructuredText
using pandoc.

Change-Id: If20b695acedc6d1b49c8d9fb64efd6b6ba23f4a9
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
7 years agoFix various small issues in the documentation
Douglas Raillard [Tue, 20 Jun 2017 14:22:19 +0000 (15:22 +0100)]
Fix various small issues in the documentation

Change some hard-to-convert constructs to cleaner ones.
Fix a broken link.

Change-Id: Ida70aa1da0af7a107b0e05eb20b8d46669a0380b
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
7 years agoMerge pull request #1007 from soby-mathew/sm/ccint
danh-arm [Wed, 28 Jun 2017 15:29:55 +0000 (16:29 +0100)]
Merge pull request #1007 from soby-mathew/sm/ccint

Enable integration of ARM TrustZone Cryptocell for TBB

7 years agoUse CryptoCell to set/get NVcounters and ROTPK
Soby Mathew [Fri, 2 Jun 2017 16:44:07 +0000 (17:44 +0100)]
Use CryptoCell to set/get NVcounters and ROTPK

This patch implements the platform APIs plat_get_rotpk_info,
plat_get_nv_ctr, plat_set_nv_ctr to invoke CryptoCell SBROM
APIs when ARM_CRYPTOCELL_INT is set.

Change-Id: I693556b3c7f42eceddd527abbe6111e499f55c45
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
7 years agoDo basic CryptoCell LCS check
Soby Mathew [Mon, 5 Jun 2017 14:55:59 +0000 (15:55 +0100)]
Do basic CryptoCell LCS check

This patch implements the basic lifecycle state check when CryptoCell
SBROM is initialized. Currently the check ensures that if the lifecycle
state is Security Disabled (SD), the boot process does not proceed
further.

Change-Id: I5101335453cd3ea413e97bcfb9138a96c05e1aea
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
7 years agoARM plat changes to enable CryptoCell integration
Soby Mathew [Wed, 10 May 2017 10:50:30 +0000 (11:50 +0100)]
ARM plat changes to enable CryptoCell integration

This patch makes the necessary changes to enable ARM platform to
successfully integrate CryptoCell during Trusted Board Boot. The
changes are as follows:

* A new build option `ARM_CRYPTOCELL_INTEG` is introduced to select
  the CryptoCell crypto driver for Trusted Board boot.

* The TrustZone filter settings for Non Secure DRAM is modified
  to allow CryptoCell to read this memory. This is required to
  authenticate BL33 which is loaded into the Non Secure DDR.

* The CSS platforms are modified to use coherent stacks in BL1 and BL2
  when CryptoCell crypto is selected. This is because CryptoCell makes
  use of DMA to transfer data and the CryptoCell SBROM library allocates
  buffers on the stack during signature/hash verification.

Change-Id: I1e6f6dcd1899784f1edeabfa2a9f279bbfb90e31
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
7 years agoAdd CC crypto driver to the Auth module
Soby Mathew [Wed, 10 May 2017 10:49:58 +0000 (11:49 +0100)]
Add CC crypto driver to the Auth module

This patch adds a crypto driver which utilizes the ARM® TrustZone®
CryptoCell-712 to verify signature and hash during Trusted Board Boot. Along
with this driver, the CryptoCell SBROM library is required to successfully
build the BL image. The path to this library is specified via
the `CCSBROM_LIB_PATH` variable. Please note that, mbedTLS is still required
to do the X509 certificate ASN.1 parsing and CryptoCell is only utilized for
signature and hash verification.

Change-Id: If82dfbae0d7772ba1c64839f0b27850c103fe253
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
7 years agoAdd headers to enable CryptoCell integration
Soby Mathew [Wed, 10 May 2017 10:48:40 +0000 (11:48 +0100)]
Add headers to enable CryptoCell integration

This patch adds header files with required declarations and
macro definitions to enable integration with CryptoCell SBROM
version `CC712 – Release 1.0.0.1061`. These headers enable ARM
Trusted Firmware to build and link with CryptoCell SBROM
library.

Change-Id: I501eda7fe1429acb61db8e1cab78cc9aee9c1871
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
7 years agoAdd support to link an external lib with ARM TF
Soby Mathew [Wed, 10 May 2017 10:48:04 +0000 (11:48 +0100)]
Add support to link an external lib with ARM TF

This patch defines the variable `LDLIBS` which allows external
libraries to be specified to 'ld' to enable it to link the
libraries.

Change-Id: I02a490eca1074063d00153ccb0ee974ef8859a0e
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
7 years agoMerge pull request #1008 from douglas-raillard-arm/dr/add_TF_LDFLAGS
danh-arm [Wed, 28 Jun 2017 14:50:20 +0000 (15:50 +0100)]
Merge pull request #1008 from douglas-raillard-arm/dr/add_TF_LDFLAGS

Introduce TF_LDFLAGS and improve CFLAGS documentation

7 years agoDocument CFLAGS make option
Douglas Raillard [Thu, 22 Jun 2017 14:03:50 +0000 (15:03 +0100)]
Document CFLAGS make option

CFLAGS content can be set on the command line to allow passing extra
options to the compiler. Its content is appended after the options set
by the Makefile (TF_CFLAGS).

The Makefiles must use TF_CFLAGS instead of CFLAGS, as the latter can be
completely overriden by setting it on the command line.

Also tell about LDFLAGS in the "Debugging options" section.

Change-Id: Iaf27b424002898ef3040133f78cb133983a37aee
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
7 years agoIntroduce TF_LDFLAGS
Douglas Raillard [Thu, 22 Jun 2017 13:44:48 +0000 (14:44 +0100)]
Introduce TF_LDFLAGS

Use TF_LDFLAGS from the Makefiles, and still append LDFLAGS as well to
the compiler's invocation. This allows passing extra options from the
make command line using LDFLAGS.

Document new LDFLAGS Makefile option.

Change-Id: I88c5ac26ca12ac2b2d60a6f150ae027639991f27
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
7 years agoMerge pull request #1009 from islmit01/im/aarch32_juno
danh-arm [Wed, 28 Jun 2017 13:51:37 +0000 (14:51 +0100)]
Merge pull request #1009 from islmit01/im/aarch32_juno

Add Juno AArch32 and AArch64 User Guide instructions

7 years agoAdd Juno AArch32 and AArch64 User Guide instructions
Isla Mitchell [Mon, 26 Jun 2017 13:25:44 +0000 (14:25 +0100)]
Add Juno AArch32 and AArch64 User Guide instructions

Updated section 6, building a FIP for Juno and FVP, adding
instructions for AArch32 and AArch64.

Updated section 4.1, summary of build options, to include a
description of the `JUNO_AARCH32_EL3_RUNTIME` build flag.

Change-Id: I4ed006522cab981371c382859063f088fbfcb8f7
Signed-off-by: Isla Mitchell <isla.mitchell@arm.com>
7 years agoMerge pull request #1006 from robertovargas-arm/doc-format
danh-arm [Wed, 28 Jun 2017 12:48:31 +0000 (13:48 +0100)]
Merge pull request #1006 from robertovargas-arm/doc-format

Improve format of exception vectors in BL1 description

7 years agoMerge pull request #1004 from rockchip-linux/erratum-rk3399
danh-arm [Wed, 28 Jun 2017 12:48:14 +0000 (13:48 +0100)]
Merge pull request #1004 from rockchip-linux/erratum-rk3399

rockchip: enable A53's erratum 855873 for rk3399

7 years agoMerge pull request #1003 from douglas-raillard-arm/dr/doc_fix_broken_link
danh-arm [Wed, 28 Jun 2017 12:47:57 +0000 (13:47 +0100)]
Merge pull request #1003 from douglas-raillard-arm/dr/doc_fix_broken_link

Fix broken link in documentation

7 years agoMerge pull request #1002 from douglas-raillard-arm/dr/fix_errata_a53
danh-arm [Wed, 28 Jun 2017 12:47:40 +0000 (13:47 +0100)]
Merge pull request #1002 from douglas-raillard-arm/dr/fix_errata_a53

Apply workarounds for A53 Cat A Errata 835769 and 843419

7 years agoMerge pull request #1001 from davidcunado-arm/dc/fix-signed-comparisons
danh-arm [Wed, 28 Jun 2017 12:46:46 +0000 (13:46 +0100)]
Merge pull request #1001 from davidcunado-arm/dc/fix-signed-comparisons

Resolve signed-unsigned comparison issues

7 years agoMerge pull request #978 from etienne-lms/minor-build
danh-arm [Wed, 28 Jun 2017 12:46:19 +0000 (13:46 +0100)]
Merge pull request #978 from etienne-lms/minor-build

Minor build fixes

7 years agoImprove format of exception vectors in BL1 description
Roberto Vargas [Mon, 19 Jun 2017 08:39:09 +0000 (09:39 +0100)]
Improve format of exception vectors in BL1 description

Without the additional newlines all the text becomes a single paragraph
and next newlines are ignored.

Change-Id: I783198477f654e3923fcabb21248f2bc62c33e9d
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
7 years agorockchip: enable A53's erratum 855873 for rk3399
Caesar Wang [Wed, 28 Jun 2017 00:40:26 +0000 (08:40 +0800)]
rockchip: enable A53's erratum 855873 for rk3399

For rk3399, the L2ACTLR[14] is 0 by default, as ACE CCI-500 doesn't
support WriteEvict. and you will hit the condition L2ACTLR[3] with 0,
as the Evict transactions should propagate to CCI-500 since it has
snoop filters.

Maybe this erratum applies to all Cortex-A53 cores so far, especially
if RK3399's A53 is a r0p4. we should enable it to avoid data corruption,

Change-Id: Ib86933f1fc84f8919c8e43dac41af60fd0c3ce2f
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
7 years agoMerge pull request #1000 from dp-arm/dp/aarch32-boot
davidcunado-arm [Tue, 27 Jun 2017 22:10:47 +0000 (23:10 +0100)]
Merge pull request #1000 from dp-arm/dp/aarch32-boot

juno/aarch32: Fix boot on Cortex A57 and A72

7 years agoFix broken link in documentation
Douglas Raillard [Thu, 22 Jun 2017 14:36:02 +0000 (15:36 +0100)]
Fix broken link in documentation

Fix link in docs/firmware-update.md and docs/change-log.md:
https://github.com/ARM-software/arm-trusted-firmware/wiki/ARM-Trusted-Firmware-Image-Terminology

Change-Id: I2d51d373fd0f7da59b548cd6bed52c47772014fd
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
7 years agoResolve signed-unsigned comparison issues
David Cunado [Wed, 21 Jun 2017 15:52:45 +0000 (16:52 +0100)]
Resolve signed-unsigned comparison issues

A recent commit 030567e6f51731982a7e71cbd387de93bc0e35fd added U()/ULL()
macro to TF constants. This has caused some signed-unsigned comparison
warnings / errors in the TF static analysis.

This patch addresses these issues by migrating impacted variables from
signed ints to unsigned ints and vice verse where applicable.

Change-Id: I4b4c739a3fa64aaf13b69ad1702c66ec79247e53
Signed-off-by: David Cunado <david.cunado@arm.com>
7 years agoMerge pull request #999 from douglas-raillard-arm/dr/fix_tegra_CFLAGS
davidcunado-arm [Tue, 27 Jun 2017 08:51:56 +0000 (09:51 +0100)]
Merge pull request #999 from douglas-raillard-arm/dr/fix_tegra_CFLAGS

Fix Tegra CFLAGS usage

7 years agojuno: Invalidate all caches before warm reset to AArch32 state.
Dimitris Papastamos [Mon, 19 Jun 2017 13:15:31 +0000 (14:15 +0100)]
juno: Invalidate all caches before warm reset to AArch32 state.

On Juno AArch32, the L2 cache may contain garbage after the warm reset
from AArch64 to AArch32.  This is all fine until the MMU is configured
and the data caches enabled.  To avoid fetching stale data from the L2
unified cache, invalidate it before the warm reset to AArch32 state.

Change-Id: I7d27e810692c02c3e83c9f31de67f6bae59a960a
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
7 years agojuno/aarch32: Restore `SCP_BOOT_CFG_ADDR` to the cold boot value
Dimitris Papastamos [Wed, 14 Jun 2017 13:47:36 +0000 (14:47 +0100)]
juno/aarch32: Restore `SCP_BOOT_CFG_ADDR` to the cold boot value

Before BL2 loads the SCP ram firmware, `SCP_BOOT_CFG_ADDR` specifies
the primary core.  After the SCP ram firmware has started executing,
`SCP_BOOT_CFG_ADDR` is modified.  This is not normally an issue but
the Juno AArch32 boot flow is a special case.  BL1 does a warm reset
into AArch32 and the core jumps to the `sp_min` entrypoint.  This is
effectively a `RESET_TO_SP_MIN` configuration.  `sp_min` has to be
able to determine the primary core and hence we need to restore
`SCP_BOOT_CFG_ADDR` to the cold boot value before `sp_min` runs.

This magically worked when booting on A53 because the core index was
zero and it just so happened to match with the new value in
`SCP_BOOT_CFG_ADDR`.

Change-Id: I105425c680cf6238948625c1d1017b01d3517c01
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
7 years agorockchip: include hdcp.bin and declare hdcp key decryption handler
Ziyuan Xu [Thu, 27 Oct 2016 11:07:35 +0000 (19:07 +0800)]
rockchip: include hdcp.bin and declare hdcp key decryption handler

For some reason, HDCP key decrytion can't open source in ATF, so we
build it as hdcp.bin. Besides declare the handler for decrypting.

Change-Id: Ia67ff2442ab43cb3ee4875b3d59cc1608e854b4b
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
7 years agoMerge pull request #994 from soby-mathew/sm/fwu_fix
davidcunado-arm [Mon, 26 Jun 2017 08:54:24 +0000 (09:54 +0100)]
Merge pull request #994 from soby-mathew/sm/fwu_fix

Fix FWU and cache helper optimization

7 years agoMerge pull request #976 from etienne-lms/minor-psci
davidcunado-arm [Fri, 23 Jun 2017 13:42:06 +0000 (14:42 +0100)]
Merge pull request #976 from etienne-lms/minor-psci

psci: minor fixes in lib

7 years agoMerge pull request #997 from dp-arm/dp/spe
davidcunado-arm [Fri, 23 Jun 2017 11:48:11 +0000 (12:48 +0100)]
Merge pull request #997 from dp-arm/dp/spe

aarch64: Enable Statistical Profiling Extensions for lower ELs

7 years agoFix Tegra CFLAGS usage
Douglas Raillard [Thu, 22 Jun 2017 13:47:01 +0000 (14:47 +0100)]
Fix Tegra CFLAGS usage

Use TF_CFLAGS instead of CFLAGS, to allow CFLAGS to be overriden from
the make command line.

Change-Id: I3e5726c04bcd0176f232581b8be2c94413374ac7
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
7 years agoMerge pull request #995 from davidcunado-arm/dc/init_reg
davidcunado-arm [Fri, 23 Jun 2017 07:39:19 +0000 (08:39 +0100)]
Merge pull request #995 from davidcunado-arm/dc/init_reg

Fully initialise essential control registers