project/bcm63xx/atf.git
5 years agostm32mp: split stm32mp_io_setup function
Yann Gautier [Tue, 23 Apr 2019 11:34:03 +0000 (13:34 +0200)]
stm32mp: split stm32mp_io_setup function

A new static function boot_mmc is created to simplify code maintenance
of stm32mp_io_setup.

Change-Id: I5c416e567e7e174fb1c2b435925a983c9c55fc40
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agoDSU: Implement workaround for errata 798953
Louis Mayencourt [Tue, 9 Apr 2019 15:29:01 +0000 (16:29 +0100)]
DSU: Implement workaround for errata 798953

Under certain near idle conditions, DSU may miss response transfers on
the ACE master or Peripheral port, leading to deadlock. This workaround
disables high-level clock gating of the DSU to prevent this.

Change-Id: I820911d61570bacb38dd325b3519bc8d12caa14b
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
5 years agoDSU: Small fix and reformat on errata framework
Louis Mayencourt [Tue, 9 Apr 2019 13:11:06 +0000 (14:11 +0100)]
DSU: Small fix and reformat on errata framework

Change-Id: I50708f6ccc33059fbfe6d36fd66351f0b894311f
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
5 years agoCortex-A35: Implement workaround for errata 855472
Louis Mayencourt [Fri, 5 Apr 2019 15:25:25 +0000 (16:25 +0100)]
Cortex-A35: Implement workaround for errata 855472

Under specific conditions, the processor might issue an eviction and an
L2 cache clean operation to the interconnect in the wrong order. Set
the CPUACTLR.ENDCCASCI bit to 1 to avoid this.

Change-Id: Ide7393adeae04581fa70eb9173b742049fc3e050
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
5 years agoTemporarily disable shared Mbed TLS heap for SGM
John Tsichritzis [Tue, 16 Apr 2019 11:05:29 +0000 (12:05 +0100)]
Temporarily disable shared Mbed TLS heap for SGM

There is a bug in the shared heap implementation for SGM. Until the bug
is solved, the default implementation is used.

Change-Id: I010911a3f00ed860f742b14daad1d99b9e7ce711
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
5 years agoMerge "Cortex A9:errata 794073 workaround" into integration
Antonio Niño Díaz [Fri, 12 Apr 2019 10:40:35 +0000 (10:40 +0000)]
Merge "Cortex A9:errata 794073 workaround" into integration

5 years agoMerge changes from topic "av/tls-heap" into integration
Antonio Niño Díaz [Fri, 12 Apr 2019 10:40:15 +0000 (10:40 +0000)]
Merge changes from topic "av/tls-heap" into integration

* changes:
  Mbed TLS: Remove weak heap implementation
  sgm: Fix bl2 sources

5 years agoMerge changes from topic "pb/tbbr-oid" into integration
Antonio Niño Díaz [Fri, 12 Apr 2019 10:40:11 +0000 (10:40 +0000)]
Merge changes from topic "pb/tbbr-oid" into integration

* changes:
  doc: Clarify cert_create build when USE_TBBR_DEFS=0
  plat/sgm: Remove redundant platform_oid.h

5 years agoCortex A9:errata 794073 workaround
Joel Hutton [Wed, 10 Apr 2019 11:52:52 +0000 (12:52 +0100)]
Cortex A9:errata 794073 workaround

On Cortex A9 an errata can cause the processor to violate the rules for
speculative fetches when the MMU is off but branch prediction has not
been disabled. The workaround for this is to execute an Invalidate
Entire Branch Prediction Array (BPIALL) followed by a DSB.

see:http://arminfo.emea.arm.com/help/topic/com.arm.doc.uan0009d/UAN0009_cortex_a9_errata_r4.pdf
for more details.

Change-Id: I9146c1fa7563a79f4e15b6251617b9620a587c93
Signed-off-by: Joel Hutton <Joel.Hutton@arm.com>
5 years agoMerge changes from topic "renesas-bsp203" into integration
Antonio Niño Díaz [Fri, 12 Apr 2019 09:38:03 +0000 (09:38 +0000)]
Merge changes from topic "renesas-bsp203" into integration

* changes:
  rcar_gen3: plat: Update IPL and Secure Monitor Rev2.0.3
  rcar_gen3: drivers: Change to restore timer counter value at resume
  rcar_gen3: drivers: pwrc: Add DBSC4 setting before self-refresh mode
  rcar_gen3: plat: Update IPL and Secure Monitor Rev2.0.2
  rcar_gen3: drivers: ddr: Update DDR setting rev.0.35
  rcar_gen3: drivers: qos: change subslot cycle
  rcar_gen3: drivers: board: Add new board revision for H3ULCB
  rcar_gen3: plat: Change periodic write DQ training option.

5 years agoMerge "Improvements in Readme" into integration
Antonio Niño Díaz [Fri, 12 Apr 2019 09:32:22 +0000 (09:32 +0000)]
Merge "Improvements in Readme" into integration

5 years agoMerge "hikey960: Fix race condition between hotplug and idles" into integration
Antonio Niño Díaz [Fri, 12 Apr 2019 09:32:08 +0000 (09:32 +0000)]
Merge "hikey960: Fix race condition between hotplug and idles" into integration

5 years agoMbed TLS: Remove weak heap implementation
Ambroise Vincent [Wed, 10 Apr 2019 11:50:27 +0000 (12:50 +0100)]
Mbed TLS: Remove weak heap implementation

The implementation of the heap function plat_get_mbedtls_heap() becomes
mandatory for platforms supporting TRUSTED_BOARD_BOOT.

The shared Mbed TLS heap default weak function implementation is
converted to a helper function get_mbedtls_heap_helper() which can be
used by the platforms for their own function implementation.

Change-Id: Ic8f2994e25e3d9fcd371a21ac459fdcafe07433e
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
5 years agoImprovements in Readme
John Tsichritzis [Thu, 11 Apr 2019 16:23:32 +0000 (17:23 +0100)]
Improvements in Readme

- Fix broken link to the issue tracker.
- Add contents section to make navigation easier throughout the page.
- Move the link to documentation contents near the top. Where it was
  before could be missed and documentation might seem inaccessible.

Change-Id: I502e4fc0fd312459cda351d30a8781c221625724
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
5 years agosgm: Fix bl2 sources
Ambroise Vincent [Thu, 11 Apr 2019 12:45:18 +0000 (13:45 +0100)]
sgm: Fix bl2 sources

The weak version of plat_get_mbedtls_heap() was being used.

Change-Id: I6da331a098dd1af5bb64729d5b914cfb74b8869e
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
5 years agodoc: Clarify cert_create build when USE_TBBR_DEFS=0
Paul Beesley [Thu, 11 Apr 2019 12:35:26 +0000 (13:35 +0100)]
doc: Clarify cert_create build when USE_TBBR_DEFS=0

The user guide documentation for the cert_create tool needs to
mention that a platform must have a platform_oid.h header file
in order to successfully build the cert_create tool when
USE_TBBR_DEFS is 0.

Change-Id: I77f86a022d207e88a79c97741be3eafbfa0c86f1
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
5 years agoplat/sgm: Remove redundant platform_oid.h
Paul Beesley [Thu, 11 Apr 2019 12:27:39 +0000 (13:27 +0100)]
plat/sgm: Remove redundant platform_oid.h

This file is used when building the cert_create tool without using
the 'standard' set of Arm OID values as defined in the TBBR
specification (see tbbr_oid.h). This configuration is enabled by
setting USE_TBBR_DEFS to 0 during build.

At the moment this will fail because the header file included by
this file was removed in commit bb41eb7a9dc3 ("cert: move
platform_oid.h to include/tools_share for all platforms"). For
the SGM platform this means that there is no current use for
this file.

Change-Id: I3c82983ada62330f1ab6be6d6c0cf489adabae7b
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
5 years agorcar_gen3: plat: Update IPL and Secure Monitor Rev2.0.3
Toshiyuki Ogasahara [Fri, 22 Mar 2019 07:15:10 +0000 (16:15 +0900)]
rcar_gen3: plat: Update IPL and Secure Monitor Rev2.0.3

Update the revision number in the revision management file.

Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: If8918efad0fcbe6f91b66c0c7438406b1d4fb759

5 years agorcar_gen3: drivers: Change to restore timer counter value at resume
Toshiyuki Ogasahara [Fri, 22 Mar 2019 07:14:00 +0000 (16:14 +0900)]
rcar_gen3: drivers: Change to restore timer counter value at resume

Changed to save and restore cntpct_el0 using memory mapped
register for generic timer when System Suspend and Resume.

Reported by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: I40fd9f5434c4d52b320cd1d20322b9b8e4e67155

5 years agorcar_gen3: drivers: pwrc: Add DBSC4 setting before self-refresh mode
Yoshifumi Hosoya [Fri, 15 Mar 2019 14:19:28 +0000 (23:19 +0900)]
rcar_gen3: drivers: pwrc: Add DBSC4 setting before self-refresh mode

Very rarely, LPDDR4 power consumption may not decrease
In self-refresh mode.

This patch fixes the DBSC4 self-refresh mode sequence.

Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Signed-off-by: Kenji Miyazawa <kenji.miyazawa.xt@renesas.com>
Signed-off-by: Chiaki Fujii <chiaki.fujii.wj@renesas.com>
Change-Id: I838fa0892b1caf1ecd3f04538b3427e7d971ef59

5 years agorcar_gen3: plat: Update IPL and Secure Monitor Rev2.0.2
Toshiyuki Ogasahara [Mon, 11 Mar 2019 06:18:32 +0000 (15:18 +0900)]
rcar_gen3: plat: Update IPL and Secure Monitor Rev2.0.2

Update the revision number in the revision management file.

Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: I239f4d9f58d38515a49fa1a22cece48b59710d15

5 years agorcar_gen3: drivers: ddr: Update DDR setting rev.0.35
Chiaki Fujii [Fri, 1 Mar 2019 11:28:55 +0000 (20:28 +0900)]
rcar_gen3: drivers: ddr: Update DDR setting rev.0.35

[IPL/DDR]
- Update DDR setting rev.0.35.

Signed-off-by: Chiaki Fujii <chiaki.fujii.wj@renesas.com>
Change-Id: I2b936ca8621ca320cc97353f99240da5f24781f7

5 years agorcar_gen3: drivers: qos: change subslot cycle
Yoshifumi Hosoya [Mon, 11 Mar 2019 06:15:25 +0000 (15:15 +0900)]
rcar_gen3: drivers: qos: change subslot cycle

Subslot cycle from 132 to 126 as default setting.
Subslot cycle from 264 to 252.

 [IPL/QoS]
 - Update H3 Ver.2.0 QoS setting rev.0.21.
 - Update H3 Ver.3.0 QoS setting rev.0.11.
 - Update M3 Ver.1.1 QoS setting rev.0.19.
 - Update M3 Ver.3.0 QoS setting rev.0.02.
 - Update M3N Ver.1.1 QoS setting rev.0.09.

Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: I52b1bf880163ce03065dc8933d7f193e45cfd9a5

5 years agorcar_gen3: drivers: board: Add new board revision for H3ULCB
Yusuke Goda [Mon, 11 Mar 2019 06:09:39 +0000 (15:09 +0900)]
rcar_gen3: drivers: board: Add new board revision for H3ULCB

Board Revision[2:0]
 3'b000 Rev1.0 OB
 3'b001 Rev1.0 CE
 3'b010 Rev2.0 [New]

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Change-Id: I0f109cddc95eca78aea34c7149e70f14e2f1620b

5 years agorcar_gen3: plat: Change periodic write DQ training option.
Toshiyuki Ogasahara [Mon, 11 Mar 2019 06:03:00 +0000 (15:03 +0900)]
rcar_gen3: plat: Change periodic write DQ training option.

Periodic write DQ training available as default.

Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: I649cfe538e4e2c7e19145ce7d1938ce4361b2529

5 years agohikey960: Fix race condition between hotplug and idles
Wei Yu [Sun, 7 Apr 2019 03:29:28 +0000 (11:29 +0800)]
hikey960: Fix race condition between hotplug and idles

From the hotplug testing on Hikey960, in some case cores fail to become
online in the system. When some cores are hotplugged off, if other
cores in the same cluster enter into CPU idle states at the meantime,
the cluster will be powered off. This introduces the state machine
malfunction in the power controller, thus when hotplug on the core
afterwards, it fails to boot up the core because the power controller
thinks the cluster is powered on.

This patch is to avoid race condition between hotplug and idles by
preventing cluster power off when some of cores in the cluster are
hotplugged off, if all cores in the same cluster are hotplugged off,
the cluster can be powered off.

Change-Id: Ib2feeb093357c70409a3536cb4f9da9b504fdcbe
Signed-off-by: Wei Yu <yuwei3@hisilicon.com>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
5 years agocache_helpers.s:fix mixed tabs and spaces
Joel Hutton [Tue, 9 Apr 2019 13:52:59 +0000 (14:52 +0100)]
cache_helpers.s:fix mixed tabs and spaces

Change-Id: I8b7c7888d09200410e1a1c11a070c94dd8013ea7
Signed-off-by: Joel Hutton <Joel.Hutton@Arm.com>
5 years agoAdd note about erratum 814220 for A7
Joel Hutton [Tue, 9 Apr 2019 13:45:34 +0000 (14:45 +0100)]
Add note about erratum 814220 for A7

On Cortex-A7 an L2 set/way cache maintenance operation can overtake
an L1 set/way cache maintenance operation. The mitigation for this is
to use a `DSB` instruction before changing cache. The cache cleaning
code happens to already be doing this, so only a comment was added.

Change-Id: Ia1ffb8ca8b6bbbba422ed6f6818671ef9fe02d90
Signed-off-by: Joel Hutton <Joel.Hutton@Arm.com>
5 years agoMerge "aarch32: Allow compiling with soft-float toolchain" into integration
Antonio Niño Díaz [Tue, 9 Apr 2019 12:31:09 +0000 (12:31 +0000)]
Merge "aarch32: Allow compiling with soft-float toolchain" into integration

5 years agoMerge "services/spm: Fix service UUID lookup" into integration
Antonio Niño Díaz [Tue, 9 Apr 2019 10:50:59 +0000 (10:50 +0000)]
Merge "services/spm: Fix service UUID lookup" into integration

5 years agoMerge "cpus: Fix Cortex-A12 MIDR mask" into integration
Antonio Niño Díaz [Tue, 9 Apr 2019 10:50:52 +0000 (10:50 +0000)]
Merge "cpus: Fix Cortex-A12 MIDR mask" into integration

5 years agoservices/spm: Fix service UUID lookup
Paul Beesley [Mon, 8 Apr 2019 14:24:43 +0000 (15:24 +0100)]
services/spm: Fix service UUID lookup

The spm_sp_get_by_uuid() function is used to look up the secure
partition that provides a given service.

Within this function, memcmp() is used to compare the service
UUIDs but it uses the size of the rdsvc->uuid pointer instead of
the size of its content (missing dereference). This means that only
a partial comparison is performed as UUIDs are 128 bits in length and
rdsvc->uuid is a uint32_t typed pointer.

Instead, use the size of the array pointed to by the svc_uuid parameter,
which will be the full 128 bits, for the comparison.

Change-Id: I258fb0cca3bf19f97b8f2a4c133981647cd050e4
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
5 years agoMerge "Add support for Cortex-A76AE CPU" into integration
Antonio Niño Díaz [Tue, 9 Apr 2019 09:21:51 +0000 (09:21 +0000)]
Merge "Add support for Cortex-A76AE CPU" into integration

5 years agoCheckpatch: Style fix
Joel Hutton [Tue, 9 Apr 2019 08:25:55 +0000 (09:25 +0100)]
Checkpatch: Style fix

Change-Id: I0cb9f0db1ef3491f55c038a10db5a88d37e89697
Signed-off-by: Joel Hutton <Joel.Hutton@Arm.com>
5 years agoMerge changes from topic "jh/cotdesc" into integration
Antonio Niño Díaz [Mon, 8 Apr 2019 14:15:33 +0000 (14:15 +0000)]
Merge changes from topic "jh/cotdesc" into integration

* changes:
  Document changes to auth-framework
  cot-desc: optimise memory further
  Reduce memory needed for CoT description

5 years agoAdd support for Cortex-A76AE CPU
Alexei Fedorov [Thu, 4 Apr 2019 15:26:34 +0000 (16:26 +0100)]
Add support for Cortex-A76AE CPU

Change-Id: I0a81f4ea94d41245cd5150de341b51fc70babffe
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoDocument changes to auth-framework
Joel Hutton [Fri, 22 Feb 2019 16:40:16 +0000 (16:40 +0000)]
Document changes to auth-framework

The data structures in the auth-framework were changed by the previous
patch, and need to be updated.

Change-Id: Icfad2ac688d03d32aa93e45f930a375abbc164a9
Signed-off-by: Joel Hutton <Joel.Hutton@Arm.com>
5 years agocot-desc: optimise memory further
Joel Hutton [Mon, 11 Mar 2019 11:37:38 +0000 (11:37 +0000)]
cot-desc: optimise memory further

This changes the auth_img_desc_t struct to have pointers to struct
arrays instead of struct arrays. This saves memory as many of these
were never used, and can be NULL pointers. Note the memory savings are
only when these arrays are not initialised, as it is assumed these
arrays are fixed length. A possible future optimisation could allow for
variable length.

memory diff:
bl1:        bl2:
    text        text
      -12         -12
    bss         bss
      -1463       0
    data        data
      -56         -48
    rodata      rodata
      -5688       -2592
    total       total
      -7419       -2652

Change-Id: I8f9bdedf75048b8867f40c56381e3a6dc6402bcc
Signed-off-by: Joel Hutton <Joel.Hutton@Arm.com>
5 years agoReduce memory needed for CoT description
Joel Hutton [Wed, 20 Feb 2019 11:56:46 +0000 (11:56 +0000)]
Reduce memory needed for CoT description

When Trusted Board Boot is enabled, we need to specify the Chain of
Trust (CoT) of the BL1 and BL2 images. A CoT consists of an array
of image descriptors. The authentication module assumes that each
image descriptor in this array is indexed by its unique image
identifier. For example, the Trusted Boot Firmware Certificate has to
be at index [TRUSTED_BOOT_FW_CERT_ID].

Unique image identifiers may not necessarily be consecutive. Also,
a given BL image might not use all image descriptors. For example, BL1
does not need any of the descriptors related to BL31. As a result, the
CoT array might contain holes, which unnecessarily takes up space in
the BL binary.

Using pointers to auth_img_desc_t structs (rather than structs
themselves) means these unused elements only use 1 pointer worth of
space, rather than one struct worth of space. This patch also changes
the code which accesses this array to reflect the change to pointers.

Image descriptors not needed in BL1 or BL2 respectively are also
ifdef'd out in this patch. For example, verifying the BL31 image is
the responsibility of BL2 so BL1 does not need any of the data
structures describing BL31.

memory diff:
bl1:        bl2:
    text        text
      -20         -20
    bss         bss
      -1463       0
    data        data
      -256        -48
    rodata      rodata
      -5240       -1952
    total       total
      -6979       -2020

Change-Id: I163668b174dc2b9bbb183acec817f2126864aaad
Signed-off-by: Joel Hutton <Joel.Hutton@Arm.com>
5 years agoMerge "Fix restoration of PAuth context" into integration
Antonio Niño Díaz [Mon, 8 Apr 2019 13:06:32 +0000 (13:06 +0000)]
Merge "Fix restoration of PAuth context" into integration

5 years agocpus: Fix Cortex-A12 MIDR mask
Heiko Stuebner [Fri, 5 Apr 2019 12:44:33 +0000 (14:44 +0200)]
cpus: Fix Cortex-A12 MIDR mask

The Cortex-A12's primary part number is 0xC0D not 0xC0C, so
fix that to make the A12's cpu operations findable.

Change-Id: I4440a039cd57a2fe425fd8a8ec5499ca8e895e31
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
5 years agoplat: imx8m: remove deprecated code include
Jacky Bai [Mon, 8 Apr 2019 01:36:09 +0000 (09:36 +0800)]
plat: imx8m: remove deprecated code include

The 'drivers/console/aarch64/console.S' is not needed,
so remove it from build to fix the build error when
'ERROR_DEPRECATED'set.

Change-Id: Id047a355f82fd33298b7e2b49eff289d28eb5b56
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
5 years agoFix restoration of PAuth context
Alexei Fedorov [Fri, 5 Apr 2019 12:44:30 +0000 (13:44 +0100)]
Fix restoration of PAuth context

Replace call to pauth_context_save() with pauth_context_restore()
in case of unknown SMC call.

Change-Id: Ib863d979faa7831052b33e8ac73913e2f661f9a0
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoaarch32: Allow compiling with soft-float toolchain
Manish Pandey [Mon, 1 Apr 2019 14:27:18 +0000 (15:27 +0100)]
aarch32: Allow compiling with soft-float toolchain

ARMv7 and Cortex-A32(ARMv8/aarch32) uses "arm-linux-gnueabi" toolchain which
has both soft-float and hard-float variants and so there could be scenarios
where soft-float toolchain is used.Even though TF-A documentation recommends
to use hard-float toolchain for aarch32 but there are external projects where
we cannot mandate the selection of toolchain and for those projects at least
the build should not fail.

Current TF-A source fails to build with soft-float toolchain because assembler
does not recognizes "vmsr" instruction which is required to enable floating
point unit.

To avoid this piece of code being compiled with soft-float toolchain add
predefined macro guard " __SOFTFP__" exposed by soft-float toolchain.

Change-Id: I76ba40906a8d622dcd476dd36ab4d277a925996c
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
5 years agodoc: Fix heading levels for changelog
Paul Beesley [Mon, 11 Feb 2019 17:58:21 +0000 (17:58 +0000)]
doc: Fix heading levels for changelog

The change-log.rst file does not use the same symbols
as the other documents when organising its headings,
sub-headings and so on. In order to compile these
documents together with Sphinx, forming a top-level
index and a consistent structure, it is necessary to
normalise these.

Change-Id: Ib4620ff03a9e76fec9e36e95549016c7b3fe12bb
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
5 years agoMerge pull request #1920 from ambroise-arm/av/deprecated
Antonio Niño Díaz [Thu, 4 Apr 2019 08:29:22 +0000 (09:29 +0100)]
Merge pull request #1920 from ambroise-arm/av/deprecated

Remove deprecated interfaces

5 years agoMakefile: remove extra include paths in INCLUDES
Ambroise Vincent [Thu, 28 Mar 2019 09:01:18 +0000 (09:01 +0000)]
Makefile: remove extra include paths in INCLUDES

Now it is needed to use the full path of the common header files.

Commit 09d40e0e0828 ("Sanitise includes across codebase") provides more
information.

Change-Id: Ifedc79d9f664d208ba565f5736612a3edd94c647
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
5 years agoRemove deprecated interfaces
Ambroise Vincent [Wed, 27 Mar 2019 16:06:02 +0000 (16:06 +0000)]
Remove deprecated interfaces

Change-Id: I14fcabbdfd53153d1d5f187f6f8b23a045794408
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
5 years agotzc: remove deprecated types
Ambroise Vincent [Wed, 27 Mar 2019 16:03:24 +0000 (16:03 +0000)]
tzc: remove deprecated types

Types tzc_action_t and tzc_region_attributes_t are deprecated.

Change-Id: Ieefeb8521a0e1130f39d09b5c0d2728f05084773
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
5 years agoConsole: remove deprecated finish_console_register
Ambroise Vincent [Wed, 27 Mar 2019 15:45:35 +0000 (15:45 +0000)]
Console: remove deprecated finish_console_register

The old version of the macro is deprecated.

Commit cc5859ca19ff ("Multi-console: Deprecate the
`finish_console_register` macro") provides more details.

Change-Id: I3d1cdf6496db7d8e6cfbb5804f508ff46ae7e67e
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
5 years agoRemove deprecated plat_crash_console_*
Ambroise Vincent [Wed, 27 Mar 2019 13:48:15 +0000 (13:48 +0000)]
Remove deprecated plat_crash_console_*

The default implementations are defined in crash_console_helpers.S. The
platforms have to define plat_crash_console_*.

Implemented placeholders for platforms that were missing helpers.

Change-Id: Iea60b6f851956916e421dfd8c34a62d96eb9148e
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
5 years agoMerge pull request #1917 from marex/arm/master/v3meagle-v2.0.1
Antonio Niño Díaz [Wed, 3 Apr 2019 13:06:21 +0000 (14:06 +0100)]
Merge pull request #1917 from marex/arm/master/v3meagle-v2.0.1

rcar_gen3: plat: Add R-Car V3M support

5 years agoMerge pull request #1916 from antonio-nino-diaz-arm/an/spm-xlat
Antonio Niño Díaz [Wed, 3 Apr 2019 10:20:47 +0000 (11:20 +0100)]
Merge pull request #1916 from antonio-nino-diaz-arm/an/spm-xlat

SPM: Some improvements to xlat handling code

5 years agoMerge pull request #1918 from lmayencourt/lm/contrib_guidelines
Antonio Niño Díaz [Wed, 3 Apr 2019 10:20:38 +0000 (11:20 +0100)]
Merge pull request #1918 from lmayencourt/lm/contrib_guidelines

doc: Update contribution guidelines

5 years agoMerge pull request #1915 from repk/gxl
Antonio Niño Díaz [Wed, 3 Apr 2019 10:20:21 +0000 (11:20 +0100)]
Merge pull request #1915 from repk/gxl

Add support for Amlogic s905x (GXL)

5 years agoSPM: Adjust size of virtual address space per partition
Antonio Nino Diaz [Wed, 27 Mar 2019 13:45:52 +0000 (13:45 +0000)]
SPM: Adjust size of virtual address space per partition

Rather than using a fixed virtual address space size, read all regions
in the resource description of each partition and restrict the virtual
address space size to the one the partition actually needs.

This also allows SPM to take advantage of the extension ARMv8.4-TTST if
the virtual address space size is small enough.

Change-Id: I8646aa95e659136b58b44b040364cdee631f7e82
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
5 years agoSPM: Refactor xlat context creation
Antonio Nino Diaz [Wed, 27 Mar 2019 13:04:46 +0000 (13:04 +0000)]
SPM: Refactor xlat context creation

Right now the virtual address space is fixed to
PLAT_VIRT_ADDR_SPACE_SIZE, so all base translation tables are the same
size and need the same alignment. The current code allocates the exact
space needed by this initial table.

However, a following patch is going to allow each partition to choose
the size of its address space based on the memory regions defined in
their resource description, so it isn't possible to determine this at
build time. As this optimization no longer applies, it has to be
removed.

Change-Id: Ia8d19f4981e1017e4ffe0ba136de73d701044cb0
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
5 years agoSPM: Move shim layer to TTBR1_EL1
Antonio Nino Diaz [Wed, 27 Mar 2019 11:10:31 +0000 (11:10 +0000)]
SPM: Move shim layer to TTBR1_EL1

This gives each Secure Partition complete freedom on its address space.
Previously, the memory used by the exception vectors was reserved and
couldn't be used. Also, it always had to be mapped, forcing SPM to
generate translation tables that included the exception vectors as well
as the Partition memory regions. With this change, partitions can reduce
their address space size easily.

Change-Id: I67fb5e9bdf2870b73347f23bff702fab0a8f8711
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
5 years agodoc: Update contribution guidelines
Louis Mayencourt [Fri, 22 Mar 2019 11:47:22 +0000 (11:47 +0000)]
doc: Update contribution guidelines

Update the documentation for trustedfirmware.org migration

Change-Id: Ibb7052b0becbec3326164f1503806ca2c2fd4dcc
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
5 years agoplat: gxl: Add documentation on building GXL image
Remi Pommarel [Mon, 1 Apr 2019 09:34:09 +0000 (11:34 +0200)]
plat: gxl: Add documentation on building GXL image

Also adds a maintainer for GXL.

Signed-off-by: Remi Pommarel <repk@triplefau.lt>
5 years agomeson/gxl: Add tool to create bl31 bootable images
Remi Pommarel [Sat, 30 Mar 2019 14:58:45 +0000 (15:58 +0100)]
meson/gxl: Add tool to create bl31 bootable images

GXL platforms need to have a specific header at the beginning of bl31
image to be able to boot. This adds a tool to create that and calls it at
build time.

Signed-off-by: Remi Pommarel <repk@triplefau.lt>
5 years agomeson/gxl: Configure and boot SCP
Remi Pommarel [Thu, 28 Mar 2019 19:55:13 +0000 (20:55 +0100)]
meson/gxl: Configure and boot SCP

On Amlogic gxl (s905x) SOC, in order to use SCP, bl31 has to send bl30
and bl301 firmware along with their SHA256 hash over scpi.

Signed-off-by: Remi Pommarel <repk@triplefau.lt>
5 years agomeson/gxl: Add support for SHA256 DMA engine
Remi Pommarel [Thu, 28 Mar 2019 22:34:18 +0000 (23:34 +0100)]
meson/gxl: Add support for SHA256 DMA engine

In order to configure and boot SCP, BL31 has to compute and send
the SHA-256 of the firmware data via scpi. Luckily Amlogic GXL SOC
has a DMA facility that could be used to offload SHA-256
computations. This adds basic support of this hardware SHA-256
engine.

Signed-off-by: Remi Pommarel <repk@triplefau.lt>
5 years agomeson/gxl: Initial port of Amlogic Meson S905x (GXL)
Antonio Nino Diaz [Wed, 5 Dec 2018 00:09:30 +0000 (00:09 +0000)]
meson/gxl: Initial port of Amlogic Meson S905x (GXL)

The Amlogic Meson S905x is a SoC with a quad core Arm Cortex-A53 running
at 1.5Ghz. It also contains a Cortex-M3 used as SCP.

This port is a minimal implementation of BL31 capable of booting
mainline U-Boot and Linux:

- Partial SCPI support.
- Basic PSCI support (CPU_ON, SYSTEM_RESET, SYSTEM_OFF).
- GICv2 driver set up.
- Basic SIP services (read efuse data, enable/disable JTAG).

This port has been tested on a lepotato.

Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Signed-off-by: Remi Pommarel <repk@triplefau.lt>
5 years agoSPM: Ignore empty regions in resource description
Antonio Nino Diaz [Fri, 29 Mar 2019 13:48:50 +0000 (13:48 +0000)]
SPM: Ignore empty regions in resource description

Instead of letting the code run until another error is reached, return
early.

Change-Id: I6277a8c65101d3e39b0540099c2a3063584a7dbd
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
5 years agorcar_gen3: plat: Add R-Car V3M support
Valentine Barshak [Mon, 29 Oct 2018 23:06:17 +0000 (02:06 +0300)]
rcar_gen3: plat: Add R-Car V3M support

Add R-Car V3M support. This is based on the original
V3M support patch for Yocto v2.23.1 by Vladimir Barinov.

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
---
Marek: Update on top of mainline ATF/master

5 years agoMerge pull request #1914 from marex/arm/master/d3draak-v2.0.1
Antonio Niño Díaz [Tue, 2 Apr 2019 13:16:27 +0000 (14:16 +0100)]
Merge pull request #1914 from marex/arm/master/d3draak-v2.0.1

Arm/master/d3draak v2.0.1

5 years agorcar_gen3: drivers: qos: Add D3 QoS tables
Marek Vasut [Thu, 14 Jun 2018 04:26:45 +0000 (06:26 +0200)]
rcar_gen3: drivers: qos: Add D3 QoS tables

Add QoS tables for R-Car D3 SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
5 years agorcar_gen3: drivers: pfc: Add D3 PFC tables
Marek Vasut [Thu, 14 Jun 2018 04:26:45 +0000 (06:26 +0200)]
rcar_gen3: drivers: pfc: Add D3 PFC tables

Add PFC tables for R-Car D3 SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
5 years agorcar_gen3: drivers: ddr_a: Add D3 DDR init
Marek Vasut [Thu, 14 Jun 2018 04:26:45 +0000 (06:26 +0200)]
rcar_gen3: drivers: ddr_a: Add D3 DDR init

Add R-Car D3 DDR initialization code. The code is in staging and needs
cleanup, and possibly can even be merged with the E3 init code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
5 years agorcar_gen3: drivers: swdt: Add D3 support
Marek Vasut [Sat, 5 Jan 2019 13:18:10 +0000 (14:18 +0100)]
rcar_gen3: drivers: swdt: Add D3 support

Add WTCNT register configuration for the D3 SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
5 years agorcar_gen3: drivers: scif: Add D3 support
Marek Vasut [Sat, 5 Jan 2019 13:16:48 +0000 (14:16 +0100)]
rcar_gen3: drivers: scif: Add D3 support

Add SCIF configuration specifics for the D3 SoC, that is detection
of the D3 SoC and SCBRR configuration.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
5 years agorcar_gen3: drivers: pwrc: Add D3 support
Marek Vasut [Sat, 5 Jan 2019 13:13:23 +0000 (14:13 +0100)]
rcar_gen3: drivers: pwrc: Add D3 support

The D3 SoC has one CPU core, just return 1 as a CPU number.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
5 years agorcar_gen3: drivers: rom: Mark NEW table as D3 compatible
Marek Vasut [Sat, 5 Jan 2019 13:07:55 +0000 (14:07 +0100)]
rcar_gen3: drivers: rom: Mark NEW table as D3 compatible

Add comment into the ROM driver that the new table is also D3 compatible.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
5 years agorcar_gen3: plat: Add initial D3 support
Marek Vasut [Sat, 5 Jan 2019 12:56:03 +0000 (13:56 +0100)]
rcar_gen3: plat: Add initial D3 support

Add R-Car D3 SoC platform specifics. Driver, PFC, QoS, DDR init code
will be added separately.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
5 years agorcar_gen3: plat: Print DRAM bank size in MiB if below 1 GiB
Marek Vasut [Sat, 30 Mar 2019 03:01:41 +0000 (04:01 +0100)]
rcar_gen3: plat: Print DRAM bank size in MiB if below 1 GiB

Print the DRAM bank size in MiB instead of GiB in case the bank size
is smaller than 1 GiB. This prevents printing zeroes on systems with
small DRAM sizes.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
5 years agoMerge pull request #1886 from ambroise-arm/av/static-checks
Antonio Niño Díaz [Mon, 1 Apr 2019 10:25:21 +0000 (11:25 +0100)]
Merge pull request #1886 from ambroise-arm/av/static-checks

Fix extra compilation warnings

5 years agoMerge pull request #1913 from marex/arm/master/m3wulcb-v2.0.1
Antonio Niño Díaz [Mon, 1 Apr 2019 10:04:04 +0000 (11:04 +0100)]
Merge pull request #1913 from marex/arm/master/m3wulcb-v2.0.1

rcar_gen3: plat: Set M3W ULCB DRAM size to 2 GiB

5 years agoMerge pull request #1898 from hadi-asyrafi/watchdog
Antonio Niño Díaz [Mon, 1 Apr 2019 10:03:50 +0000 (11:03 +0100)]
Merge pull request #1898 from hadi-asyrafi/watchdog

intel: Enable watchdog timer on Intel S10 platform

5 years agoBL1: Fix type consistency
Ambroise Vincent [Wed, 27 Feb 2019 16:50:10 +0000 (16:50 +0000)]
BL1: Fix type consistency

Change function signatures and fix sign-compare warnings.

Change-Id: Iaf755d61e6c54c3dcf4f41aa3c27ea0f6e665fee
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
5 years agoSPM: Create SPCI auxiliary function
Ambroise Vincent [Wed, 27 Feb 2019 16:01:48 +0000 (16:01 +0000)]
SPM: Create SPCI auxiliary function

Fix variable shadowing warnings and prevent code duplication.

Change-Id: Idb29cc95d6b6943bc012d7bd430afa0e4a7cbf8c
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
5 years agoRemove several warnings reported with W=2
Ambroise Vincent [Thu, 14 Feb 2019 09:48:21 +0000 (09:48 +0000)]
Remove several warnings reported with W=2

Improved support for W=2 compilation flag by solving some nested-extern
and sign-compare warnings.

The libraries are compiling with warnings (which turn into errors with
the Werror flag).

Outside of libraries, some warnings cannot be fixed.

Change-Id: I06b1923857f2a6a50e93d62d0274915b268cef05
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
5 years agoRemove several warnings reported with W=1
Ambroise Vincent [Wed, 13 Feb 2019 15:58:00 +0000 (15:58 +0000)]
Remove several warnings reported with W=1

Improved support for W=1 compilation flag by solving missing-prototypes
and old-style-definition warnings.

The libraries are compiling with warnings (which turn into errors with
the Werror flag).

Outside of libraries, some warnings cannot be fixed without heavy
structural changes.

Change-Id: I1668cf99123ac4195c2a6a1d48945f7a64c67f16
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
5 years agoMerge pull request #1911 from lmayencourt/lm/update_gcc
Soby Mathew [Fri, 29 Mar 2019 10:53:57 +0000 (10:53 +0000)]
Merge pull request #1911 from lmayencourt/lm/update_gcc

doc: Suggest to use the latest version of GCC 8.2

5 years agoMerge pull request #1912 from pbeesley-arm/pb/spm-reword
Soby Mathew [Fri, 29 Mar 2019 10:53:25 +0000 (10:53 +0000)]
Merge pull request #1912 from pbeesley-arm/pb/spm-reword

doc: Clarify draft status of SPCI and SPRT specs

5 years agodoc: Clarify draft status of SPCI and SPRT specs
Paul Beesley [Fri, 29 Mar 2019 10:14:56 +0000 (10:14 +0000)]
doc: Clarify draft status of SPCI and SPRT specs

These SPM-related specifications are mentioned in the readme and
the change log. Update references to these specs to make it clear
that they are in draft form and are expected to change.

Change-Id: Ia2791c48c371a828246d96f102a402747cd69f96
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
5 years agodoc: Suggest to use the latest version of GCC 8.2
Louis Mayencourt [Fri, 8 Mar 2019 15:35:40 +0000 (15:35 +0000)]
doc: Suggest to use the latest version of GCC 8.2

The latest version of GCC are required to use the new features of TF-A.
Suggest to use the latest version available on developer.arm.com instead
of the version specified on the Linaro Release notes.
At the time of writing, GCC 8.2-2019.01 is the latest version available.

Change-Id: Idd5c00749e39ca9dc8b7c5623b5d64356c9ce6e5
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
5 years agoMerge pull request #1908 from soby-mathew/sm/update_ver
Soby Mathew [Thu, 28 Mar 2019 14:34:36 +0000 (14:34 +0000)]
Merge pull request #1908 from soby-mathew/sm/update_ver

Update TF-A version to 2.1

5 years agoMerge pull request #1910 from soby-mathew/sm/mb_ver_doc
Soby Mathew [Thu, 28 Mar 2019 14:30:40 +0000 (14:30 +0000)]
Merge pull request #1910 from soby-mathew/sm/mb_ver_doc

docs: List MB version dependancy for Juno FWU as known issue

5 years agodocs: List MB version dependency for Juno FWU as known issue
Soby Mathew [Thu, 28 Mar 2019 13:46:40 +0000 (13:46 +0000)]
docs: List MB version dependency for Juno FWU as known issue

Change-Id: Ib37215ca4c9b515e54054290952eed5034582ba4
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
5 years agoMerge pull request #1909 from ambroise-arm/av/doc-update
Soby Mathew [Thu, 28 Mar 2019 13:50:17 +0000 (13:50 +0000)]
Merge pull request #1909 from ambroise-arm/av/doc-update

Documentation: update tested platforms

5 years agoDocumentation: update tested platforms
Ambroise Vincent [Thu, 28 Mar 2019 12:51:48 +0000 (12:51 +0000)]
Documentation: update tested platforms

Update both the readme and user guide on their shared "platform"
section.

Change-Id: Ia1f30acda45ac8facdcb7d540800191cdf6cdacf
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
5 years agoMerge pull request #1906 from pbeesley-arm/pb/readme
Soby Mathew [Wed, 27 Mar 2019 12:08:16 +0000 (12:08 +0000)]
Merge pull request #1906 from pbeesley-arm/pb/readme

doc: Prepare readme for 2.1 release

5 years agoMerge pull request #1907 from pbeesley-arm/pb/changelog
Soby Mathew [Wed, 27 Mar 2019 12:03:25 +0000 (12:03 +0000)]
Merge pull request #1907 from pbeesley-arm/pb/changelog

doc: Update change log for v2.1

5 years agoMerge pull request #1905 from ambroise-arm/av/2.1-docs
Soby Mathew [Wed, 27 Mar 2019 11:07:20 +0000 (11:07 +0000)]
Merge pull request #1905 from ambroise-arm/av/2.1-docs

Update user guide for 2.1 release

5 years agodoc: Update change log for v2.1
Paul Beesley [Mon, 25 Mar 2019 12:21:57 +0000 (12:21 +0000)]
doc: Update change log for v2.1

Change-Id: Ib6a20ffdddad11b9629d7dca7f841182299bf860
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
5 years agodoc: Update readme.rst for v2.1 release
Paul Beesley [Mon, 25 Mar 2019 16:45:23 +0000 (16:45 +0000)]
doc: Update readme.rst for v2.1 release

Change-Id: Id3ae11a401a2e5290bb1980f1f349fc3cf49c7d6
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
5 years agorcar_gen3: plat: Set M3W ULCB DRAM size to 2 GiB
Marek Vasut [Sat, 9 Mar 2019 15:10:59 +0000 (16:10 +0100)]
rcar_gen3: plat: Set M3W ULCB DRAM size to 2 GiB

The M3W ULCB board has 2 GiB of DRAM, set it so.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
5 years agoUpdate TF-A version to 2.1
Soby Mathew [Tue, 26 Mar 2019 15:51:59 +0000 (15:51 +0000)]
Update TF-A version to 2.1

Change-Id: I6d8a6419df4d4924214115facbce90715a1a0371
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
5 years agodocs: Update user guide
Ambroise Vincent [Thu, 14 Mar 2019 10:53:16 +0000 (10:53 +0000)]
docs: Update user guide

Make sure the steps in the user guide are up to date and can be
performed out of the box.

Change-Id: Ib4d959aa771cf515f74e150aaee2fbad24c18c38
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>