project/bcm63xx/atf.git
7 years agoMerge pull request #914 from afaerber/align-hex
davidcunado-arm [Tue, 25 Apr 2017 16:57:26 +0000 (17:57 +0100)]
Merge pull request #914 from afaerber/align-hex

fiptool: Support non-decimal --align arguments

7 years agoMerge pull request #901 from vwadekar/freebsd-stdbool-header
davidcunado-arm [Tue, 25 Apr 2017 16:56:23 +0000 (17:56 +0100)]
Merge pull request #901 from vwadekar/freebsd-stdbool-header

lib: stdbool header from the FreeBSD project

7 years agoMerge pull request #911 from danh-arm/dh/refactor-bl2-image-load
davidcunado-arm [Mon, 24 Apr 2017 13:40:35 +0000 (14:40 +0100)]
Merge pull request #911 from danh-arm/dh/refactor-bl2-image-load

Minor refactor of BL2 image load v2

7 years agoMerge pull request #909 from sandrine-bailleux-arm/sb/xlat-lib-misc-improvements
davidcunado-arm [Mon, 24 Apr 2017 13:40:16 +0000 (14:40 +0100)]
Merge pull request #909 from sandrine-bailleux-arm/sb/xlat-lib-misc-improvements

xlat lib: Use mmap_attr_t type consistently

7 years agofiptool: Support non-decimal --align arguments
Andreas Färber [Fri, 21 Apr 2017 17:39:10 +0000 (19:39 +0200)]
fiptool: Support non-decimal --align arguments

An alignment value of 0x4000 is much easier to type than 16384,
so enhance get_image_align() to recognize a 0x prefix for hexadecimals.

Signed-off-by: Andreas Färber <afaerber@suse.de>
7 years agoMerge pull request #912 from vwadekar/tegra-smmu-ctx-save-robust
davidcunado-arm [Fri, 21 Apr 2017 16:43:19 +0000 (17:43 +0100)]
Merge pull request #912 from vwadekar/tegra-smmu-ctx-save-robust

Tegra: smmu: make the context save sequence robust

7 years agoMerge pull request #910 from dp-arm/dp/AArch32-juno-port
davidcunado-arm [Fri, 21 Apr 2017 16:10:27 +0000 (17:10 +0100)]
Merge pull request #910 from dp-arm/dp/AArch32-juno-port

Add AArch32 support for Juno

7 years agoMerge pull request #902 from vwadekar/tegra186-sip-mce-calls
davidcunado-arm [Fri, 21 Apr 2017 12:57:02 +0000 (13:57 +0100)]
Merge pull request #902 from vwadekar/tegra186-sip-mce-calls

Tegra186: Support AARCH32/64 encoding for MCE calls

7 years agoMerge pull request #898 from soby-mathew/sm/dcache-early
davidcunado-arm [Fri, 21 Apr 2017 10:45:53 +0000 (11:45 +0100)]
Merge pull request #898 from soby-mathew/sm/dcache-early

PSCI: Build option to enable D-Caches early in warmboot

7 years agoMerge pull request #903 from antonio-nino-diaz-arm/an/build-xlat-v1
davidcunado-arm [Fri, 21 Apr 2017 08:40:25 +0000 (09:40 +0100)]
Merge pull request #903 from antonio-nino-diaz-arm/an/build-xlat-v1

ARM platforms: Add option to use xlat tables lib v1

7 years agoMerge pull request #906 from antonio-nino-diaz-arm/an/asserts-release
davidcunado-arm [Fri, 21 Apr 2017 08:37:36 +0000 (09:37 +0100)]
Merge pull request #906 from antonio-nino-diaz-arm/an/asserts-release

Add `ENABLE_ASSERTIONS` build option

7 years agoTegra: smmu: make the context save sequence robust
Varun Wadekar [Fri, 21 Apr 2017 01:56:09 +0000 (18:56 -0700)]
Tegra: smmu: make the context save sequence robust

This patch sanity checks the SMMU context created by the platform
code. The first entry contains the size of the array; which the
driver now verifies before moving on with the save.

This patch also fixes an error in the calculation of the size of
the context that gets copied to TZDRAM.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoAArch32: Add SP_MIN support for JUNO
Yatharth Kochar [Mon, 14 Nov 2016 12:00:41 +0000 (12:00 +0000)]
AArch32: Add SP_MIN support for JUNO

This patch adds support for SP_MIN on JUNO platform.
The changes include addition of AArch32 assembly files,
JUNO specific SP_MIN make file and miscellaneous changes
in ARM platform files to enable support for SP_MIN.

Change-Id: Id1303f422fc9b98b9362c757b1a4225a16fffc0b
Signed-off-by: Yatharth Kochar <yatharth.kochar@arm.com>
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
7 years agoChanges to support execution in AArch32 state for JUNO
Yatharth Kochar [Mon, 14 Nov 2016 12:01:04 +0000 (12:01 +0000)]
Changes to support execution in AArch32 state for JUNO

Following steps are required to boot JUNO in AArch32 state:
1> BL1, in AArch64 state, loads BL2.
2> BL2, in AArch64 state, initializes DDR.
  Loads SP_MIN & BL33 (AArch32 executable)images.
  Calls RUN_IMAGE SMC to go back to BL1.
3> BL1 writes AArch32 executable opcodes, to load and branch
  at the entrypoint address of SP_MIN, at HI-VECTOR address and
  then request for warm reset in AArch32 state using RMR_EL3.

This patch makes following changes to facilitate above steps:
* Added assembly function to carry out step 3 above.
* Added region in TZC that enables Secure access to the
  HI-VECTOR(0xFFFF0000) address space.
* AArch32 image descriptor is used, in BL2, to load
  SP_MIN and BL33 AArch32 executable images.

A new flag `JUNO_AARCH32_EL3_RUNTIME` is introduced that
controls above changes. By default this flag is disabled.

NOTE: BL1 and BL2 are not supported in AArch32 state for JUNO.

Change-Id: I091d56a0e6d36663e6d9d2bb53c92c672195d1ec
Signed-off-by: Yatharth Kochar <yatharth.kochar@arm.com>
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
7 years agoAArch32: Add support for ARM Cortex-A53/57/72 MPCore Processor
Yatharth Kochar [Thu, 10 Nov 2016 16:17:51 +0000 (16:17 +0000)]
AArch32: Add support for ARM Cortex-A53/57/72 MPCore Processor

This patch adds AArch32 state support for ARM Cortex-A53,
Cortex-A57 and Cortex-A72 MPCore Processor in the CPU specific
operations framework.

NOTE: CPU errata handling code is not present in this patch.

Change-Id: I01eb3e028e40dde37565707ebc99e06e7a0c113d
Signed-off-by: Yatharth Kochar <yatharth.kochar@arm.com>
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
7 years agocss: Ensure PSCI system off/reset is not interrupted
dp-arm [Tue, 11 Apr 2017 10:48:49 +0000 (11:48 +0100)]
css: Ensure PSCI system off/reset is not interrupted

If there is a pending interrupt, it is possible for the AP to come out
of the final WFI before SCP has a chance to act on it.  Prevent this
by disabling the GIC CPU interface before issuing a WFI.

Previously, SCP would not wait on WFI before taking an action but
would shut down the core or system regardless.

Change-Id: Ib0bcf69a515d540ed4f73c11e40ec7c863e39c92
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
7 years agoxlat lib: Use mmap_attr_t type consistently
Sandrine Bailleux [Wed, 19 Apr 2017 13:02:23 +0000 (14:02 +0100)]
xlat lib: Use mmap_attr_t type consistently

This patch modifies both versions of the translation table library
to use the mmap_attr_t type consistently wherever it is manipulating
MT_* attributes variables. It used to use mmap_attr_t or plain integer
types interchangeably, which compiles fine because an enumeration type
can be silently converted to an integer, but which is semantically
incorrect.

This patch removes this assumption by using the abstract type
'mmap_attr_t' all the time.

Change-Id: Id1f099025d2cb962b275bb7e39ad2c4dbb4e366c
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
7 years agoControl inclusion of helper code used for asserts
Antonio Nino Diaz [Wed, 22 Mar 2017 15:48:51 +0000 (15:48 +0000)]
Control inclusion of helper code used for asserts

Many asserts depend on code that is conditionally compiled based on the
DEBUG define. This patch modifies the conditional inclusion of such code
so that it is based on the ENABLE_ASSERTIONS build option.

Change-Id: I6406674788aa7e1ad7c23d86ce94482ad3c382bd
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
7 years agoRemove build option `ASM_ASSERTION`
Antonio Nino Diaz [Thu, 20 Apr 2017 08:58:28 +0000 (09:58 +0100)]
Remove build option `ASM_ASSERTION`

The build option `ENABLE_ASSERTIONS` should be used instead. That way
both C and ASM assertions can be enabled or disabled together.

All occurrences of `ASM_ASSERTION` in common code and ARM platforms have
been replaced by `ENABLE_ASSERTIONS`.

ASM_ASSERTION has been removed from the user guide.

Change-Id: I51f1991f11b9b7ff83e787c9a3270c274748ec6f
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
7 years agoMerge pull request #904 from vwadekar/tegra-smmu-ctx-size-fix
davidcunado-arm [Wed, 19 Apr 2017 22:24:43 +0000 (23:24 +0100)]
Merge pull request #904 from vwadekar/tegra-smmu-ctx-size-fix

Tegra: smmu: fix the size used to save context

7 years agolib: stdbool header from the FreeBSD project
Varun Wadekar [Wed, 19 Apr 2017 18:57:08 +0000 (11:57 -0700)]
lib: stdbool header from the FreeBSD project

This patch pulls the stdbool.h header file from the FreeBSD
project. The platforms require this header to fix many MISRA
defects among other things.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra: smmu: fix the size used to save context
Varun Wadekar [Wed, 19 Apr 2017 18:49:27 +0000 (11:49 -0700)]
Tegra: smmu: fix the size used to save context

This patch fixes the size used to save the context, when the
device enters System Suspend.

Reported by: David Cunado

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoMinor refactor of BL2 image load v2
Dan Handley [Tue, 18 Apr 2017 13:46:23 +0000 (14:46 +0100)]
Minor refactor of BL2 image load v2

Previously, get_next_bl_params_from_mem_params_desc() populated arg0
in the EL3 runtime entrypoint with a bl_params_t pointer. This is the
responsibility of the generic LOAD_IMAGE_V2 framework instead of the
descriptor-based image loading utility functions. Therefore this patch
moves that code to bl2_load_images().

Also, this patch moves the code that flushes the bl_params structure to
flush_bl_params_desc(), together with the other descriptor-based image
loading flushing code.

Change-Id: I4541e3f50e3878dde7cf89e9e8f31fe0b173fb9d
Signed-off-by: Dan Handley <dan.handley@arm.com>
7 years agoAdd `ENABLE_ASSERTIONS` build option
Antonio Nino Diaz [Tue, 18 Apr 2017 14:16:05 +0000 (15:16 +0100)]
Add `ENABLE_ASSERTIONS` build option

Add the new build option `ENABLE_ASSERTIONS` that controls whether or
not assert functions are compiled out. It defaults to 1 for debug builds
and to 0 for release builds.

Additionally, a following patch will be done to allow this build option
to hide auxiliary code used for the checks done in an `assert()`. This
code is is currently under the DEBUG build flag.

Assert messages are now only printed if LOG_LEVEL >= LOG_LEVEL_INFO,
which is the default for debug builds.

This patch also updates the User Guide.

Change-Id: I1401530b56bab25561bb0f274529f1d12c5263bc
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
7 years agoPSCI: Build option to enable D-Caches early in warmboot
Soby Mathew [Mon, 10 Apr 2017 21:35:42 +0000 (22:35 +0100)]
PSCI: Build option to enable D-Caches early in warmboot

This patch introduces a build option to enable D-cache early on the CPU
after warm boot. This is applicable for platforms which do not require
interconnect programming to enable cache coherency (eg: single cluster
platforms). If this option is enabled, then warm boot path enables
D-caches immediately after enabling MMU.

Fixes ARM-Software/tf-issues#456

Change-Id: I44c8787d116d7217837ced3bcf0b1d3441c8d80e
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
7 years agoARM platforms: Add option to use xlat tables lib v1
Antonio Nino Diaz [Tue, 11 Apr 2017 13:04:56 +0000 (14:04 +0100)]
ARM platforms: Add option to use xlat tables lib v1

ARM platforms have migrated to the translation tables library v2.
However, for testing purposes, it can be useful to temporarily switch
back to the old version.

This patch introduces the option `ARM_XLAT_TABLES_LIB_V1`, that switches
to v1 of the library when is set to 1. By default, it is 0, so that ARM
platforms use the new version unless specifically stated.

Updated User Guide.

Change-Id: I53d3c8dd97706f6af9c6fca0364a88ef341efd31
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
7 years agoTZC: rename included C file to a header
Antonio Nino Diaz [Tue, 28 Feb 2017 10:58:25 +0000 (10:58 +0000)]
TZC: rename included C file to a header

C files shouldn't be included into others. This file only contains some
macros and functions that can be made `static inline`, so it is ok to
convert it into a header file.

This is the only occurrence of a C file being included in another one in
the codebase instead of using a header, other occurrences are a way of
achieving backwards-compatibility.

Functions therein have been qualified as `inline`.

Change-Id: I88fe300f6d85a7f0740ef14c9cb8fa54849218e6
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
7 years agoTegra186: Support AARCH32/64 encoding for MCE calls
Varun Wadekar [Mon, 17 Apr 2017 18:54:33 +0000 (11:54 -0700)]
Tegra186: Support AARCH32/64 encoding for MCE calls

On Tegra systems, there are multiple software components that
require to interact with MCE. The components can either be 32-bit
or 64-bit payloads. This patch supports MCE SMC functions ID for
AARCH32 and AARCH64 architectures to support such clients.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoMerge pull request #893 from antonio-nino-diaz-arm/an/tf-printf-error
davidcunado-arm [Sun, 16 Apr 2017 16:42:28 +0000 (17:42 +0100)]
Merge pull request #893 from antonio-nino-diaz-arm/an/tf-printf-error

Replace tf_printf occurrences with ERROR

7 years agoMerge pull request #899 from vwadekar/tegra186-platform-support-v6
davidcunado-arm [Sun, 16 Apr 2017 15:20:38 +0000 (16:20 +0100)]
Merge pull request #899 from vwadekar/tegra186-platform-support-v6

Tegra186 platform support v6

7 years agoMerge pull request #890 from masahir0y/scp
davidcunado-arm [Fri, 14 Apr 2017 00:49:34 +0000 (01:49 +0100)]
Merge pull request #890 from masahir0y/scp

Build: add generic way to include SCP_BL2 into FIP image

7 years agoMerge pull request #897 from vwadekar/memctrl-v1-xlat-table-v2
davidcunado-arm [Fri, 14 Apr 2017 00:36:12 +0000 (01:36 +0100)]
Merge pull request #897 from vwadekar/memctrl-v1-xlat-table-v2

Tegra: memctrl_v1: enable 'xlat_table_v2' library

7 years agoTegra: fix trivial misra issues
Anthony Zhou [Mon, 13 Mar 2017 07:34:08 +0000 (15:34 +0800)]
Tegra: fix trivial misra issues

Not having U or ULL as a suffix for these enums causes
a lot of unnecessary MISRA issues. This patch adds U or
ULL suffix to these common enums to reduce number of
MISRA issues.

Signed-off-by: Anthony Zhou <anzhou@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra: no need to re-init the same console
Varun Wadekar [Tue, 4 Apr 2017 20:40:12 +0000 (13:40 -0700)]
Tegra: no need to re-init the same console

This patch stops initialising the same UART console, as a "crash"
console. The normal and the crash consoles use the same UART port
and hence the crash console init function now only checks if the
console is ready to be used.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra: Add support for fake system suspend
Vignesh Radhakrishnan [Fri, 3 Mar 2017 18:58:05 +0000 (10:58 -0800)]
Tegra: Add support for fake system suspend

This patch adds support for fake system suspend (SC7).
This is a debug mode, to ensure that a different code path is
executed for cases like pre-silicon development, where a
full-fledged SC7 is not possible in early stages.

This particular patch ensures that, if fake system suspend is
enabled (denoted by tegra_fake_system_suspend variable
having a non-zero value), instead of calling WFI, a request
for a warm reset is made for starting the SC7 exit procedure.

This ensures that the code path of kernel->ATF and back to
kernel is executed without depending on other components
involved in SC7 code path.

Additionally, this patch also adds support for SMC call
from kernel, enabling fake system suspend mode.

Signed-off-by: Vignesh Radhakrishnan <vigneshr@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra: memctrl_v2: restore MC_TXN_OVERRIDE settings
Varun Wadekar [Mon, 3 Apr 2017 20:44:57 +0000 (13:44 -0700)]
Tegra: memctrl_v2: restore MC_TXN_OVERRIDE settings

This patch restores the MC_TXN_OVERRIDE settings when we exit from
System Suspend.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra: memctrl_v1: disable AHB redirection after cold boot
Varun Wadekar [Wed, 29 Mar 2017 21:57:29 +0000 (14:57 -0700)]
Tegra: memctrl_v1: disable AHB redirection after cold boot

During boot, USB3 and flash media (SDMMC/SATA) devices need access to
IRAM. Because these clients connect to the MC and do not have a direct
path to the IRAM, the MC implements AHB redirection during boot to allow
path to IRAM. In this mode, accesses to a programmed memory address aperture
are directed to the AHB bus, allowing access to the IRAM. The AHB aperture
is defined by the IRAM_BASE_LO and IRAM_BASE_HI registers, which are
initialized to disable this aperture. Once bootup is complete, we must
program IRAM base/top, thus disabling access to IRAM.

This patch provides functionality to disable this access. The tegra port
calls this new function before jumping to the non-secure world during
cold boot.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra: platform: support Tegra186 chip id
Varun Wadekar [Thu, 13 Apr 2017 21:12:49 +0000 (14:12 -0700)]
Tegra: platform: support Tegra186 chip id

This patch adds support to read the chip id and identify if
the current platform is Tegra186.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra: memctrl_v2: MC transaction overrides for newer chips
Pritesh Raithatha [Wed, 1 Mar 2017 11:25:16 +0000 (16:55 +0530)]
Tegra: memctrl_v2: MC transaction overrides for newer chips

This patch programs MC transaction overrides settings using
mc_txn_override_cfgs array for all Tegra chips beyond Tegra186
rev. A01

Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra186: mce: Avoid implementation-defined bitfield types
Stephen Warren [Wed, 1 Mar 2017 00:12:35 +0000 (17:12 -0700)]
Tegra186: mce: Avoid implementation-defined bitfield types

GCC version 4.8 (and presumably earlier) warn when non-standard types are
used for bitfield definitions when -pedantic is enabled. This prevents TF
from being built with such toolchains, since -Werror -pedantic options are
used.

gcc-4.9 removed this warning; -pedantic is intended to cause gcc to emit a
warning in all cases required by the standard, but the standard does not
require a warning in this case.

See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57773

Signed-off-by: Stephen Warren <swarren@nvidia.com>
7 years agoTegra: smmu: support for multiple devices
Pritesh Raithatha [Tue, 24 Jan 2017 08:19:46 +0000 (13:49 +0530)]
Tegra: smmu: support for multiple devices

This patch adds flexibility to the code to initialise multiple SMMU
devices. The base address macro name has been changed to make it
explicit that we support multiple SMMUs.

Change-Id: Id4854fb010ebeb699512d79c769de24050c2ad69
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra: smmu: platform handler for SMMU settings
Pritesh Raithatha [Mon, 2 Jan 2017 14:41:32 +0000 (20:11 +0530)]
Tegra: smmu: platform handler for SMMU settings

This patch empowers the platforms to provide an array with the
registers that must be saved/restored across System Suspend.

Original-change-by: Pritesh Raithatha <praithatha@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoMerge pull request #895 from vwadekar/tegra186-platform-support-v5
davidcunado-arm [Wed, 12 Apr 2017 22:27:00 +0000 (23:27 +0100)]
Merge pull request #895 from vwadekar/tegra186-platform-support-v5

Tegra186 platform support v5

7 years agoMerge pull request #894 from Xilinx/errata-855873
davidcunado-arm [Wed, 12 Apr 2017 21:55:14 +0000 (22:55 +0100)]
Merge pull request #894 from Xilinx/errata-855873

zynqmp: Enable workaround for errata 855873

7 years agoMerge pull request #885 from antonio-nino-diaz-arm/an/console-flush
davidcunado-arm [Wed, 12 Apr 2017 21:23:44 +0000 (22:23 +0100)]
Merge pull request #885 from antonio-nino-diaz-arm/an/console-flush

Implement console_flush()

7 years agoTegra: memctrl_v1: enable 'xlat_table_v2' library
Varun Wadekar [Mon, 10 Apr 2017 22:30:17 +0000 (15:30 -0700)]
Tegra: memctrl_v1: enable 'xlat_table_v2' library

This patch enables the 'xlat_table_v2' library for the Tegra Memory
Controller driver. This library allows us to dynamically map/unmap
memory regions, with MMU enabled.

The Memory Controller driver maps/unmaps non-overlapping Video Memory
region, to clean it of any secure contents, before it resizes the
region.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra: allow platforms to override plat_core_pos_by_mpidr()
Varun Wadekar [Tue, 31 Jan 2017 22:53:37 +0000 (14:53 -0800)]
Tegra: allow platforms to override plat_core_pos_by_mpidr()

This patch makes the default implementation of plat_core_pos_by_mpidr()
as weakly linked, so that platforms can override it with their own.

Tegra186, for one, does not have CPU IDs 2 and 3, so it has its own
implementation of plat_core_pos_by_mpidr().

Change-Id: I7a5319869c01ede3775386cb95af1431792f74b3
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra: memctrl_v2: platform handler for MC settings
Pritesh Raithatha [Mon, 2 Jan 2017 14:12:31 +0000 (19:42 +0530)]
Tegra: memctrl_v2: platform handler for MC settings

This patch empowers the platforms to provide the settings (e.g. stream ID,
security setting, transaction overrides) required by the Memory Controller
driver. This allows the platforms to program the Memory Controller as per
their needs and makes the driver scalable.

Original-change-by: Pritesh Raithatha <praithatha@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra: memctrl_v2: remove non-secure access to TZSRAM memory
Harvey Hsieh [Tue, 15 Nov 2016 14:04:51 +0000 (22:04 +0800)]
Tegra: memctrl_v2: remove non-secure access to TZSRAM memory

This patch removes the memory controller configuration setting, which
allowed non-secure access to the TZSRAM memory.

Change-Id: Ic13645ba6a7694f192565962df40ca4fb8130f23
Signed-off-by: Harvey Hsieh <hhsieh@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra186: mce: support for TEGRA_ARI_MISC_CCPLEX_EDBGREQ
Rich Wiley [Wed, 4 Jan 2017 18:45:44 +0000 (10:45 -0800)]
Tegra186: mce: support for TEGRA_ARI_MISC_CCPLEX_EDBGREQ

This ARI call enables the EDBGREQ feature in the CCPLEX,
which will cause the CPUs to enter debug state instead of
vectoring to sw (ie MCA handler) upon receiving an async
abort signal.

Change-Id: Ifcb0e11446b6ac55179e3350d8f02b60ba32c94d
Signed-off-by: Rich Wiley <rwiley@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra186: update t18x_ari.h to v3.1
Varun Wadekar [Wed, 4 Jan 2017 18:52:54 +0000 (10:52 -0800)]
Tegra186: update t18x_ari.h to v3.1

This patch updates the ARI header file to v3.1.

Change-Id: I3e58cf50d27fb6e72062bb9d9782b75296b32025
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra186: PSCI: support for 64-bit TZDRAM base
Steven Kao [Fri, 23 Dec 2016 07:43:17 +0000 (15:43 +0800)]
Tegra186: PSCI: support for 64-bit TZDRAM base

This patch fixes the variable width to store the TZDRAM base
address used to resume from System Suspend.

Change-Id: Ib67eda64b09f26fb2f427f0d624f057081473132
Signed-off-by: Steven Kao <skao@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra: memctrl_v2: config to enable SMMU device
Varun Wadekar [Mon, 19 Dec 2016 19:17:54 +0000 (11:17 -0800)]
Tegra: memctrl_v2: config to enable SMMU device

This patch adds a config to the memory controller driver to enable SMMU
device init during boot. Tegra186 platforms keeps it enabled by default,
but future platforms might not support it.

Change-Id: Iebe1c60a25fc1cfb4c97a507e121d6685a49cb83
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra186: read activity monitor's clock counter values
Varun Wadekar [Fri, 23 Sep 2016 21:28:16 +0000 (14:28 -0700)]
Tegra186: read activity monitor's clock counter values

This patch adds a new SMC function ID to read the refclk and coreclk
clock counter values from the Activity Monitor. The non-secure world
requires this information to calculate the CPU's frequency.

Formula: "freq = (delta_coreclk / delta_refclk) * refclk_freq"

The following CPU registers have to be set by the non-secure driver
before issuing the SMC:

X1 = MPIDR of the target core
X2 = MIDR of the target core

Change-Id: I296d835def1f5788c17640c0c456b8f8f0e90824
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra: memctrl_v2: make AFI device settings configurable
Varun Wadekar [Tue, 13 Dec 2016 21:13:42 +0000 (13:13 -0800)]
Tegra: memctrl_v2: make AFI device settings configurable

This patch adds a new config to enable MC settings for the AFIW
and AFIR devices. Platforms must enable this config on their own.

Change-Id: I53b450117e4764ea76d9347ee2928f9be178b107
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra186: move smmu driver to tegra/common
Varun Wadekar [Tue, 13 Dec 2016 00:46:44 +0000 (16:46 -0800)]
Tegra186: move smmu driver to tegra/common

This patch moves the smmu driver introduced by the Tegra186 port
to tegra/common so that future chips can (re)use it.

Change-Id: Ia44c7f2a62fb2d8869db3a44742a8c6b13c49036
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra186: split MCE driver into public/private interfaces
Varun Wadekar [Wed, 14 Dec 2016 02:04:35 +0000 (18:04 -0800)]
Tegra186: split MCE driver into public/private interfaces

This patch splits the MCE driver into public and private interfaces
to allow usage of common functionality across multiple SoCs.

Change-Id: Ib58080e730d72f11ff79507d8e0acffb2ad5c606
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoMerge pull request #892 from rockchip-linux/fixes-a-typo
davidcunado-arm [Fri, 7 Apr 2017 14:54:14 +0000 (15:54 +0100)]
Merge pull request #892 from rockchip-linux/fixes-a-typo

rockchip/rk3399: the printf changed to tf_printf for console output

7 years agoMerge pull request #891 from vwadekar/tegra186-platform-support-v4
davidcunado-arm [Fri, 7 Apr 2017 12:43:37 +0000 (13:43 +0100)]
Merge pull request #891 from vwadekar/tegra186-platform-support-v4

Tegra186 platform support v4

7 years agorockchip/rk3399: changed printf/tf_printf for console output
Caesar Wang [Thu, 6 Apr 2017 00:40:24 +0000 (08:40 +0800)]
rockchip/rk3399: changed printf/tf_printf for console output

The printf() isn't used by the firmware itself, just by the tools under
the ./tools/ folder. Then tf_printf will unconditionally print.
Remove the unused print_dram_status_info() function.

Change-Id: Ie699ccb54a5be9a2cbbd7b8d4193b57075a2f57a
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
7 years agozynqmp: Enable workaround for errata 855873
Soren Brinkmann [Thu, 6 Apr 2017 18:44:27 +0000 (11:44 -0700)]
zynqmp: Enable workaround for errata 855873

Zynqmp implements a version of the Cortex A53 affected by errata 855873.
Enable the workaround for the errata and silence the warning: "WARNING:
BL31: cortex_a53: errata workaround for 855873 was missing!".

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
7 years agoMerge pull request #888 from douglas-raillard-arm/dr/fix_ULL_issue
davidcunado-arm [Thu, 6 Apr 2017 14:23:52 +0000 (15:23 +0100)]
Merge pull request #888 from douglas-raillard-arm/dr/fix_ULL_issue

Fix ARM_BL31_IN_DRAM build

7 years agoReplace tf_printf occurrences with ERROR
Antonio Nino Diaz [Thu, 6 Apr 2017 13:46:38 +0000 (14:46 +0100)]
Replace tf_printf occurrences with ERROR

The amount of console output is controlled by the LOG_LEVEL build
option. Using tf_printf without any #ifdef depending on the LOG_LEVEL
doesn't give the user that flexibility.

This patch replaces all occurrences of tf_printf that prints error, but
aren't dependent on LOG_LEVEL, with the ERROR macro.

Change-Id: Ib5147f14fc1579398a11f19ddd0e840ff6692831
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
7 years agoMerge pull request #889 from paulkocialkowski/integration
davidcunado-arm [Thu, 6 Apr 2017 09:55:17 +0000 (10:55 +0100)]
Merge pull request #889 from paulkocialkowski/integration

rockchip: Remove unused rockchip_pd_pwr_down_wfi function

7 years agoMerge pull request #886 from dp-arm/dp/stack-protector
davidcunado-arm [Thu, 6 Apr 2017 09:20:47 +0000 (10:20 +0100)]
Merge pull request #886 from dp-arm/dp/stack-protector

Add support for GCC stack protection

7 years agoMerge pull request #882 from douglas-raillard-arm/dr/review_juno_errata
davidcunado-arm [Wed, 5 Apr 2017 21:39:22 +0000 (22:39 +0100)]
Merge pull request #882 from douglas-raillard-arm/dr/review_juno_errata

Enable all A53 and A57 errata workarounds for Juno

7 years agoTegra186: move TSA macros to tegra_def.h
Varun Wadekar [Thu, 15 Dec 2016 19:54:51 +0000 (11:54 -0800)]
Tegra186: move TSA macros to tegra_def.h

This patch moves the TSA block's macros from memctrl_v2.h to
tegra_def.h in the Tegra186 tree.

Change-Id: I8b45dd3905c5d1f33ffb36d8b2de72aeb06674aa
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra: drivers: memctrl: move chip specific defines to tegra_def.h
Varun Wadekar [Tue, 13 Dec 2016 00:14:57 +0000 (16:14 -0800)]
Tegra: drivers: memctrl: move chip specific defines to tegra_def.h

This patch moves the chip specific memory controller driver defines to
the appropriate tegra_def.h files, for future compatibility.

Change-Id: I3179fb771d8b32e913ca29bd94af95f4b2fc1961
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra186: move platform specific MCE defines to tegra_def.h
Varun Wadekar [Mon, 12 Dec 2016 22:24:17 +0000 (14:24 -0800)]
Tegra186: move platform specific MCE defines to tegra_def.h

This patch moves the MCE's configurable parameters to tegra_def.h for
the Tegra186 SoC, to allow forward compatiblity.

Change-Id: If8660c1c09908a4064dbb67d5ca4fb78389cab13
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra: memctrl_v2: no SID override for AON
Mustafa Yigit Bilgen [Thu, 17 Nov 2016 23:08:39 +0000 (15:08 -0800)]
Tegra: memctrl_v2: no SID override for AON

Remove stream ID overrides for AON. AON drives its own stream ID when
accesing IOVA memory. However, it needs to use a physical stream ID when
accesing GSC memory. Overriding stream ids prevents AON from accessing
GSC memory, so remove them to allow AON to access GSCs.

Change-Id: Ia2b11014d9780c4546b5e781621ae4cd413735cc
Signed-off-by: Mustafa Yigit Bilgen <mbilgen@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra186: memctrl_v2: remove APE overrides for chip verification
Vivek Aseeja [Mon, 22 Aug 2016 20:44:08 +0000 (13:44 -0700)]
Tegra186: memctrl_v2: remove APE overrides for chip verification

This patch reverts the APE overrides added for chip verification.

Change-Id: Ib85560934d63f6e41e95ef6898a341f24761a517
Signed-off-by: Vivek Aseeja <vaseeja@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra186: use MSB of wake_time
Krishna Sitaraman [Thu, 18 Aug 2016 22:41:21 +0000 (15:41 -0700)]
Tegra186: use MSB of wake_time

This patch updates wake time of the cpu to use the MSBs and zero
out the LSB's. Only 24 out of 32 bits are currently passed
through the PSCI interface. Previously all the LSB's were used.

Change-Id: Ie2d9d1bf6e3003dd47526a124f64e6ad555d2371
Signed-off-by: Krishna Sitaraman <ksitaraman@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra186: Update API for reset vector ARI
Krishna Sitaraman [Fri, 2 Sep 2016 23:53:04 +0000 (16:53 -0700)]
Tegra186: Update API for reset vector ARI

The TEGRA_ARI_COPY_MISCREG_AA64_RST ARI should be called with
request_lo/hi set to zero. MTS automatically takes the reset
vector from MISCREG_AA64_RST register and does not need it to
be passed as parameters.  This patch updates the API and the
caller function accordingly.

Change-Id: Ie3e3402d93951102239d988ca9f0cdf94f290d2f
Signed-off-by: Krishna Sitaraman <ksitaraman@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra186: clean CPU wake times from L2 cache
Mustafa Yigit Bilgen [Sat, 3 Sep 2016 02:30:22 +0000 (19:30 -0700)]
Tegra186: clean CPU wake times from L2 cache

When entering C7, ATF disables caches and flushes the L1 cache. However,
wake_time[cpu] can still remain in the L2 cache, causing later reads to it
to fetch from DRAM. This will read stale values.

Fix this by aligning wake_time[cpu] to cache lines, and explicitly cleaning it
before disabling caches.

Change-Id: Id73d095b479677595a6b3dd0abb240a1fef5f311
Signed-off-by: Mustafa Yigit Bilgen <mbilgen@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra186: update t18x_ari.h to v3.0
Krishna Sitaraman [Thu, 28 Jul 2016 20:56:36 +0000 (13:56 -0700)]
Tegra186: update t18x_ari.h to v3.0

This patch updates the ARI header to version 3.0

Change-Id: I7cfe0c61c80a6b78625232135dd63393602d32fe
Signed-off-by: Krishna Sitaraman <ksitaraman@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoMerge pull request #881 from davidcunado-arm/dc/update_userguide
davidcunado-arm [Wed, 5 Apr 2017 21:02:55 +0000 (22:02 +0100)]
Merge pull request #881 from davidcunado-arm/dc/update_userguide

Upgrade mbed TLS version

7 years agoMerge pull request #877 from soby-mathew/sm/build_opt_checks
davidcunado-arm [Wed, 5 Apr 2017 21:02:19 +0000 (22:02 +0100)]
Merge pull request #877 from soby-mathew/sm/build_opt_checks

Include all makefiles before build option checks

7 years agoTegra186: trampoline: update "System Suspend" exit criteria
Varun Wadekar [Mon, 8 Aug 2016 18:53:14 +0000 (11:53 -0700)]
Tegra186: trampoline: update "System Suspend" exit criteria

The TZRAM memory loses its state during "System Suspend". This patch
check if TZRAM base address contains valid data, to decide if the system
is exiting from "System Suspend". To enable TZDRAM encryption, the Memory
Controller's TZDRAM base/size registers would be populated by the BPMP
when the system "wakes up".

Change-Id: I5fc8ba1ae3bce12f0ece493f6f9f5f4d92a46344
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra186: Add smc handler for coresight clock gating
Krishna Sitaraman [Tue, 19 Jul 2016 23:36:13 +0000 (16:36 -0700)]
Tegra186: Add smc handler for coresight clock gating

This change adds function to invoke for MISC_CCPLEX ARI calls and
the corresponding smc handler. This can be used to enable/disable
Coresight clock gating.

Change-Id: I4bc17aa478a46c29bfe17fd74f839a383ee2b644
Signed-off-by: Krishna Sitaraman <ksitaraman@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra: memctrl_v2: save TZDRAM settings to secure scratch registers
Harvey Hsieh [Fri, 29 Jul 2016 12:10:59 +0000 (20:10 +0800)]
Tegra: memctrl_v2: save TZDRAM settings to secure scratch registers

Save TZDRAM settings for SC7 resume firmware to restore.

SECURITY_BOM:     MC_SECURITY_CFG0_0 = SECURE_RSV55_SCRATCH_0
SECURITY_BOM_HI:  MC_SECURITY_CFG3_0 = SECURE_RSV55_SCRATCH_1
SECURITY_SIZE_MB: MC_SECURITY_CFG1_0 = SECURE_RSV54_SCRATCH_1

Change-Id: I78e891d9ebf576ff2a17ff87cf3aff4030ee11b8
Signed-off-by: Harvey Hsieh <hhsieh@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra186: mce: fix return value for enum features ari
Krishna Sitaraman [Wed, 27 Jul 2016 23:26:45 +0000 (16:26 -0700)]
Tegra186: mce: fix return value for enum features ari

This patch fixes the incorrect return value that was being passed
back for the ENUM_FEATURES ARI call.

Change-Id: I3842c6ce27ea24698608830cf4c12cfa7ff64421
Signed-off-by: Krishna Sitaraman <ksitaraman@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra186: mce: clear reserved fields for ARI calls
Krishna Sitaraman [Thu, 28 Jul 2016 20:54:29 +0000 (13:54 -0700)]
Tegra186: mce: clear reserved fields for ARI calls

This patch clears the unused or reserved ARI input registers
before issuing the actual ARI command.

Change-Id: I454b86566bfe088049a5c63527c1323d7b25248a
Signed-off-by: Krishna Sitaraman <ksitaraman@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoMerge pull request #876 from soby-mathew/sm/refactor_header
davidcunado-arm [Wed, 5 Apr 2017 20:07:05 +0000 (21:07 +0100)]
Merge pull request #876 from soby-mathew/sm/refactor_header

Re-factor header files for easier PSCI library integration

7 years agoMerge pull request #884 from vwadekar/tegra186-platform-support-v3
davidcunado-arm [Wed, 5 Apr 2017 19:25:18 +0000 (20:25 +0100)]
Merge pull request #884 from vwadekar/tegra186-platform-support-v3

Tegra186 platform support v3

7 years agoBuild: add generic way to include SCP_BL2 into FIP image
Masahiro Yamada [Wed, 5 Apr 2017 10:11:41 +0000 (19:11 +0900)]
Build: add generic way to include SCP_BL2 into FIP image

If SCP_BL2 is passed in from the command line, it is recognized by
make_helpers/tbbr/tbbr_tools.mk, and the cert_create tool generates
the corresponding key and content certificates.

On the other hand, the top-level Makefile does not care SCP_BL2, so
the --scp-fw option is not passed to the fiptool.  As far as I see
plat/arm/css/common/css_common.mk, it looks like a platform's job to
add $(eval $(call FIP_ADD_IMG,SCP_BL2,--scp-fw)).

We can make the top-level Makefile kind enough to take care of it.
This is useful when we want to have optional SCP_BL2 firmware.

Adjust css_common.mk so that Juno still requires SCP_BL2 by default.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agorockchip: Remove unused rockchip_pd_pwr_down_wfi function
Paul Kocialkowski [Tue, 4 Apr 2017 17:15:56 +0000 (19:15 +0200)]
rockchip: Remove unused rockchip_pd_pwr_down_wfi function

The rockchip_pd_pwr_down_wfi function is currently unused, which may
trigger compiler warnings or errors. Remove it.

Change-Id: I7e1b0ae092e8855528ac2065ecefc8bd45305f31
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
7 years agoFix ARM_BL31_IN_DRAM build
Douglas Raillard [Wed, 8 Mar 2017 16:49:31 +0000 (16:49 +0000)]
Fix ARM_BL31_IN_DRAM build

Some header files using the ULL() macro were not directly including
utils.h where the macro definition resides. As a consequence, a linker
script with values using this macro did not see the macro definition
and kept the "ULL(<value>)" call in the preprocessed file, which lead to
link error.

Files using ULL() macro now include utils.h directly.

Change-Id: I433a7f36bd21a156c20e69bc2a2bb406140ebdf9
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
7 years agoMerge pull request #874 from dp-arm/dp/mbed-macros
davidcunado-arm [Fri, 31 Mar 2017 16:47:21 +0000 (17:47 +0100)]
Merge pull request #874 from dp-arm/dp/mbed-macros

mbedtls: Namespace TF specific macros

7 years agoJuno: Initialize stack protector canary from the trusted entropy source
dp-arm [Tue, 28 Feb 2017 14:43:15 +0000 (14:43 +0000)]
Juno: Initialize stack protector canary from the trusted entropy source

Change-Id: I7f3e4bfd46613c6311ba4015d56705414fd6feab
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
7 years agoJuno: Introduce juno_getentropy(void *buf, size_t len)
dp-arm [Mon, 27 Feb 2017 12:21:43 +0000 (12:21 +0000)]
Juno: Introduce juno_getentropy(void *buf, size_t len)

This function fills the buffer (first argument) with the specified
number of bytes (second argument) from the trusted entropy source.

This function will be used to initialize the stack protector canary.

Change-Id: Iff15aaf4778c13fa883ecb5528fcf9b8479d4489
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
7 years agoIntroduce MIN()/MAX() macros in utils.h
dp-arm [Tue, 21 Mar 2017 15:38:06 +0000 (15:38 +0000)]
Introduce MIN()/MAX() macros in utils.h

Change-Id: If88270bc9edb32634a793b1e1be6c4829f39b9c5
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
7 years agoAdd support for GCC stack protection
Douglas Raillard [Fri, 24 Feb 2017 18:14:15 +0000 (18:14 +0000)]
Add support for GCC stack protection

Introduce new build option ENABLE_STACK_PROTECTOR. It enables
compilation of all BL images with one of the GCC -fstack-protector-*
options.

A new platform function plat_get_stack_protector_canary() is introduced.
It returns a value that is used to initialize the canary for stack
corruption detection. Returning a random value will prevent an attacker
from predicting the value and greatly increase the effectiveness of the
protection.

A message is printed at the ERROR level when a stack corruption is
detected.

To be effective, the global data must be stored at an address
lower than the base of the stacks. Failure to do so would allow an
attacker to overwrite the canary as part of an attack which would void
the protection.

FVP implementation of plat_get_stack_protector_canary is weak as
there is no real source of entropy on the FVP. It therefore relies on a
timer's value, which could be predictable.

Change-Id: Icaaee96392733b721fa7c86a81d03660d3c1bc06
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
7 years agoRemove dead loops in assert() in C and ASM
Antonio Nino Diaz [Thu, 16 Feb 2017 16:49:18 +0000 (16:49 +0000)]
Remove dead loops in assert() in C and ASM

The desired behaviour is to call `plat_panic_handler()`, and to use
`no_ret` to do so from ASM.

Change-Id: I88b2feefa6e6c8f9bf057fd51ee0d2e9fb551e4f
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
7 years agoFlush console where necessary
Antonio Nino Diaz [Thu, 16 Feb 2017 16:17:19 +0000 (16:17 +0000)]
Flush console where necessary

Call console_flush() before execution either terminates or leaves an
exception level.

Fixes: ARM-software/tf-issues#123
Change-Id: I64eeb92effb039f76937ce89f877b68e355588e3
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
7 years agoAdd and use plat_crash_console_flush() API
Antonio Nino Diaz [Fri, 17 Feb 2017 17:11:27 +0000 (17:11 +0000)]
Add and use plat_crash_console_flush() API

This API makes sure that all the characters sent to the crash console
are output before returning from it.

Porting guide updated.

Change-Id: I1785f970a40f6aacfbe592b6a911b1f249bb2735
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
7 years agoAdd console_core_flush() in upstream platforms
Antonio Nino Diaz [Wed, 8 Feb 2017 15:58:12 +0000 (15:58 +0000)]
Add console_core_flush() in upstream platforms

It is needed to add placeholders for this function because, as this is
not a `plat_xxx()` function, there aren't weak definitions of it in any
file.

If `console_flush()` is used and there isn't an implementation of
`console_core_flush()` in any file, the compilation will fail.

Change-Id: I50eb56d085c4c9fbc85d40c343e86af6412f3020
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
7 years agoAdd console_flush() to console API
Antonio Nino Diaz [Mon, 6 Feb 2017 16:03:41 +0000 (16:03 +0000)]
Add console_flush() to console API

This function ensures that console output is flushed, for example
before shutting down or use by another component

In line with other console APIs, console_flush() wraps
console_core_flush().

Also implement console_core_flush() for PL011.

Change-Id: I3db365065e4de04a454a5c2ce21be335a23a01e4
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
7 years agoTegra: memctrl_v2: get chip revision using platform identifiers
Varun Wadekar [Tue, 19 Jul 2016 00:43:41 +0000 (17:43 -0700)]
Tegra: memctrl_v2: get chip revision using platform identifiers

This patch switches to the functions which identify the underlying
platform in order to calculate the chip SKU.

Change-Id: I20cf5623465289ccfab28d6578efcf762bfeb456
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra186: mce: read MCE's firmware version on "real" platforms
Varun Wadekar [Tue, 19 Jul 2016 00:42:02 +0000 (17:42 -0700)]
Tegra186: mce: read MCE's firmware version on "real" platforms

This patch runs the MCE firmware's version check only if the underlying
platform has the capability to the run the firmware. MCE firmware is not
running on simulation platforms, identified by v0.3 or v0.6, read from the
Tegra Chip ID value.

Change-Id: I3b1788b1ee2a0d4464017bb879ac5792cb7022b8
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
7 years agoTegra186: use helper functions to get major/minor version
Varun Wadekar [Tue, 19 Jul 2016 18:29:40 +0000 (11:29 -0700)]
Tegra186: use helper functions to get major/minor version

This patch uses helper functions to read the chips's major and minor
version values.

Change-Id: I5b2530a31af5ab3778a8aa63380def4e9f9ee6ec
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>