Commit Graph

2226 Commits

Author SHA1 Message Date
Varun Wadekar 6311f63de0 Tegra: enable 'signed-comparison' compilation warning/errors
This patch enables the 'sign-compare' flag, to enable warning/errors
for comparisons between signed/unsigned variables. The warning has
been enabled for all the Tegra platforms, to start with.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2017-06-14 14:59:07 -07:00
davidcunado-arm dfe30efb1d Merge pull request #979 from soby-mathew/sm/aarch32_macro_fix
Fix stdlib defines for AArch32
2017-06-14 14:59:36 +01:00
davidcunado-arm 1502c4e157 Merge pull request #974 from masahir0y/uniphier
UniPhier Initial Support
2017-06-13 22:18:17 +01:00
davidcunado-arm 42fb35a8e6 Merge pull request #982 from hzhuang1/fix_hikey960
Fix hikey960
2017-06-13 09:21:09 +01:00
Haojian Zhuang 8aa928accf hikey960: fix the calculation in boardid
Since the type of ADC value is always unsigned int, don't
need to check the value with negative value.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2017-06-13 14:33:49 +08:00
Haojian Zhuang 101afa02b7 ufs: fix the and operator
Should use AND (&), not &&.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2017-06-13 14:33:49 +08:00
Masahiro Yamada 63b3a28ebb uniphier: add TSP support
Add TSP to test BL32 without relying on external projects.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-06-13 00:32:57 +09:00
Masahiro Yamada d8e919c7b8 uniphier: support Socionext UniPhier platform
Initial commit for Socionext UniPhier SoC support.  BL1, Bl2, and
BL31 are supported.  Refer to docs/plat/socionext-uniphier.md for
more detais.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-06-13 00:32:57 +09:00
Soby Mathew 81bccbfff2 Fix stdlib defines for AArch32
Some of the macro defines in the header files of `include/lib/stdlib/machine/`
folder are not correct for AArch32. This patch fixes the same.

Change-Id: I8bfaf638a7986fd902648d2074537bd26c313cb3
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2017-06-09 14:47:52 +01:00
davidcunado-arm c396b7368a Merge pull request #972 from achingupta/ag/freebsd-dt-change
Device tree changes to boot FreeBSD on FVPs
2017-06-09 13:49:39 +01:00
davidcunado-arm c0a70dbd4a Merge pull request #971 from Xilinx/tegra
tegra: Fix build errors
2017-06-09 13:49:25 +01:00
davidcunado-arm 2f73f48e0a Merge pull request #973 from danh-arm/dh/add-maintainers
Docs: Clarify copyright requirements
2017-06-09 12:03:52 +01:00
davidcunado-arm b91926fd50 Merge pull request #968 from antonio-nino-diaz-arm/an/snprintf-alt
mbedtls: Don't use tf_snprintf if option not defined
2017-06-09 12:03:35 +01:00
davidcunado-arm c906d2a849 Merge pull request #967 from rockchip-linux/rockchip-cleanup-20170606
RK3399: Shrink M0 SRAM code to fit in PMUSRAM
2017-06-08 17:34:44 +01:00
Soren Brinkmann d20f189db4 tegra: Fix build errors
The 'impl' variable is guarded by the symbol DEBUG, but used in an INFO
level print statement. INFO is defined based on LOG_LEVEL. Hence, builds
would fail when
 - DEBUG=0 && LOG_LEVEL>=LOG_LEVEL_INFO with a variable used but not defined
 - DEBUG=1 && LOG_LEVEL<LOG_LEVEL_INFO with a variable defined but not used

Fixing this by guarding impl with the same condition that guards INFO.

Fixes ARM-software/tf-issues#490
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
2017-06-08 07:02:20 -07:00
Dan Handley 1cda23b5d4 Docs: Clarify copyright requirements
Clarify copyright requirements in contributing.md.

Also clarify maintainership structure by adding a new maintainers.md. This
imports individual maintainer details from the GitHub wiki.

Fixes ARM-software/tf-issues#488

Change-Id: I7135d3f77ea45533f667de7e1dcdf65697486a91
Signed-off-by: Dan Handley <dan.handley@arm.com>
2017-06-08 14:10:12 +01:00
danh-arm 0437c421cd Merge pull request #970 from vingu-linaro/enable-pmf-rt-instr-hikey
Enable pmf rt instr hikey
2017-06-08 11:46:34 +01:00
danh-arm 5747ecab6c Merge pull request #959 from hzhuang1/hikey960_v1
Hikey960 v1
2017-06-08 09:50:03 +01:00
Lin Huang 84597b57f9 rockchip: check wakeup cpu when resume
unlike rk3399 and rk3368, there are some rockchip 64bit SOC
do not have CPUPD, and pmu_cpuson_entrypoint() is common
function for rockchip platform, so we need to check wakeup
cpu when resume.

Change-Id: I6313e8a9d7c16b03e033414f0cb281646c2159ff
Signed-off-by: Lin Huang <hl@rock-chips.com>
2017-06-08 10:01:19 +08:00
Lin Huang 4e836d3578 rockchip/rk3399: enable PMU_PERILP_PD_EN bit when suspend
with PMU_PERILP_PD_EN bit enable, the soc will shutdown
cm0, crypto, dcf, imem(normal SRAM), dmac, bootrom, efuse_con,
spi, i2c, uart, saradc, tsadc when suspend, we have M0 code
need to run when suspend in normal SRAM, so we need to take
care of that.

Change-Id: I8c066637e5b81d4b1d53197450b9d592cbe00793
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2017-06-08 09:59:53 +08:00
Derek Basehore af27fb89a9 rockchip/rk3399: Move DRAM restore to PMUSRAM
This moves the DRAM restore code to PMUSRAM. This is so that the
voltage domain that contains the SRAM that it was stored in before may
be turned off during system suspend.

Change-Id: Id761181a30caadd12f1ce061d1034f3159a76d28
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
2017-06-08 09:59:53 +08:00
Derek Basehore c82eef6ce5 rockchip/rk3399: convert to for-loops to save code space
This converts two functions to use for-loops. This saves a bit of
space to help moving DRAM resume code to PMUSRAM.

Change-Id: Ie6ca490cf50c2ec83335cf1845b337c3e8a47496
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
2017-06-08 09:59:53 +08:00
Derek Basehore 87aad73494 rockchip/rk3399: Remove unneeded if statement
The removed if statement would make the same check that the for loop
it is in does to break out of the for loop, so it doesn't make any
sense to keep it there.

Change-Id: I819c29f9182e6de1fc47e418aed15ad38e8f9fa9
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
2017-06-08 09:59:53 +08:00
Derek Basehore 18f705fae3 rockchip/rk3399: Remove unneeded register sets
This removes the mmio_... function calls to set the multicast bit for
the PHY registers when overriding the write leveling values. These are
not needed since multicast is set by default when calling the
function, and it's also better not to leave the side effect of
disabling multicast when exiting the function.

Change-Id: I83e089a2a2d55268b3832f36724c3b2c4be81082
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
2017-06-08 09:59:53 +08:00
Derek Basehore 7d1b3f5a9a rockchip/rk3399: remove unneeded DDR restore function
This removes the phy_dll_bypass_set function as it is unneeded. The
values that function sets are saved during suspend, so the proper
values will be restored on resume.

Change-Id: I17542206c56e639ce8cb6375233145167441d4e2
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
2017-06-08 09:59:53 +08:00
Derek Basehore 60400fc868 rockchip/rk3399: Save space for DRAM suspend data
This removes the space allocation for the unused PHY register space.
For instance in PHY registers 0-127, only 0-90 are used, so don't save
the 91-127 registers. This saves about 1.6KB of space.

Change-Id: I0c9f6d9bed8f0c1f3b8b805dfb10cf0c06208919
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
2017-06-08 09:59:53 +08:00
Lin Huang bc5c30073e rockchip: add pmusram section
the function pmu_cpuon_entrypoint() need to run in the pmusram,
we just copy bin file to pmusram before, now we add pmusram section
and link pmu_cpuon_entrypoint() to pmusram directly

Change-Id: Iae31e4c01c480c8e6f565a8f588332b478efdb16
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2017-06-08 09:59:49 +08:00
Lin Huang a9059b9643 rockchip/rk3399: fix DRAM gate training issue
The differential signal of DQS need keep low level
before gate training. It need enable RPULL and disable
PHY side ODT to ensure it when do gate training.
But it can not access the PHY registers to do it when
perform DFS.So the workaroud as below: It is ensure that
the PHY's read gate is landing somewhere in the incoming
DQS's pulses before it starts searching for pre-amble window.
It need get the rddqs_delay_ps to calculate the start point
of gate training for DFS.

Change-Id: I79eabcf4ec9a9c8f4539f68a51f22afba49c72fe
Signed-off-by: Lin Huang <hl@rock-chips.com>
2017-06-08 09:59:34 +08:00
Haojian Zhuang 7fe08b2bee hikey960: add document
Add document on HiKey960 platform and how to build.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2017-06-08 07:33:22 +08:00
Haojian Zhuang 28b02e2348 hikey960: support BL31
Support BL31 on HiKey960 platform. Implement PSCI.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2017-06-08 07:33:13 +08:00
Haojian Zhuang 7cb09cb42e hikey960: support BL2
BL2 loads MCU firmware & BL31 on hikey960 platform. The MCU firmware
is used to implement low power feature.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2017-06-08 07:32:51 +08:00
Haojian Zhuang 2f2abcf4ba hikey960: support BL1 on hikey960 platform
Support BL1 on HiKey960 platform. When recovery mode is detected,
BL1 loads NS BL1U that flushs images into UFS. When normal boot
mode is detected, BL1 loads BL2.

Fix for https://github.com/ARM-software/tf-issues/issues/486

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2017-06-08 07:31:25 +08:00
Vincent Guittot 9f505cc22a hikey: enable PMF and instrumentations
enable PMF service call and instrumetion for hikey platform

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
2017-06-07 10:14:27 +02:00
Haojian Zhuang e6a993d427 stdlib: support AARCH32 in endian head file
Add the support of AARCH32 in endian head file. The code is also
imported from FreeBSD 11.0. It's based on commit in below.

commit 4e3a5b429989b4ff621682ff1462f801237bd551
Author: mmel <mmel@FreeBSD.org>
Date:   Tue Nov 10 12:02:41 2015 +0000

    ARM: Remove trailing whitespace from sys/arm/include
    No functional changes.

    Approved by:    kib (mentor)

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2017-06-07 11:53:56 +08:00
Haojian Zhuang b15f31ac38 stdlib: import endian head file from freebsd
Import endian head files from FreeBSD 11.0. The link of FreeBSD source code
is https://github.com/freebsd/freebsd

Import machine/endian.h from sys/arm64/include/endian.h in FreeBSD.
commit d09ff72cef8e35dbf62f7363dcbf07b453f06243
Author: andrew <andrew@FreeBSD.org>
Date:   Mon Mar 23 11:54:56 2015 +0000

    Add the start of the arm64 machine headers. This is the subset needed to
    start getting userland libraries building.

    Reviewed by:        imp
    Sponsored by:       The FreeBSD Foundation

Import sys/endian.h from sys/sys/endian.h in FreeBSD.
commit 3c3fa2f5b0c7640373fcbcc3f667bf7794e8e609
Author: phk <phk@FreeBSD.org>
Date:   Thu May 20 06:16:13 2010 +0000

    Fix some way-past-brucification complaints from FlexeLint.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2017-06-07 11:50:31 +08:00
danh-arm f9a050e41b Merge pull request #969 from Summer-ARM/sq/update-doc
Update the path for firmware_image_package.h in firmware-design.md
2017-06-06 13:39:58 +01:00
Antonio Nino Diaz c46c18c598 mbedtls: Don't use tf_snprintf if option not defined
If `MBEDTLS_PLATFORM_SNPRINTF_ALT` isn't used, the function
`mbedtls_platform_set_snprintf()` isn't defined.

In case a platform uses a different mbed TLS configuration file than
the one provided by the Trusted Firmware, and it doesn't define the
mentioned build option, this will result in a build error.

This patch modifies the initialization code so that
`mbedtls_platform_set_snprintf()` is only used if
`MBEDTLS_PLATFORM_SNPRINTF_ALT` is defined, allowing platforms to use
it or not depending on their needs.

Change-Id: I1d5c86d57e9b2871ba463030bf89210ebec5178e
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2017-06-06 10:54:42 +01:00
danh-arm 47fd7cb0ac Merge pull request #964 from soby-mathew/sm/rsapss_sup
Add support for RSASSAPSS algorithm
2017-06-05 14:45:10 +01:00
danh-arm b32e6b2b35 Merge pull request #963 from soby-mathew/sm/scmi_dev
Add SCMI power domain and system power protocol support
2017-06-05 14:42:59 +01:00
danh-arm c66f4adee3 Merge pull request #961 from jeenu-arm/gic-600
Introduce ARM GIC-600 driver
2017-06-05 14:41:31 +01:00
danh-arm 03dd6391f9 Merge pull request #960 from jeenu-arm/cpu-libs
Add support for Cortex-A75 and Cortex-A55 CPUs
2017-06-05 14:41:20 +01:00
danh-arm 4d96cad5b2 Merge pull request #962 from antonio-nino-diaz-arm/an/fwu-checks
FWU: Check for overlaps when loading images, introduce `FWU_SMC_IMAGE_RESET`
2017-06-05 14:09:41 +01:00
Soby Mathew 40111d4473 Add SCMI support for Juno platform
This patch adds the memory map region for the SCMI payload memory
and maps the Juno core indices to SCMI power domains via the
`plat_css_core_pos_to_scmi_dmn_id_map` array.

Change-Id: I0d2bb2a719ff5b6a9d8e22e91e1625ab14453665
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2017-06-05 13:32:17 +01:00
Soby Mathew c04a3b6c18 CSS: Add SCMI driver for SCP
This patch adds the SCMI driver for communicating with SCP. The power
domain management and system power management protocol of the SCMI
specification[1] is implemented in the driver. The SCP power management
abstraction layer for SCMI for CSS power management is also added.

A new buid option `CSS_USE_SCMI_DRIVER` is introduced to select SCMI
driver over SCPI.

[1] ARM System Control and Management Interface v1.0 (SCMI)
Document number: ARM DEN 0056A

Change-Id: I67265615a17e679a2afe810b9b0043711ba09dbb
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2017-06-05 13:32:17 +01:00
Soby Mathew 1f33ad4e9f cert_create: Use RSASSA-PSS signature scheme for certificates
This patch modifies the `cert_create` tool to use RSASSA-PSS scheme for
signing the certificates. This is compliant with RSA PKCS_2_1 standard as
mandated by TBBR.

Note that the certificates generated by using cert_create tool after this
patch can be authenticated during TBB only if the corresponding mbedtls
driver in ARM Trusted Firmware has the corresponding support.

Change-Id: If224f41c76b3c4765ae2af5259e67f73602818a4
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2017-06-05 12:25:27 +01:00
Soby Mathew 1001202d24 Add support for RSASSAPSS algorithm in mbedtls crypto driver
This patch adds support for RSASSA-PSS Signature Algorithm for
X509 certificates in mbedtls crypto driver. Now the driver supports
RSA PKCS2_1 standard as mandated by TBBR.

NOTE: With this patch, the PKCS1_5 standard compliant RSA signature
is deprecated.

Change-Id: I9cf6d073370b710cc36a7b374a55ec96c0496461
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2017-06-05 12:25:26 +01:00
Soby Mathew 38aacad3cb Increase heapsize for mbedtls library
The mbedTLS library requires larger heap memory for verification of RSASSA-PSS
signature in certificates during Trusted Board Boot. This patch increases the
heap memory for the same.

Change-Id: I3c3123d7142b7b7b01463516ec436734895da159
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2017-06-05 12:23:27 +01:00
Summer Qin 175bc85eee Update the path for firmware_image_package.h in firmware-design.md
Change-Id: Ic0a9b3c6d212e7171b37f944e11f079282dcce87
Signed-off-by: Summer Qin <summer.qin@arm.com>
2017-06-02 14:54:18 +08:00
Achin Gupta 8d2c497715 Device tree changes to boot FreeBSD on FVPs
FreeBSD does not understand #interrupt-map in a device tree. This prevents the
GIC from being set up correctly. This patch removes the #interrupt-map in the
device trees for the Base and Foundation FVPs. This enables correct boot of
FreeBSD on these platforms.

These changes have been tested with FreeBSD and an Ubuntu cloud image
(ubuntu-16.04-server-cloudimg-arm64-uefi1.img) to ensure compatibility with
Linux.

Change-Id: I1347acdcf994ec4b1dd843ba32af9951aa54db73
Signed-off-by: Achin Gupta <achin.gupta@arm.com>
2017-06-01 18:32:31 +01:00
Antonio Nino Diaz 9d6fc3c321 FWU: Introduce FWU_SMC_IMAGE_RESET
This SMC is as a means for the image loading state machine to go from
COPYING, COPIED or AUTHENTICATED states to RESET state. Previously, this
was only done when the authentication of an image failed or when the
execution of the image finished.

Documentation updated.

Change-Id: Ida6d4c65017f83ae5e27465ec36f54499c6534d9
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2017-06-01 14:52:12 +01:00