project/bcm63xx/atf.git
7 years agoMerge pull request #1142 from etienne-lms/qemu-int
davidcunado-arm [Fri, 3 Nov 2017 16:27:42 +0000 (16:27 +0000)]
Merge pull request #1142 from etienne-lms/qemu-int

qemu: update deprecated interrupt registering

7 years agoMerge pull request #1137 from soby-mathew/sm/arm_plat_en_gicv3_save
davidcunado-arm [Fri, 3 Nov 2017 13:12:48 +0000 (13:12 +0000)]
Merge pull request #1137 from soby-mathew/sm/arm_plat_en_gicv3_save

Enable GICv3 save for ARM platforms

7 years agoqemu: update deprecated interrupt registering
Etienne Carriere [Thu, 2 Nov 2017 11:05:12 +0000 (12:05 +0100)]
qemu: update deprecated interrupt registering

Registered interrupts are configured in edge detection as the default
previous configuration assumed in previous code.

Not target mask required as Qemu BL31 will not send/route SGIs.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
7 years agoMerge pull request #1150 from dp-arm/dp/events
davidcunado-arm [Wed, 1 Nov 2017 08:46:02 +0000 (08:46 +0000)]
Merge pull request #1150 from dp-arm/dp/events

aarch64: Add PubSub events to capture security state transitions

7 years agoMerge pull request #1149 from robertovargas-arm/fwu-testing
davidcunado-arm [Tue, 31 Oct 2017 23:23:56 +0000 (23:23 +0000)]
Merge pull request #1149 from robertovargas-arm/fwu-testing

Add FWU booting instructions to the user guide

7 years agoMerge pull request #1141 from robertovargas-arm/boot_redundancy
davidcunado-arm [Tue, 31 Oct 2017 23:21:39 +0000 (23:21 +0000)]
Merge pull request #1141 from robertovargas-arm/boot_redundancy

Add platform hooks for boot redundancy support

7 years agoaarch64: Add PubSub events to capture security state transitions
Dimitris Papastamos [Fri, 13 Oct 2017 14:27:58 +0000 (15:27 +0100)]
aarch64: Add PubSub events to capture security state transitions

Add events that trigger before entry to normal/secure world.  The
events trigger after the normal/secure context has been restored.

Similarly add events that trigger after leaving normal/secure world.
The events trigger after the normal/secure context has been saved.

Change-Id: I1b48a7ea005d56b1f25e2b5313d77e67d2f02bc5
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
7 years agoAdd FWU booting instructions to the user guide
Roberto Vargas [Tue, 17 Oct 2017 09:19:00 +0000 (10:19 +0100)]
Add FWU booting instructions to the user guide

FWU uses additional images that have to be loaded,
and this patch adds the documentation of how to do
it in FVP and Juno.

Change-Id: I1a40641c11c5a4c8db0aadeaeb2bec30c9279e28
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
7 years agoMerge pull request #1144 from geesun/qx/resize_bl2_size
davidcunado-arm [Mon, 30 Oct 2017 16:56:07 +0000 (16:56 +0000)]
Merge pull request #1144 from geesun/qx/resize_bl2_size

Change the default option of ARM_TSP_RAM_LOCATION and Enlarge the BL2 size on ARM platforms

7 years agoMerge pull request #1147 from etienne-lms/qemu-optee-load
davidcunado-arm [Fri, 27 Oct 2017 00:07:39 +0000 (01:07 +0100)]
Merge pull request #1147 from etienne-lms/qemu-optee-load

qemu/optee: load OP-TEE pageable part 2MB above OP-TEE image

7 years agoMerge pull request #1143 from etienne-lms/qemu-hpen
davidcunado-arm [Thu, 26 Oct 2017 15:10:36 +0000 (16:10 +0100)]
Merge pull request #1143 from etienne-lms/qemu-hpen

qemu: fix holding pen mailbox sequence

7 years agoqemu/optee: load OP-TEE pageable part 2MB above OP-TEE image
Etienne Carriere [Thu, 26 Oct 2017 10:05:01 +0000 (12:05 +0200)]
qemu/optee: load OP-TEE pageable part 2MB above OP-TEE image

OP-TEE dedicates the end of the Qemu secure DRAM as specific out-of-TEE
secure RAM. To support this configuration the trusted firmware should
not load OP-TEE resources in this area.

To overcome the issue, OP-TEE pageable image is now loaded 2MByte above
the secure RAM base address.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
7 years agoMerge pull request #1138 from michpappas/tf-issues#526_qemu_does_not_support_TBB
davidcunado-arm [Thu, 26 Oct 2017 08:35:35 +0000 (09:35 +0100)]
Merge pull request #1138 from michpappas/tf-issues#526_qemu_does_not_support_TBB

qemu: Add support for Trusted Board Boot

7 years agoqemu: Add support for Trusted Board Boot
Michalis Pappas [Wed, 18 Oct 2017 01:43:37 +0000 (09:43 +0800)]
qemu: Add support for Trusted Board Boot

This patch adds support for TBB to qemu. An RSA ROT keypair is generated at
build time and is included into BL1/BL2. The key and content certificates
are read over semihosting.

Fixes ARM-software/tf-issues#526

Signed-off-by: Michalis Pappas <mpappas@fastmail.fm>
7 years agoplat/arm: enlarge the BL2 size on Arm platforms when TBB is enabled
Qixiang Xu [Fri, 13 Oct 2017 01:23:42 +0000 (09:23 +0800)]
plat/arm: enlarge the BL2 size on Arm platforms when TBB is enabled

For Trusted Board Boot, BL2 needs more space to support the ECDSA
and ECDSA+RSA algorithms.

Change-Id: Ie7eda9a1315ce836dbc6d18d6588f8d17891a92d
Signed-off-by: Qixiang Xu <qixiang.xu@arm.com>
7 years agoplat/arm: change the default option of ARM_TSP_RAM_LOCATION
Qixiang Xu [Fri, 13 Oct 2017 01:04:12 +0000 (09:04 +0800)]
plat/arm: change the default option of ARM_TSP_RAM_LOCATION

On Arm standard platforms, it runs out of SRAM space when TBB is
enabled, so the TSP default location is changed to dram when TBB
is enabled.

Change-Id: I516687013ad436ef454d2055d4e6fce06e467044
Signed-off-by: Qixiang Xu <qixiang.xu@arm.com>
7 years agoAdd platform hooks for boot redundancy support
Roberto Vargas [Tue, 26 Sep 2017 11:53:01 +0000 (12:53 +0100)]
Add platform hooks for boot redundancy support

These hooks are intended to allow one platform to try load
images from alternative places. There is a hook to initialize
the sequence of boot locations and a hook to pass to the next
sequence.

Change-Id: Ia0f84c415208dc4fa4f9d060d58476db23efa5b2
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
7 years agoqemu: fix holding pen mailbox sequence
Etienne Carriere [Mon, 23 Oct 2017 23:09:52 +0000 (01:09 +0200)]
qemu: fix holding pen mailbox sequence

Before this change, plat_secondary_cold_boot_setup reads wake up mailbox
as a byte array but through 64bit accesses on unaligned 64bit addresses.
In the other hand qemu_pwr_domain_on wakes secondary cores by writing
into a 64bit array.

This change forces the 64bit mailbox format as PLAT_QEMU_HOLD_ENTRY_SIZE
explicitly specifies it.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
7 years agoMerge pull request #1139 from hzhuang1/fix_edmac
davidcunado-arm [Mon, 23 Oct 2017 15:45:59 +0000 (16:45 +0100)]
Merge pull request #1139 from hzhuang1/fix_edmac

Fix edmac

7 years agoMerge pull request #1132 from jeenu-arm/pubsub
davidcunado-arm [Mon, 23 Oct 2017 08:54:45 +0000 (09:54 +0100)]
Merge pull request #1132 from jeenu-arm/pubsub

Publish and Subscribe framework

7 years agoPSCI: Publish CPU ON event
Jeenu Viswambharan [Fri, 22 Sep 2017 07:32:10 +0000 (08:32 +0100)]
PSCI: Publish CPU ON event

This allows other EL3 components to subscribe to CPU on events.

Update Firmware Design guide to list psci_cpu_on_finish as an available
event.

Change-Id: Ida774afe0f9cdce4021933fcc33a9527ba7aaae2
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agoBL31: Introduce Publish and Subscribe framework
Jeenu Viswambharan [Fri, 22 Sep 2017 07:32:10 +0000 (08:32 +0100)]
BL31: Introduce Publish and Subscribe framework

This light-weight framework enables some EL3 components to publish
events which other EL3 components can subscribe to. Publisher can
optionally pass opaque data for subscribers. The order in which
subscribers are called is not defined.

Firmware design updated.

Change-Id: I24a3a70b2b1dedcb1f73cf48313818aebf75ebb6
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agoMerge pull request #1131 from jeenu-arm/gic-migrate
davidcunado-arm [Sat, 21 Oct 2017 21:50:35 +0000 (22:50 +0100)]
Merge pull request #1131 from jeenu-arm/gic-migrate

Migrate upstream platforms to using interrupt properties

7 years agoMerge pull request #1130 from jeenu-arm/gic-patches
davidcunado-arm [Sat, 21 Oct 2017 21:18:48 +0000 (22:18 +0100)]
Merge pull request #1130 from jeenu-arm/gic-patches

New GIC APIs and specifying interrupt propertes

7 years agoMerge pull request #1135 from EvanLloyd/ejll/62_fiptool2
davidcunado-arm [Sat, 21 Oct 2017 20:35:32 +0000 (21:35 +0100)]
Merge pull request #1135 from EvanLloyd/ejll/62_fiptool2

fiptool: Enable Visual Studio build

7 years agoMerge pull request #1136 from antonio-nino-diaz-arm/an/xlat-get-set-attr
davidcunado-arm [Fri, 20 Oct 2017 16:17:09 +0000 (17:17 +0100)]
Merge pull request #1136 from antonio-nino-diaz-arm/an/xlat-get-set-attr

Add APIs to get and modify attributes of memory regions

7 years agoMerge pull request #1134 from masahir0y/uniphier
davidcunado-arm [Thu, 19 Oct 2017 08:53:15 +0000 (09:53 +0100)]
Merge pull request #1134 from masahir0y/uniphier

uniphier: fix section of  ROTPK hash

7 years agoMerge pull request #1140 from eleanorbonnici-arm/eb/docs/update_models
davidcunado-arm [Wed, 18 Oct 2017 22:39:30 +0000 (23:39 +0100)]
Merge pull request #1140 from eleanorbonnici-arm/eb/docs/update_models

Update Foundation, AEM and Cortex Models versions

7 years agoMerge pull request #1129 from robertovargas-arm/enable_O0
davidcunado-arm [Wed, 18 Oct 2017 22:39:07 +0000 (23:39 +0100)]
Merge pull request #1129 from robertovargas-arm/enable_O0

Fix use of MSR (immediate)

7 years agoUpdate Foundation, AEM and Cortex Models versions
Eleanor Bonnici [Wed, 4 Oct 2017 14:03:33 +0000 (15:03 +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.1 Model release available on
developer.arm.com. Trusted Firmware has also been tested against the
v8.7 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: Ia0f51469032427b6056567d151bf8144a7cf0e42
Signed-off-by: Eleanor Bonnici <Eleanor.bonnici@arm.com>
7 years agouniphier: move ROTPK hash to .rodata section
Masahiro Yamada [Tue, 17 Oct 2017 01:52:53 +0000 (10:52 +0900)]
uniphier: move ROTPK hash to .rodata section

This is not executable code.  It should be put into .rodata instead
of .text section.

This produces more correct BL1 image when SEPARATE_CODE_AND_RODATA is
defined.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoHiKey: make RTC out of reset mode
Haojian Zhuang [Wed, 18 Oct 2017 11:56:02 +0000 (19:56 +0800)]
HiKey: make RTC out of reset mode

Make RTC out of reset mode since it may be used in UEFI.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
7 years agoHiKey: init EDMA controller with non secure mode
Haojian Zhuang [Wed, 18 Oct 2017 11:52:20 +0000 (19:52 +0800)]
HiKey: init EDMA controller with non secure mode

Init EDMA controller with non secure mode. A lot of peripherals are
depend on EDMA controller. But EDMA controller is in secure mode
by default. And this operation has to be executed in secure mode.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
7 years agoMerge pull request #1133 from geesun/qx/fixed_tbbr_doc_ver
davidcunado-arm [Tue, 17 Oct 2017 16:29:42 +0000 (17:29 +0100)]
Merge pull request #1133 from geesun/qx/fixed_tbbr_doc_ver

docs: Update Trusted Board Boot Requirements document number

7 years agozynqmp: Migrate to using interrupt properties
Jeenu Viswambharan [Fri, 29 Sep 2017 10:15:18 +0000 (11:15 +0100)]
zynqmp: Migrate to using interrupt properties

Change-Id: Ia8503d446cc8b4246013046f6294fea364c9c882
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agomt8173: Migrate to using interrupt properties
Jeenu Viswambharan [Fri, 29 Sep 2017 10:14:51 +0000 (11:14 +0100)]
mt8173: Migrate to using interrupt properties

Change-Id: I1463a4f9b74d74d59ac1d37b7b9c8e53416ab904
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agopoplar: Migrate to using interrupt properties
Jeenu Viswambharan [Fri, 29 Sep 2017 10:14:02 +0000 (11:14 +0100)]
poplar: Migrate to using interrupt properties

Change-Id: Ibca6ea29be32783de666e0e0a0481668fc11860f
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agoMerge pull request #1127 from davidcunado-arm/dc/pmrc_init
davidcunado-arm [Tue, 17 Oct 2017 12:53:17 +0000 (13:53 +0100)]
Merge pull request #1127 from davidcunado-arm/dc/pmrc_init

Init and save / restore of PMCR_EL0 / PMCR

7 years agoMerge pull request #1126 from robertovargas-arm/psci-v1.1
davidcunado-arm [Tue, 17 Oct 2017 11:18:23 +0000 (12:18 +0100)]
Merge pull request #1126 from robertovargas-arm/psci-v1.1

Update PSCI to v1.1

7 years agofiptool: Enable Visual Studio build
Evan Lloyd [Thu, 25 May 2017 18:16:53 +0000 (19:16 +0100)]
fiptool: Enable Visual Studio build

Updates are required to enable the fiptool utility to be built on a
Windows platform.  This change modifies the source files to enable
building with Visual Studio (detected via preprocessor settings).
The primary changes are:
  1.  Provide an implementation of the getopt_long function.  This does
      not exist in the Visual Studio CRT libraries because Windows
      commands normally use '/' not '-' as an option indicator.
  2.  Redirect some function names to match those supported by the
      Visual Studio libraries (when building with Visual Studio).
  2.  Modify a structure name (stat) to match that provided
      by the Visual Studio libraries (_stat).

Note - this change does not provide makefile updates.  It only modifies
       the sources to enable the fiptool to be built from a Visual
       Studio project.  In normal use the presence of FIPTOOL.EXE is
       enough to satisfy the make requirements.  A makefile change may
       be derived from the Visual Studio command line information at
       some point in the future.

Change-Id: I3ade77ea140246af3c030920b3f97c070087f111
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
7 years agoIntroduce functions to disable the MMU in EL1
Antonio Nino Diaz [Thu, 5 Oct 2017 14:19:42 +0000 (15:19 +0100)]
Introduce functions to disable the MMU in EL1

The implementation is the same as those used to disable it in EL3.

Change-Id: Ibfe7e69034a691fbf57477c5a76a8cdca28f6b26
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
7 years agoxlat: Introduce API to change memory attributes of a region
Sandrine Bailleux [Tue, 17 Oct 2017 11:02:03 +0000 (12:02 +0100)]
xlat: Introduce API to change memory attributes of a region

This patch introduces a new API in the translation tables library
(v2), that allows to change the memory attributes of a memory
region. It may be used to change its execution permissions and
data access permissions.

As a prerequisite, the memory must be already mapped. Moreover, it
must be mapped at the finest granularity (currently 4 KB).

Change-Id: I242a8c6f0f3ef2b0a81a61e28706540462faca3c
Co-authored-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Co-authored-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
7 years agoxlat: Introduce API to get memory attributes of a region
Sandrine Bailleux [Fri, 13 Oct 2017 13:17:09 +0000 (14:17 +0100)]
xlat: Introduce API to get memory attributes of a region

This patch introduces a new API in the translation tables library
(v2), that allows to query the memory attributes of a memory block
or a memory page.

Change-Id: I45a8b39a53da39e7617cbac4bff5658dc1b20a11
Co-authored-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Co-authored-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
7 years agoxlat: Define translation regime in AArch32
Antonio Nino Diaz [Mon, 16 Oct 2017 14:25:22 +0000 (15:25 +0100)]
xlat: Define translation regime in AArch32

Previously, in AArch32, `IMAGE_XLAT_DEFAULT_REGIME` wasn't defined. The
translation regime is only used in the AArch64 port of the translation
tables library v2, so this is not a problem for now, but future patches
will use it.

`IMAGE_EL` isn't used in AArch32, so it isn't needed to define it.

Change-Id: I4acdb01a58658956ab94bd82ed5b7fee1aa6ba90
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
7 years agoGIC: Allow specifying interrupt properties
Jeenu Viswambharan [Fri, 22 Sep 2017 07:32:09 +0000 (08:32 +0100)]
GIC: Allow specifying interrupt properties

The GIC driver initialization currently allows an array of interrupts to
be configured as secure. Future use cases would require more interrupt
configuration other than just security, such as priority.

This patch introduces a new interrupt property array as part of both
GICv2 and GICv3 driver data. The platform can populate the array with
interrupt numbers and respective properties. The corresponding driver
initialization iterates through the array, and applies interrupt
configuration as required.

This capability, and the current way of supplying array (or arrays, in
case of GICv3) of secure interrupts, are however mutually exclusive.
Henceforth, the platform should supply either:

  - A list of interrupts to be mapped as secure (the current way).
    Platforms that do this will continue working as they were. With this
    patch, this scheme is deprecated.

  - A list of interrupt properties (properties include interrupt group).
    Individual interrupt properties are specified via. descriptors of
    type 'interrupt_prop_desc_t', which can be populated with the macro
    INTR_PROP_DESC().

A run time assert checks that the platform doesn't specify both.

Henceforth the old scheme of providing list of secure interrupts is
deprecated. When built with ERROR_DEPRECATED=1, GIC drivers will require
that the interrupt properties are supplied instead of an array of secure
interrupts.

Add a section to firmware design about configuring secure interrupts.

Fixes ARM-software/tf-issues#262

Change-Id: I8eec29e72eb69dbb6bce77879febf32c95376942
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agouniphier: Migrate to using interrupt properties
Jeenu Viswambharan [Fri, 29 Sep 2017 10:14:02 +0000 (11:14 +0100)]
uniphier: Migrate to using interrupt properties

Change-Id: I795ec540942130b5ddc0fa1fd7167f7e1d1ae967
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agoGIC: Add helpers to set interrupt configuration
Jeenu Viswambharan [Fri, 22 Sep 2017 07:32:09 +0000 (08:32 +0100)]
GIC: Add helpers to set interrupt configuration

The helpers perform read-modify-write on GIC*_ICFGR registers, but don't
serialise callers. Any serialisation must be taken care of by the
callers.

Change-Id: I71995f82ff2c7f70d37af0ede30d6ee18682fd3f
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agoARM platforms: Migrate to using interrupt properties
Jeenu Viswambharan [Fri, 22 Sep 2017 07:59:59 +0000 (08:59 +0100)]
ARM platforms: Migrate to using interrupt properties

An earlier patch added provision for the platform to provide secure
interrupt properties. ARM platforms already has a list of interrupts
that fall into different secure groups.

This patch defines macros that enumerate interrupt properties in the
same fashion, and points the driver driver data to a list of interrupt
properties rather than list of secure interrupts on ARM platforms.  The
deprecated interrupt list definitions are however retained to support
legacy builds.

Configuration applied to individual interrupts remain unchanged, so no
runtime behaviour change expected.

NOTE: Platforms that use the arm/common function
plat_arm_gic_driver_init() must replace their PLAT_ARM_G1S_IRQS and
PLAT_ARM_G0_IRQS macro definitions with PLAT_ARM_G1S_IRQ_PROPS and
PLAT_ARM_G0_IRQ_PROPS macros respectively, using the provided
INTR_PROP_DESC macro.

Change-Id: I24d643b83e3333753a3ba97d4b6fb71e16bb0952
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agoGIC: Add API to set priority mask
Jeenu Viswambharan [Fri, 22 Sep 2017 07:32:09 +0000 (08:32 +0100)]
GIC: Add API to set priority mask

API documentation updated.

Change-Id: I40feec1fe67a960d035061b54dd55610bc34ce1d
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agoGIC: Add API to set/clear interrupt pending
Jeenu Viswambharan [Fri, 22 Sep 2017 07:32:09 +0000 (08:32 +0100)]
GIC: Add API to set/clear interrupt pending

API documentation updated.

Change-Id: I14e33cfc7dfa93257c82d76fae186b17a1b6d266
Co-authored-by: Yousuf A <yousuf.sait@arm.com>
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agoGIC: Add API to set interrupt routing
Jeenu Viswambharan [Fri, 22 Sep 2017 07:32:09 +0000 (08:32 +0100)]
GIC: Add API to set interrupt routing

SPIs can be routed to either a specific PE, or to any one of all
available PEs.

API documentation updated.

Change-Id: I28675f634568aaf4ea1aa8aa7ebf25b419a963ed
Co-authored-by: Yousuf A <yousuf.sait@arm.com>
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agoGIC: Add API to raise secure SGI
Jeenu Viswambharan [Fri, 22 Sep 2017 07:32:09 +0000 (08:32 +0100)]
GIC: Add API to raise secure SGI

API documentation updated.

Change-Id: I129725059299af6cc612bafa8d74817f779d7c4f
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agoGIC: Add APIs to set interrupt type and query support
Jeenu Viswambharan [Fri, 22 Sep 2017 07:32:09 +0000 (08:32 +0100)]
GIC: Add APIs to set interrupt type and query support

The back end GIC driver converts and assigns the interrupt type to
suitable group.

For GICv2, a build option GICV2_G0_FOR_EL3 is introduced, which
determines to which type Group 0 interrupts maps to.

 - When the build option is set 0 (the default), Group 0 interrupts are
   meant for Secure EL1. This is presently the case.

 - Otherwise, Group 0 interrupts are meant for EL3. This means the SPD
   will have to synchronously hand over the interrupt to Secure EL1.

The query API allows the platform to query whether the platform supports
interrupts of a given type.

API documentation updated.

Change-Id: I60fdb4053ffe0bd006b3b20914914ebd311fc858
Co-authored-by: Yousuf A <yousuf.sait@arm.com>
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agoGIC: Add API to set interrupt priority
Jeenu Viswambharan [Fri, 22 Sep 2017 07:32:09 +0000 (08:32 +0100)]
GIC: Add API to set interrupt priority

API documentation updated.

Change-Id: Ib700eb1b8ca65503aeed0ac4ce0e7b934df67ff9
Co-authored-by: Yousuf A <yousuf.sait@arm.com>
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agoGIC: Add APIs to enable and disable interrupt
Jeenu Viswambharan [Fri, 22 Sep 2017 07:32:09 +0000 (08:32 +0100)]
GIC: Add APIs to enable and disable interrupt

API documentation updated.

Change-Id: Ice7511f8df5356851001d2f7dc2a46cfe318f9ba
Co-authored-by: Yousuf A <yousuf.sait@arm.com>
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agoGIC: Add API to get interrupt active status
Jeenu Viswambharan [Fri, 22 Sep 2017 07:32:09 +0000 (08:32 +0100)]
GIC: Add API to get interrupt active status

API documentation updated.

Change-Id: I6d61785af0d5330930c709de971a904dc7c3516c
Co-authored-by: Yousuf A <yousuf.sait@arm.com>
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agoGIC: Add APIs to query interrupt types
Jeenu Viswambharan [Fri, 22 Sep 2017 07:32:09 +0000 (08:32 +0100)]
GIC: Add APIs to query interrupt types

These APIs allow the GIC implementation to categorize interrupt numbers
into SPIs, PPIs, and SGIs. The default implementations for GICv2 and
GICv3 follows interrupt numbering as specified by the ARM GIC
architecture.

API documentation updated.

Change-Id: Ia6aa379dc955994333232e6138f259535d4fa087
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agoARM platforms: supply per-PE target mask array
Jeenu Viswambharan [Fri, 22 Sep 2017 07:32:09 +0000 (08:32 +0100)]
ARM platforms: supply per-PE target mask array

Call the GICv2 driver API to initialise per-PE target mask.

Change-Id: Idc7eb0d906a5379f4c05917af05c90613057ab97
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agoGICv2: Add driver API to set PE target mask
Jeenu Viswambharan [Fri, 22 Sep 2017 07:32:09 +0000 (08:32 +0100)]
GICv2: Add driver API to set PE target mask

The PE target mask is used to translate linear PE index (returned by
platform core position) to a bit mask used when targeting interrupts to
a PE, viz. when raising SGIs and routing SPIs.

The platform shall:

  - Populate the driver data with a pointer to array that's to contain
    per-PE target masks.

  - Invoke the new driver API 'gicv2_set_pe_target_mask()' during
    per-CPU initialization so that the driver populates the target mask
    for that CPU.

Platforms that don't intend to target interrupts or raise SGIs need not
populate this.

Change-Id: Ic0db54da86915e9dccd82fff51479bc3c1fdc968
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agoGIC: Add API to get running priority
Jeenu Viswambharan [Fri, 22 Sep 2017 07:32:09 +0000 (08:32 +0100)]
GIC: Add API to get running priority

Document the API in separate platform interrupt controller API document.

Change-Id: If18f208e10a8a243f5c59d226fcf48e985941949
Co-authored-by: Yousuf A <yousuf.sait@arm.com>
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agoMerge pull request #1123 from robertovargas-arm/reset2
davidcunado-arm [Mon, 16 Oct 2017 15:31:13 +0000 (16:31 +0100)]
Merge pull request #1123 from robertovargas-arm/reset2

Integration of reset2 PSCI v1.1 functionality

7 years agoFix use of MSR (immediate)
Roberto Vargas [Mon, 18 Sep 2017 08:53:25 +0000 (09:53 +0100)]
Fix use of MSR (immediate)

The macro DEFINE_SYSREG_WRITE_CONST_FUNC defines an inline function
to an assembly statement that uses the MSR (immediate) instruction
to access the PSTATE.  The "i" (immediate) assembly constraint on
the operand was only satisfied when compiling with optimizations
enabled which resulted in the function being optimized out - the
"const uint64_t v" parameter was optimized out and replaced by a
literal value.

When compiling without optimizations, the function call remained and
therefore the parameter is not optimized out - compilation fails as
the constraint is impossible to satisfy by the compiler.

This patch replaces the function encapsulating the use of
the MSR (immediate) with a macro that allows the literal value to be
directly fed to the inline assembly statement

Change-Id: Ib379a7acc48ef3cb83090a680cd8a6ce1a94a9d9
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
7 years agodocs: Update Trusted Board Boot Requirements document number
Qixiang Xu [Mon, 16 Oct 2017 09:29:18 +0000 (17:29 +0800)]
docs: Update Trusted Board Boot Requirements document number

Update DEN0006B-5(2013) to DEN0006C-1(2015)

Change-Id: I753a14214dde827d004fd04c47b5ba112df38d73
Signed-off-by: Qixiang Xu <qixiang.xu@arm.com>
7 years agoMerge pull request #1122 from EvanLloyd/ejll/62_fiptool1
davidcunado-arm [Mon, 16 Oct 2017 07:51:18 +0000 (08:51 +0100)]
Merge pull request #1122 from EvanLloyd/ejll/62_fiptool1

fiptool: Precursor changes for Visual Studio

7 years agoUpdate documentation to PSCI v1.1
Roberto Vargas [Tue, 12 Sep 2017 09:28:35 +0000 (10:28 +0100)]
Update documentation to PSCI v1.1

This patch adds documentation about the new PCSI API to the porting guide
and it also update the version and function list in the firmware design.

Change-Id: Ie4edd190926a501922c061f5fcad53c9b389e331
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
7 years agoAdd missed fields in documentation of plat_psci_ops
Roberto Vargas [Fri, 13 Oct 2017 11:24:09 +0000 (12:24 +0100)]
Add missed fields in documentation of plat_psci_ops

Change-Id: Ie4ee8aa2627573c95549927c9ac4e8a963035359
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
7 years agoUpdate PSCI version to 1.1
Roberto Vargas [Mon, 11 Sep 2017 08:11:58 +0000 (09:11 +0100)]
Update PSCI version to 1.1

Updated the PSCI version conforming to the PSCI v1.1
specification (ARM DEN022D).

Change-Id: I1f34772ef6de37ec1ade719a1ab3aa062152d995
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
7 years agomem_protect: Fix PSCI FEATURES API for MEM_PROTECT_CHECK
Roberto Vargas [Thu, 12 Oct 2017 09:57:40 +0000 (10:57 +0100)]
mem_protect: Fix PSCI FEATURES API for MEM_PROTECT_CHECK

With this patch the PSCI_FEATURES API correctly reports availability
of the PSCI_MEM_PROTECT_CHECK API - PSCI_MEM_CHK_RANGE_AARCH64 is
added to the PSCI capabilities mask, PSCI_CAP_64BIT_MASK

Change-Id: Ic90ee804deaadf0f948dc2d46ac5fe4121ef77ae
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
7 years agoInit and save / restore of PMCR_EL0 / PMCR
David Cunado [Mon, 2 Oct 2017 16:41:39 +0000 (17:41 +0100)]
Init and save / restore of PMCR_EL0 / PMCR

Currently TF does not initialise the PMCR_EL0 register in
the secure context or save/restore the register.

In particular, the DP field may not be set to one to prohibit
cycle counting in the secure state, even though event counting
generally is prohibited via the default setting of MDCR_EL3.SMPE
to 0.

This patch initialises PMCR_EL0.DP to one in the secure state
to prohibit cycle counting and also initialises other fields
that have an architectually UNKNOWN reset value.

Additionally, PMCR_EL0 is added to the list of registers that are
saved and restored during a world switch.

Similar changes are made for PMCR for the AArch32 execution state.

NOTE: secure world code at lower ELs that assume other values in PMCR_EL0
will be impacted.

Change-Id: Iae40e8c0a196d74053accf97063ebc257b4d2f3a
Signed-off-by: David Cunado <david.cunado@arm.com>
7 years agoreset2: Add css_system_reset2()
Roberto Vargas [Wed, 16 Aug 2017 07:57:45 +0000 (08:57 +0100)]
reset2: Add css_system_reset2()

This function implements the platform dependant part of PSCI system
reset2 for CSS platforms using SCMI.

Change-Id: I724389decab484043cadf577aeed96b349c1466d
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
7 years agoscp: Introduce css_scp_system_off() function
Roberto Vargas [Mon, 31 Jul 2017 08:45:10 +0000 (09:45 +0100)]
scp: Introduce css_scp_system_off() function

The common implementation of css_scp_sys_shutdown and
css_scp_warm_reset is refactored into a new function,
css_scp_system_off() that allows the desired power state to be
specified.

The css_scp_system_off can be used in the implementation of
SYSTEM_RESET2 for PSCI v1.1.

Change-Id: I161e62354d3d75f969b8436d794335237520a9a4
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
7 years agoreset2: Add PSCI system_reset2 function
Roberto Vargas [Wed, 26 Jul 2017 08:23:09 +0000 (09:23 +0100)]
reset2: Add PSCI system_reset2 function

This patch implements PSCI_SYSTEM_RESET2 API as defined in PSCI
v1.1 specification. The specification allows architectural and
vendor-specific resets via this API. In the current specification,
there is only one architectural reset, the warm reset. This reset is
intended to provide a fast reboot path that guarantees not to reset
system main memory.

Change-Id: I057bb81a60cd0fe56465dbb5791d8e1cca025bd3
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
7 years agofiptool: Precursor changes for Visual Studio
Evan Lloyd [Thu, 25 May 2017 18:06:47 +0000 (19:06 +0100)]
fiptool: Precursor changes for Visual Studio

In order to compile the source of Fiptool using Visual Studio a number
of adjustments are required to the source.  This commit modifies the
source with changes that will be required, but makes no functional
modification.  The intent is to allow confirmation that the GCC build
is unaffected.

Change-Id: I4055bd941c646dd0a1aa2e24b940a1db3bf629ce
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
7 years agoARM platforms: enable GICv3 state save/restore
Soby Mathew [Wed, 11 Oct 2017 15:08:58 +0000 (16:08 +0100)]
ARM platforms: enable GICv3 state save/restore

Provides GICv3 save/restore feature to arm_system_pwr_domain_resume and
arm_system_pwr_domain_save functions.

Introduce FVP PSCI power level 3 (System level) support. This is solely
done to provide example code on how to use the GICv3 save and restore
helpers.

Also make CSS GICv3 platforms power off the Redistributor on SYSTEM
SUSPEND as its state is saved and restored.

Change-Id: I0d852f3af8824edee1a17c085cf593ddd33a4e77
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Co-Authored-by: Douglas Raillard <douglas.raillard@arm.com>
7 years agoARM platforms: Add support for EL3 TZC memory region
Soby Mathew [Thu, 5 Oct 2017 11:27:33 +0000 (12:27 +0100)]
ARM platforms: Add support for EL3 TZC memory region

Some recent enhancements to EL3 runtime firmware like support for
save and restoring GICv3 register context during system_suspend
necessitates additional data memory for the firmware. This patch
introduces support for creating a TZC secured DDR carveout for use
by ARM reference platforms. A new linker section `el3_tzc_dram` is
created using platform supplied linker script and data marked with
the attribute `arm_el3_tzc_dram` will be placed in this section.
The FVP makefile now defines the `PLAT_EXTRA_LD_SCRIPT` variable to
allow inclusion of the platform linker script by the top level BL31
linker script.

Change-Id: I0e7f4a75a6ac51419c667875ff2677043df1585d
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
7 years agoMerge pull request #1120 from michpappas/tf-issues#521_cert_tool_does_not_build_with_...
davidcunado-arm [Wed, 11 Oct 2017 15:39:10 +0000 (16:39 +0100)]
Merge pull request #1120 from michpappas/tf-issues#521_cert_tool_does_not_build_with_openssl_v1.1

cert_tool: update for compatibility with OpenSSL v1.1

7 years agoMerge pull request #1100 from ajs-sun/master
davidcunado-arm [Wed, 11 Oct 2017 12:56:38 +0000 (13:56 +0100)]
Merge pull request #1100 from ajs-sun/master

trusty: save/restore FPU registers in world switch

7 years agoMerge pull request #1117 from antonio-nino-diaz-arm/an/xlat-improvements
davidcunado-arm [Mon, 9 Oct 2017 22:09:29 +0000 (23:09 +0100)]
Merge pull request #1117 from antonio-nino-diaz-arm/an/xlat-improvements

Improvements to the translation tables library v2

7 years agoMerge pull request #1121 from geesun/qx/cert_ecdsa_fix
davidcunado-arm [Mon, 9 Oct 2017 10:29:33 +0000 (11:29 +0100)]
Merge pull request #1121 from geesun/qx/cert_ecdsa_fix

cert_tool: Fix ECDSA certificates create failure

7 years agocert_tool: Fix ECDSA certificates create failure
Qixiang Xu [Fri, 22 Sep 2017 08:21:41 +0000 (16:21 +0800)]
cert_tool: Fix ECDSA certificates create failure

Commit a8eb286adaa73e86305317b9cae15d41c57de8e7 introduced the
following error when creating ECDSA certificates.
    ERROR:   Error creating key 'Trusted World key'
    Makefile:634: recipe for target 'certificates' failed
    make: *** [certificates] Error 1

this patch adds the function to create PKCS#1 v1.5.

Change-Id: Ief96d55969d5e9877aeb528c6bb503b560563537
Signed-off-by: Qixiang Xu <qixiang.xu@arm.com>
7 years agocert_tool: update for compatibility with OpenSSL v1.1
Michalis Pappas [Fri, 6 Oct 2017 08:11:44 +0000 (16:11 +0800)]
cert_tool: update for compatibility with OpenSSL v1.1

This patch fixes incompatibility issues that prevent building the cert_tool
with OpenSSL >= v1.1.0. The changes introduced are still backwards
compatible with OpenSSL v1.0.2.

Fixes arm-software/trusted-fw#521

Signed-off-by: Michalis Pappas <mpappas@fastmail.fm>
7 years agoMerge pull request #1119 from soby-mathew/sm/fix_its_assertion
davidcunado-arm [Fri, 6 Oct 2017 19:33:58 +0000 (20:33 +0100)]
Merge pull request #1119 from soby-mathew/sm/fix_its_assertion

Fix assertion in GIC ITS helper

7 years agoFix assertion in GIC ITS helper
Soby Mathew [Fri, 6 Oct 2017 16:59:03 +0000 (17:59 +0100)]
Fix assertion in GIC ITS helper

This patch fixes an assertion check in the GICv3 ITS helper function.

Change-Id: I75f50d7bf6d87c12c6e24a07c9a9889e5facf4a5
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
7 years agoMerge pull request #1118 from davidcunado-arm/dc/fix_coverity
davidcunado-arm [Fri, 6 Oct 2017 15:28:45 +0000 (16:28 +0100)]
Merge pull request #1118 from davidcunado-arm/dc/fix_coverity

Increase PLAT_ARM_MMAP_ENTRIES and MAX_XLAT_TABLES

7 years agoIncrease PLAT_ARM_MMAP_ENTRIES and MAX_XLAT_TABLES
David Cunado [Thu, 5 Oct 2017 20:24:14 +0000 (21:24 +0100)]
Increase PLAT_ARM_MMAP_ENTRIES and MAX_XLAT_TABLES

The MEM_PROTECT support adds a MMAP region for DRAM2, which when
building with TBBR support and OP-TEE tsp requires an additional
entry in the MMAP region array in BL2 - PLAT_ARM_MMAP_ENTRIES is
increased.

The MEM_PROTECT support also adds a new region in BL31, and when
BL31 is placed in DRAM, the memory mappings require an additional
translation table - MAX_XLAT_TABLES is increased.

Change-Id: I0b76260da817dcfd0b8f73a7193c36efda977625
Signed-off-by: David Cunado <david.cunado@arm.com>
7 years agoMerge pull request #1116 from soby-mathew/sm/gicv3_save_restore
davidcunado-arm [Fri, 6 Oct 2017 09:38:42 +0000 (10:38 +0100)]
Merge pull request #1116 from soby-mathew/sm/gicv3_save_restore

GICv3 context save and restore

7 years agoGICv3: Document GICv3 save/restore helpers
Douglas Raillard [Wed, 2 Aug 2017 15:57:32 +0000 (16:57 +0100)]
GICv3: Document GICv3 save/restore helpers

Give hints on how to use the GICv3 save/restore helpers in the
implementation of the PSCI handlers.

Change-Id: I86de1c27417b64c7ce290974964ef97ff678f676
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
7 years agoGICv3: ITS architectural save and restore helpers
Soby Mathew [Tue, 18 Jul 2017 15:12:45 +0000 (16:12 +0100)]
GICv3: ITS architectural save and restore helpers

This patch adds functions to save and restore GICv3 ITS registers during
system suspend. Please note that the power management of GIC ITS is
implementation defined. These functions only implements the
architectural part of the ITS power management and they do not restore
memory structures or register content required to support ITS. Even if
the ITS implementation stores structures in memory, an implementation
defined power down sequence is likely to be required to flush some
internal ITS caches to memory. If such implementation defined sequence
is not followed, the platform must ensure that the ITS is not power
gated during system suspend.

Change-Id: I5f31e5541975aa7dcaab69b0b7f67583c0e27678
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
7 years agoGICv3: add functions for save and restore
Soby Mathew [Thu, 13 Jul 2017 14:19:51 +0000 (15:19 +0100)]
GICv3: add functions for save and restore

During system suspend, the GICv3 Distributor and Redistributor context
can be lost due to power gating of the system power domain. This means
that the GICv3 context needs to be saved prior to system suspend and
restored on wakeup. Currently the consensus is that the Firmware should
be in charge of this. See tf-issues#464 for more details.

This patch introduces helper APIs in the GICv3 driver to save and
restore the Distributor and Redistributor contexts. The GICv3 ITS
context is not considered in this patch because the specification says
that the details of ITS power management is implementation-defined.
These APIs are expected to be appropriately invoked by the platform
layer during system suspend.

Fixes ARM-software/tf-issues#464

Change-Id: Iebb9c6770ab8c4d522546f161fa402d2fe02ec00
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
7 years agoGICv3: turn some macros into inline functions
Douglas Raillard [Wed, 26 Jul 2017 12:51:00 +0000 (13:51 +0100)]
GICv3: turn some macros into inline functions

Tidy up the code a bit by turning some macros into inline functions
which allows to remove the do/while(0) idiom and backslashes at the end
of the line.

Change-Id: Ie41a4ea4a4da507f7b925247b53e85019101d717
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
7 years agoGICv3: Fix gic600.c indentation
Douglas Raillard [Thu, 3 Aug 2017 14:59:49 +0000 (15:59 +0100)]
GICv3: Fix gic600.c indentation

Reindent the file using tabs as the mix of spaces and tabs confuses some
editors and leads them to use spaces instead of tabs for new code
although the coding style mandates tabs.

Change-Id: I87fa4a5d368a048340054b9b3622325f3f7befba
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
7 years agoxlat: Add support for EL0 and EL1 mappings
Antonio Nino Diaz [Wed, 4 Oct 2017 15:52:15 +0000 (16:52 +0100)]
xlat: Add support for EL0 and EL1 mappings

This patch introduces the ability of the xlat tables library to manage
EL0 and EL1 mappings from a higher exception level.

Attributes MT_USER and MT_PRIVILEGED have been added to allow the user
specify the target EL in the translation regime EL1&0.

REGISTER_XLAT_CONTEXT2 macro is introduced to allow creating a
xlat_ctx_t that targets a given translation regime (EL1&0 or EL3).

A new member is added to xlat_ctx_t to represent the translation regime
the xlat_ctx_t manages. The execute_never mask member is removed as it
is computed from existing information.

Change-Id: I95e14abc3371d7a6d6a358cc54c688aa9975c110
Co-authored-by: Douglas Raillard <douglas.raillard@arm.com>
Co-authored-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Co-authored-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
7 years agoxlat: Introduce function xlat_arch_tlbi_va_regime()
Douglas Raillard [Mon, 25 Sep 2017 14:23:22 +0000 (15:23 +0100)]
xlat: Introduce function xlat_arch_tlbi_va_regime()

Introduce a variant of the TLB invalidation helper function that
allows the targeted translation regime to be specified, rather than
defaulting to the current one.

This new function is useful in the context of EL3 software managing
translation tables for the S-EL1&0 translation regime, as then it
might need to invalidate S-EL1&0 TLB entries rather than EL3 ones.

Define a new enumeration to be able to represent translation regimes in
the xlat tables library.

Change-Id: Ibe4438dbea2d7a6e7470bfb68ff805d8bf6b07e5
Co-authored-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Co-authored-by: Douglas Raillard <douglas.raillard@arm.com>
Co-authored-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
7 years agoxlat: Always compile TLB invalidation functions
Sandrine Bailleux [Tue, 25 Apr 2017 13:09:47 +0000 (14:09 +0100)]
xlat: Always compile TLB invalidation functions

TLB invalidation functions used to be conditionally compiled in.
They were enabled only when using the dynamic mapping feature.
because only then would we need to modify page tables on the fly.

Actually there are other use cases where invalidating TLBs is required.
When changing memory attributes in existing translation descriptors for
example. These other use cases do not necessarily depend on the dynamic
mapping feature.

This patch removes this dependency and always compile TLB invalidation
functions in. If they're not used, they will be removed from the binary
at link-time anyway so there's no consequence on the memory footprint
if these functions are not called.

Change-Id: I1c33764ae900eb00073ee23b7d0d53d4efa4dd21
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
7 years agoxlat: Introduce MAP_REGION2() macro
Sandrine Bailleux [Thu, 28 Sep 2017 20:58:12 +0000 (21:58 +0100)]
xlat: Introduce MAP_REGION2() macro

The current implementation of the memory mapping API favours mapping
memory regions using the biggest possible block size in order to
reduce the number of translation tables needed.

In some cases, this behaviour might not be desirable. When translation
tables are edited at run-time, coarse-grain mappings like that might
need splitting into finer-grain tables. This operation has a
performance cost.

The MAP_REGION2() macro allows to specify the granularity of
translation tables used for the initial mapping of a memory region.
This might increase performance for memory regions that are likely to
be edited in the future, at the expense of a potentially increased
memory footprint.

The Translation Tables Library Design Guide has been updated to
explain the use case for this macro. Also added a few intermediate
titles to make the guide easier to digest.

Change-Id: I04de9302e0ee3d326b8877043a9f638766b81b7b
Co-authored-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Co-authored-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
7 years agoMerge pull request #1109 from robertovargas-arm/mem_protect
davidcunado-arm [Wed, 4 Oct 2017 15:23:59 +0000 (16:23 +0100)]
Merge pull request #1109 from robertovargas-arm/mem_protect

Mem protect

7 years agoMerge pull request #1115 from jeenu-arm/tsp-mt
davidcunado-arm [Wed, 4 Oct 2017 13:09:20 +0000 (14:09 +0100)]
Merge pull request #1115 from jeenu-arm/tsp-mt

TSP: Support multi-threading CPUs on FVP

7 years agoTSP: Support multi-threading CPUs on FVP
Jeenu Viswambharan [Tue, 3 Oct 2017 11:19:47 +0000 (12:19 +0100)]
TSP: Support multi-threading CPUs on FVP

Commit 11ad8f208db42f7729b0ce2bd16c631c293e665c added supporting
multi-threaded CPUs on FVP platform, including modifications for
calculating CPU IDs. This patch imports the strong definition of the
same CPU ID calculation on FVP platform for TSP.

Without this patch, TSP on FVP was using the default CPU ID calculation,
which would end up being wrong on CPUs with multi-threading.

Change-Id: If67fd492dfce1f57224c9e693988c4b0f89a9a9a
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
7 years agoMerge pull request #1107 from geesun/qx/add_ecdsa_support
davidcunado-arm [Mon, 2 Oct 2017 14:03:16 +0000 (15:03 +0100)]
Merge pull request #1107 from geesun/qx/add_ecdsa_support

Add support for TBBR using ECDSA keys in ARM platforms

7 years agoMerge pull request #1114 from vchong/updt_docs
davidcunado-arm [Mon, 2 Oct 2017 14:03:00 +0000 (15:03 +0100)]
Merge pull request #1114 from vchong/updt_docs

hikey*: Update docs