Antonio Nino Diaz [Tue, 4 Dec 2018 14:04:52 +0000 (14:04 +0000)]
Merge pull request #1705 from chandnich/platform-id
plat/arm/sgi: Use platform specific functions to get platform ids
Antonio Niño Díaz [Tue, 4 Dec 2018 14:01:48 +0000 (15:01 +0100)]
Merge pull request #1702 from MISL-EBU-System-SW/patches-18.12
Update code with latest changes from Marvell LSP 18.12
Konstantin Porotchkin [Thu, 29 Nov 2018 13:04:10 +0000 (15:04 +0200)]
plat/marvell: update platform LSP version to 18.12.0
Sync the platform code version with current Marvell LSP.
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Igal Liberman [Mon, 3 Sep 2018 07:40:21 +0000 (10:40 +0300)]
a8k: pm: extend MSS_TRIGGER_TIMEOUT
Very rarely, during cpuidle operations the following error
is seen: "PM MSG Trigger Timeout".
This is caused by slow handling of message interrutps
in the PM FW running on CM3 (under heavy PM operation load).
This is not a real issue, so we extend the timeout to
avoid the error prints.
Change-Id: I92fd6f2ff1ddf208b216c123880ded28a00b6e0e
Signed-off-by: Igal Liberman <igall@marvell.com>
Reviewed-on: http://vgitil04.il.marvell.com:8080/59670
Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
Tested-by: iSoC Platform CI <ykjenk@marvell.com>
Konstantin Porotchkin [Sun, 21 Oct 2018 13:48:33 +0000 (16:48 +0300)]
plat/marvell: comphy: Add support for SFI on Lane 4
Add static configuration for SFI+ 10Gbps interface on SERDES
Lane 4.
This is just a copy of Lane 2 static values, not optimized.
Board-to-board iperf test shows up to 6Gbps transfer speed.
Change-Id: I024d2ac132f7fa6c342a64367f3dca2123a27e97
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Reviewed-by: Igal Liberman <igall@marvell.com>
Konstantin Porotchkin [Sun, 25 Nov 2018 14:18:06 +0000 (16:18 +0200)]
doc: marvell: Update build manual with new memory layouts
Add description for memory layouts used by EspressoBin v7 (DDR4)
Change-Id: I199d8b52580b26e560f14b503a6e99d32de4f284
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Reviewed-on: http://vgitil04.il.marvell.com:8080/61279
Reviewed-by: Stefan Chulski <stefanc@marvell.com>
Tested-by: iSoC Platform CI <ykjenk@marvell.com>
Christine Gharzuzi [Wed, 25 Jul 2018 13:06:10 +0000 (16:06 +0300)]
fix: a3900: pm: fix number of CPU power switches.
- Number of open power switches for CPUs should be three
and now two.
- This patch updates the value of open power switches from
0xfd (two power-switches) to 0xfc (three power-switches).
Change-Id: I2783ab7f04bbbb6da78eeedcabe4636f9a774512
Signed-off-by: Christine Gharzuzi <chrisg@marvell.com>
Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
Konstantin Porotchkin [Tue, 6 Nov 2018 10:25:38 +0000 (12:25 +0200)]
svc: Update the EEPROM AVS values processing
Add support for SVC test builds for tuning AVS values.
Update the SVC procedure and add EEPROM access.
Add support for AP807 AVS values (10 bits wide).
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Christine Gharzuzi [Mon, 25 Jun 2018 10:39:37 +0000 (13:39 +0300)]
ble: ap807: Switch to PLL mode and update CPU frequency
- Update CPU frequency on AP807 to 2GHz for SAR 0x0.
- Increase AVS to 0.88V for 2GHz clock
Change-Id: Ic945b682ab2f8543e34294bfc56c3eae2c5e0c8e
Signed-off-by: Christine Gharzuzi <chrisg@marvell.com>
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Igal Liberman [Thu, 15 Nov 2018 14:13:11 +0000 (16:13 +0200)]
mvebu: cp110: avoid pcie power on/off sequence when called from Linux
In Armada 8K DB boards, PCIe initialization can be executed only once
because PCIe reset performed during chip power on and it cannot be
executed via GPIO later.
This means that power on can be executed only once, when it's called
from the bootloader.
Power on:
Read bit 21 of the mode, it marks if the caller is
the bootloader or the Linux Kernel.
Power off:
Check if the comphy was already configured to PCIe, if yes,
check if the caller is bootloader, if both conditions are true
(PCIe mode and called by Linux) - skip the power-off.
In addition, fix incorrect documentation describing mode fields -
PCIe width is 3 bits, not 2.
NOTE: with this patch, please use LK4.14.76 (LK4.4.120 may not work
with it).
Change-Id: I4b929011f97a0a1869a51ba378687e78b3eca4ff
Signed-off-by: Igal Liberman <igall@marvell.com>
Reviewed-by: Grzegorz Jaszczyk <jaz@semihalf.com>
Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
Grzegorz Jaszczyk [Wed, 14 Nov 2018 17:47:35 +0000 (18:47 +0100)]
plat: marvell: a3700: do not power off cpu due to errata ref #13
Do not power off the CPU1 since there is no way to wake it up
(wake-up is causing CPU0 reset as well duo to HW bug). Quote from errata
Ref #13 [In power saving mode, both cores must be powered off]:
"When Core 0 is on and Core 1 is in power-off state, a Core 1
wake-up resets Core 0 as well and puts Core 0 back to ROM".
To overcome described HW bug instead of powering the CPU off, let it
reach WFI instruction, which is invoked by generic psci_do_cpu_off
function after platform handler finishes. This will put the core in low
power state and give a chance to wake it up.
Before this change, after running secondary kernel via kexec, only one
core was up, now both cores are up.
Change-Id: I87f144867550728055d9b8a2edb84a14539acab7
Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
Grzegorz Jaszczyk [Fri, 19 Oct 2018 13:30:02 +0000 (15:30 +0200)]
mvebu: cp110: fix phy selector configuration for XFI1
Extended phy selector configuration about XFI1 mode.
Change-Id: I1309770bbb5fdbfb0127b6f12ee78974d1d6b19f
Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
Soby Mathew [Mon, 3 Dec 2018 13:29:33 +0000 (13:29 +0000)]
Merge pull request #1699 from chandnich/sgi-mt-support
Add support to implement multi-threaded platforms for SGI
Chandni Cherukuri [Wed, 28 Nov 2018 06:01:51 +0000 (11:31 +0530)]
plat/arm/sgi: Use platform specific functions to get platform ids
Add two new functions 'plat_arm_sgi_get_platform_id' and
'plat_arm_sgi_get_config_id' which will be implemented by all the
SGI platforms. These functions can be used to determine the part
number and configuration id of the SGI platforms.
In BL2, these functions are used to populate the 'system-id' node.
In BL31, these functions are used to populate the 'sgi_plat_info_t'
structure with the part number and configuration id of the platform.
Change-Id: I3bacda933527724a3b4074ad4ed5b53a81ea4689
Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
Soby Mathew [Fri, 30 Nov 2018 16:25:27 +0000 (16:25 +0000)]
Merge pull request #1701 from chandnich/psci-ops
remove weak implemention of 'plat_arm_psci_override_pm_ops'
Antonio Niño Díaz [Thu, 29 Nov 2018 15:05:50 +0000 (16:05 +0100)]
Merge pull request #1688 from JoelHutton/jh/variant_1_mitigations
Initial Spectre V1 mitigations (CVE-2017-5753).
Antonio Niño Díaz [Thu, 29 Nov 2018 15:05:17 +0000 (16:05 +0100)]
Merge pull request #1698 from hzhuang1/rm_emmc_delay
Rm emmc delay
Antonio Niño Díaz [Thu, 29 Nov 2018 15:05:05 +0000 (16:05 +0100)]
Merge pull request #1679 from pangupta/master
ccn: Introduce API to set and read value of node register
Chandni Cherukuri [Wed, 14 Nov 2018 08:13:59 +0000 (13:43 +0530)]
plat/arm: remove weak implemention of 'plat_arm_psci_override_pm_ops' function
In order to allow Arm platforms to override the default list of PSCI
callbacks, remove the existing weak implementation of
'plat_arm_psci_override_pm_ops' function and let all the Arm platforms
implement their own 'plat_arm_psci_override_pm_ops' function.
For platforms that support SCMI protocol, the function
'css_scmi_override_pm_ops' can be additionally used as well to
override the default PSCI callbacks.
Change-Id: If7c27468bd51a00ea9c2a3716b5894163f5a9f3c
Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
Antonio Niño Díaz [Wed, 28 Nov 2018 10:55:53 +0000 (11:55 +0100)]
Merge pull request #1693 from jeenu-arm/ehf-doc
EHF and RAS documentation
Antonio Niño Díaz [Tue, 27 Nov 2018 08:06:15 +0000 (09:06 +0100)]
Merge pull request #1696 from satheesbalya-arm/sb1/sb1_2406_romlib_juno
romlib: Add juno support for romlib
Antonio Niño Díaz [Tue, 27 Nov 2018 08:05:50 +0000 (09:05 +0100)]
Merge pull request #1695 from satheesbalya-arm/sb1/sb1_2641_romlib_phase2
romlib: Allow patching of romlib functions
Chandni Cherukuri [Tue, 16 Oct 2018 08:41:34 +0000 (14:11 +0530)]
plat/arm/sgi: allow value of PLAT_MAX_PWR_LVL to be platform specific
For platforms with multi-threaded CPUs, the number of power domains
supported would be more than the value currently defined by
PLAT_MAX_PWR_LVL. So move the PLAT_MAX_PWR_LVL macro to platform
specific code and let the platform define the number of power domain
levels.
Change-Id: I21c0682e62b397860b2999031a0c9c5ce0d28eed
Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
Chandni Cherukuri [Thu, 16 Aug 2018 08:15:17 +0000 (13:45 +0530)]
plat/arm/sgi: override weak implementation of plat_arm_get_cpu_pe_count
To support platforms which are based on multi-threaded CPUs, override
the weak implementation of plat_arm_get_cpu_pe_count function to return
the number of threads supported by the CPU used in the platform.
Change-Id: Ia680773f1277b17e2d3d2414d87943dcece33e89
Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
Chandni Cherukuri [Tue, 16 Oct 2018 09:12:19 +0000 (14:42 +0530)]
plat/arm/common: add an additional platform power level
For platforms using multi-threaded CPUs, there can be upto four
platform power domain levels. At present, there are three platform
power domain levels that are defined for the CSS platforms. Define a
fourth level 'ARM_PWR_LVL3' as well to provide support for an
additional platform power domain level.
Change-Id: I40cc17a10f4690a560776f504364fd7277a7e72a
Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
Chandni Cherukuri [Tue, 16 Oct 2018 09:49:54 +0000 (15:19 +0530)]
plat/css: allow platforms to define the system power domain level
The CSS_SYSTEM_PWR_DMN_LVL macro that defines the system power domain
level is fixed at ARM_PWR_LVL2 for all CSS platforms. However, the
system power domain level can be different for CSS platforms that
use multi-threaded CPUs.
So, in preparation towards adding support for platforms that use
multi-threaded CPUs, refactor the definition of CSS_SYSTEM_PWR_DMN_LVL
such that CSS_SYSTEM_PWR_DMN_LVL is uniquely defined for each of the
CSS platform.
Change-Id: Ia837b13f6865e71da01780993c048b45b7f36d85
Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
Jeenu Viswambharan [Fri, 12 Oct 2018 07:48:36 +0000 (08:48 +0100)]
docs: Add RAS framework documentation
Change-Id: Ibf2b21b12ebc0af5815fc6643532a3be9100bf02
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Joel Hutton [Tue, 9 Oct 2018 13:08:42 +0000 (14:08 +0100)]
Initial Spectre V1 mitigations (CVE-2017-5753).
Initial Spectre Variant 1 mitigations (CVE-2017-5753).
A potential speculative data leak was found in PSCI code, this depends
on a non-robust implementation of the `plat_get_core_pos_by_mpidr()`
function. This is considered very low-risk. This patch adds a macro to
mitigate this. Note not all code paths could be analyzed with current
tools.
Add a macro which makes a variable 'speculation safe', using the
__builtin_speculation_safe_value function of GCC and llvm. This will be
available in GCC 9, and is planned for llvm, but is not currently in
mainline GCC or llvm. In order to implement this mitigation the compiler
must support this builtin. Support is indicated by the
__HAVE_SPECULATION_SAFE_VALUE flag.
The -mtrack-speculation option maintains a 'tracker' register, which
determines if the processor is in false speculation at any point. This
adds instructions and increases code size, but avoids the performance
impact of a hard barrier.
Without the -mtrack-speculation option, __builtin_speculation_safe_value
expands to a
ISB
DSB SY
sequence after a conditional branch, before the
speculation safe variable is used. With -mtrack-speculation a
CSEL tracker, tracker, XZR, [cond];
AND safeval,tracker;
CSDB
sequence is added instead, clearing the vulnerable variable by
AND'ing it with the tracker register, which is zero during speculative
execution. [cond] are the status flags which will only be true during
speculative execution. For more information on
__builtin_speculation_safe_value and the -mtrack-speculation option see
https://developer.arm.com/support/arm-security-updates/speculative-processor-vulnerability/compiler-support-for-mitigations
The -mtracking option was not added, as the performance impact of the
mitigation is low, and there is only one occurence.
Change-Id: Ic9e66d1f4a5155e42e3e4055594974c230bfba3c
Signed-off-by: Joel Hutton <Joel.Hutton@Arm.com>
Jeenu Viswambharan [Wed, 18 Oct 2017 13:30:53 +0000 (14:30 +0100)]
docs: Add Exception Handling Framework documentation
Change-Id: I77d38758d18ba6dda1652b1b1e644fbfb14386cc
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Jeenu Viswambharan [Thu, 11 Oct 2018 08:50:26 +0000 (09:50 +0100)]
SDEI: Unconditionally resume Secure if it was interrupted
Secure world execution nearly always expect a controlled exit to
Non-secure world. SDEI interrupts, although targets EL3, occur on behalf
of Non-secure world, and may have higher priority than Secure world
interrupts. Therefore they might preempt Secure execution, and yield
execution to Non-secure SDEI handler. Upon completion of SDEI event
handling (regardless of whether it's COPLETE or COMPLETE_AND_RESUME), we
must resume Secure execution if it was preempted.
Change-Id: I6edd991032588588427ba2fe6c3d7668f7080e3d
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Antonio Niño Díaz [Mon, 26 Nov 2018 10:51:57 +0000 (11:51 +0100)]
Merge pull request #1697 from antonio-nino-diaz-arm/an/arch
Synchronise arch.h and arch_helpers.h with TF-A-Tests
Antonio Nino Diaz [Thu, 22 Nov 2018 15:53:17 +0000 (15:53 +0000)]
Synchronise arch.h and arch_helpers.h with TF-A-Tests
The headers forked at some point in the past and have diverged a lot. In
order to make it easier to share code between TF-A-Tests and TF-A, this
patch synchronises most of the definitions in the mentioned headers.
This is not a complete sync, it has to be followed by more cleanup.
This patch also removes the read helpers for the AArch32 instructions
ats1cpr and ats1hr (they are write-only).
Change-Id: Id13ecd7aeb83bd2318cd47156d71a42f1c9f6ba2
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Haojian Zhuang [Wed, 21 Nov 2018 01:23:20 +0000 (09:23 +0800)]
hikey: remove delay after eMMC initialized
commit
386b14bf64124ebf0368eab33ef07603e0c3138a
Author: Haojian Zhuang <haojian.zhuang@linaro.org>
Date: Wed Nov 21 09:19:49 2018 +0800
mmc: poll eMMC status after EXT_CSD command
EXT_CSD command needs to access data from eMMC device. Add the
operation of polling eMMC device status. Make sure the command is
finished.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
A hacked delay time can't fit each eMMC device. Since the above commit
enables the polling operation, remove the hacked delay time now.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Haojian Zhuang [Wed, 21 Nov 2018 01:19:49 +0000 (09:19 +0800)]
mmc: poll eMMC status after EXT_CSD command
EXT_CSD command needs to access data from eMMC device. Add the
operation of polling eMMC device status. Make sure the command is
finished.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Sathees Balya [Fri, 2 Nov 2018 14:56:06 +0000 (14:56 +0000)]
juno: Add romlib support
This patch adds support to build a combined BL1
and ROMLIB binary file with the right page
alignment in Juno. When USE_ROMLIB=1 is set for
Juno, it generates the combined file
bl1_romlib.bin which needs to be used instead of
bl1.bin
Change-Id: I407efbe48d3e522fa6ef855538a9587193cb1919
Signed-off-by: Sathees Balya <sathees.balya@arm.com>
Pankaj Gupta [Thu, 15 Nov 2018 06:12:50 +0000 (11:42 +0530)]
ccn: Introduce API to set and read value of node register
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Antonio Niño Díaz [Fri, 23 Nov 2018 09:18:23 +0000 (10:18 +0100)]
Merge pull request #1681 from Andre-ARM/allwinner/fixes
allwinner: clock / power fixes
Antonio Niño Díaz [Fri, 23 Nov 2018 09:18:02 +0000 (10:18 +0100)]
Merge pull request #1691 from vijayenthiran-arm/sgi-dmc620-tzc
Add support for dmc620 tzc driver
Sathees Balya [Wed, 14 Nov 2018 11:59:12 +0000 (11:59 +0000)]
romlib: Add map file generation
Change-Id: I1f377d2d94c0fe8d2d9e62614f4a8e2dfcd9e745
Signed-off-by: Sathees Balya <sathees.balya@arm.com>
Sathees Balya [Wed, 14 Nov 2018 11:57:10 +0000 (11:57 +0000)]
romlib: Add calloc_free register function
Register functions have to be added to the
jump table to allow patching in the
future
Change-Id: I57a885f7fc6290ea74a6096aea5b1867b2098eb7
Signed-off-by: Sathees Balya <sathees.balya@arm.com>
Sathees Balya [Thu, 18 Oct 2018 18:14:21 +0000 (19:14 +0100)]
romlib: Allow patching of romlib functions
This change allows patching of functions in the
romlib. This can be done by adding "patch" at the
end of the jump table entry for the function that
needs to be patched in the file jmptbl.i.
Functions patched in the jump table list will be
built as part of the BL image and the romlib
version will not be used
Change-Id: Iefb200cb86e2a4b61ad3ee6180d3ecc39bad537f
Signed-off-by: Sathees Balya <sathees.balya@arm.com>
Antonio Nino Diaz [Thu, 22 Nov 2018 15:38:05 +0000 (15:38 +0000)]
Revert "aarch32: Apply workaround for errata 813419 of Cortex-A57"
This reverts commit
6f512a3dfd61662dbdae4912fb6a320ae4d754d5.
According to the 'Cortex-A57 MPCore Software Developers Errata Notice':
This bug will only affect secure AArch64 EL3. If the above
conditions occur, the CPU will not invalidate the targeted EL3 TLB
entries and incorrect translations might occur.
For this reason it is not needed in AArch32.
Change-Id: I6f7b333817515499723e8f306145790ad6af9975
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Niño Díaz [Thu, 22 Nov 2018 14:21:47 +0000 (15:21 +0100)]
Merge pull request #1689 from antonio-nino-diaz-arm/an/alloc-va
xlat v2: Support mapping regions with allocated VA
Antonio Niño Díaz [Thu, 22 Nov 2018 13:59:38 +0000 (14:59 +0100)]
Merge pull request #1687 from ldts/rcar_gen3/maintain_4
rcar-gen3: lock RPC hyper-flash access
Antonio Nino Diaz [Tue, 20 Nov 2018 16:03:11 +0000 (16:03 +0000)]
xlat v2: Support mapping regions with allocated VA
Provide new APIs to add new regions without specifying the base VA.
- `mmap_add_region_alloc_va` adds a static region to mmap choosing as
base VA the first possible address after all the currently mapped
regions. It is aligned to an appropriate boundary in relation to the
size and base PA of the requested region. No attempt is made to fill
any unused VA holes.
- `mmap_add_dynamic_region_alloc_va` it adds a region the same way as
`mmap_add_region_alloc_va` does, but it's dynamic instead of static.
- `mmap_add_alloc_va` takes an array of non const `mmap_region_t`,
maps them in the same way as `mmap_add_region_alloc_va` and fills
their `base_va` field. A helper macro has been created to help create
the array, called `MAP_REGION_ALLOC_VA`.
Change-Id: I5ef3f82ca0dfd0013d2e8034aa22f13ca528ba37
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Vijayenthiran Subramaniam [Thu, 25 Oct 2018 16:50:24 +0000 (22:20 +0530)]
plat/arm/sgi: add secure memory support for sgi575 and sgiclarka
Remove the platform common plat_arm_security_setup function to allow
platform specific implementations of the security setup function
implemented in the board directory of the platform.
For use by secure software, configure region0 of DMC-620 trustzone
controller to protect the upper 16MB of memory of the first DRAM block
from non-secure accesses.
Change-Id: I9a8c19656702c4fa4f6917b3655b692d443bb568
Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
Vijayenthiran Subramaniam [Mon, 22 Oct 2018 13:06:35 +0000 (18:36 +0530)]
drivers/tzc-dmc620: add driver to setup DMC-620 TZC controller
ARM CoreLink DMC-620 Dynamic Memory Controller includes a TZC controller
to setup secure or non-secure regions of DRAM memory. The TZC controller
allows to setup upto eight such regions of memory in DRAM. This driver
provides helper functions to setup the TZC controller within DMC-620.
Change-Id: Iee7692417c2080052bdb7b1c2873a024bc5d1d10
Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
Antonio Niño Díaz [Tue, 20 Nov 2018 16:33:30 +0000 (17:33 +0100)]
Merge pull request #1690 from pbatard/rpi3-docfix
rpi3: fix bad formatting in rpi3.rst
Pete Batard [Tue, 20 Nov 2018 16:25:15 +0000 (16:25 +0000)]
rpi3: fix bad formatting in rpi3.rst
d4fd0219 (pull request #1685) introduced unwanted formatting
such as bold/italic in the description for RPI3_USE_UEFI_MAP.
Antonio Niño Díaz [Tue, 20 Nov 2018 11:03:26 +0000 (12:03 +0100)]
Merge pull request #1686 from antonio-nino-diaz-arm/an/backtrace
backtrace: Extract rules from root Makefile
Antonio Niño Díaz [Tue, 20 Nov 2018 10:57:41 +0000 (11:57 +0100)]
Merge pull request #1685 from pbatard/rpi3-use-uefi-map
rpi3: add RPI3_USE_UEFI_MAP build option
Jorge Ramirez-Ortiz [Mon, 19 Nov 2018 18:26:56 +0000 (19:26 +0100)]
rcar-gen3: control RPC hyper-flash access
RCAR_RPC_HYPERFLASH_LOCKED can be set to 0 as a build option if the
user needs to allow u-boot to reprogram the ATF firmware using a FIP
image (as a faster alternative of toggling numerous DIP switches on
the board and using ascii-xfer of srec files)
The code being controlled with this commit should only be re-enabled for
debugging (_never_ on a product release)
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez.ortiz@gmail.com>
Antonio Niño Díaz [Mon, 19 Nov 2018 11:49:07 +0000 (12:49 +0100)]
Merge pull request #1684 from oscardagrach/hikey-mmc-fix
hikey: increase delay after eMMC initialized
Antonio Niño Díaz [Mon, 19 Nov 2018 11:48:54 +0000 (12:48 +0100)]
Merge pull request #1682 from MISL-EBU-System-SW/migrate-multi-console
Marvell: Migrate to multi console API
Antonio Nino Diaz [Mon, 19 Nov 2018 11:48:30 +0000 (11:48 +0000)]
backtrace: Extract rules from root Makefile
It's better to have them in a separate file instead of having them spread
across the Makefile. This is what the stack protector is already doing.
Change-Id: Id30742c0af10de5ea6d10674ca25bf52b0f2b262
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Pete Batard [Thu, 15 Nov 2018 22:29:59 +0000 (22:29 +0000)]
rpi3: add RPI3_USE_UEFI_MAP build option
The default Raspberry Pi 3 memory mapping for ATF is geared towards
the use of uboot + Linux. This creates issues when trying to use
ATF with an UEFI payload and Windows on ARM64.
We therefore introduce new build option RPI3_USE_UEFI_MAP, that
enables the build process to use an alternate memory mapping that
is compatible with UEFI + Windows (as well as UEFI + Linux).
Fixes ARM-software/tf-issues#649
Signed-off-by: Pete Batard <pete@akeo.ie>
Antonio Niño Díaz [Fri, 16 Nov 2018 13:46:37 +0000 (14:46 +0100)]
Merge pull request #1683 from Yann-lms/stm32mp1_multi_console
Add multi console support for STM32MP1
Antonio Niño Díaz [Thu, 15 Nov 2018 15:36:12 +0000 (16:36 +0100)]
Merge pull request #1680 from pbatard/rpi3-runtime-uart
rpi3: add RPI3_RUNTIME_UART build option
Ryan Grachek [Thu, 15 Nov 2018 14:41:25 +0000 (08:41 -0600)]
hikey: increase delay after eMMC initialized
Some eMMC chips require a longer delay. After testing
different chips, 20ms appears to work reliably.
Signed-off-by: Ryan Grachek <ryan@edited.us>
Konstantin Porotchkin [Wed, 14 Nov 2018 15:15:08 +0000 (17:15 +0200)]
plat/marvell: Migrate to multi-console API
Migrate Marvell platforms from legacy console API to
multi-console API.
Change-Id: I647f5f49148b463a257a747af05b5f0c967f267c
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Yann Gautier [Thu, 15 Nov 2018 10:52:32 +0000 (11:52 +0100)]
drivers: st: uart: remove old API
Now that MULTI_CONSOLE_API is enabled for the STM32MP1 platform,
we can remove the non MULTI_CONSOLE_API parts in the driver.
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Yann Gautier [Wed, 14 Nov 2018 17:46:15 +0000 (18:46 +0100)]
stm32mp1: use MULTI_CONSOLE_API
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Yann Gautier [Thu, 15 Nov 2018 08:51:06 +0000 (09:51 +0100)]
drivers: st: update console driver to support MULTI_CONSOLE_API
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Yann Gautier [Wed, 14 Nov 2018 17:18:12 +0000 (18:18 +0100)]
stm32mp1: add a new file for UART registers definition
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Yann Gautier [Thu, 15 Nov 2018 08:49:24 +0000 (09:49 +0100)]
utils_def: add an assembly version for GENMASK
When compiling assembly files, stdint.h is not included.
UINT32_C and UINT64_C are then not defined.
A new GENMASK macro for assembly is then created.
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Antonio Niño Díaz [Thu, 15 Nov 2018 10:20:03 +0000 (11:20 +0100)]
Merge pull request #1675 from SNG-ARM/integration
SPM priority level changes
Konstantin Porotchkin [Tue, 6 Nov 2018 16:10:33 +0000 (18:10 +0200)]
fix: plat/marvell: a3700: Remove encryption password
According to "openssl" manual:
-K key
The actual key to use: this must be represented as a string
comprised only of hex digits. If only the key is specified,
the IV must additionally specified using the -iv option.
When both a key and a password are specified, the key given
with the -K option will be used and the IV generated from the
password will be taken.
It does not make much sense to specify both key and password.
This patch removes "-k 0" parameter from the encryption command
since we are already using "-K" and "-iv" for the key and IV.
Change-Id: Ia333cedaa3207e643c95d2ec7c229f50eeab96db
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Reviewed-on: http://vgitil04.il.marvell.com:8080/60745
Reviewed-by: Igal Liberman <igall@marvell.com>
Tested-by: iSoC Platform CI <ykjenk@marvell.com>
Reviewed-by: Sharon Habet <sharonh@marvell.com>
Andre Przywara [Wed, 24 Oct 2018 15:38:19 +0000 (16:38 +0100)]
allwinner: power: Add DCDC6 power rail
The DCDC6 power rail is typically driving VDD_SYS in the SoC, so it is
on by default and uses the default voltage.
As there seems to be at least on board using a different voltage, add
the rail to the list of known voltage lines, so we can setup the right
voltage as early as possible.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Andre Przywara [Wed, 24 Oct 2018 15:38:12 +0000 (16:38 +0100)]
allwinner: power: add enable switches for DCDC1/5
The DCDC1 and DCDC5 power rails didn't specify the enable bits. This
isn't critical, since those rails are on by default (and are needed for
every board), but it is inconsistent.
Add the respective enable bits for those two rails.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Andre Przywara [Mon, 5 Nov 2018 00:52:06 +0000 (00:52 +0000)]
allwinner: power: fix DRIVEVBUS pin setup
The DRIVEVBUS pin setup was broken in two ways:
- To configure this pin as an output pin, one has to *clear* the bit in
register 0x8f. It is 0 by default, but rebooting from Linux might have
left this bit set.
- Doing this just configures the pin as an output pin, but doesn't
actually drive power to it. This is done via bit 2 in register 0x30.
Fix the routine to both properly configure the pin and drive power to
it. Add an axp_clrsetbits() helper on the way.
Now this isn't really perfect, still:
We only need to setup the PMIC power rails that are needed for U-Boot.
DRIVEVBUS typically controls the VBUS voltage for the host function of
an USB-OTG port, something we typically don't want in U-Boot (fastboot,
using the USB *device* functionality, is much more common). The
BananaPi-M64 uses the regulator in this way, but the Remix Mini PC
actually controls the power of both its USB ports via this line.
Technically we should differentiate here: if DRIVEVBUS controls a
microUSB-B socket, the power should stay off, any host-type A sockets
should be supplied, though.
For now just always enable the power, that shouldn't really hurt the
USB-OTG functionality anyway.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Andre Przywara [Sun, 4 Nov 2018 23:37:48 +0000 (23:37 +0000)]
allwinner: A64/H5: setup missing bus clocks
The legacy Allwinner ATF port used to setup some clocks, and U-Boot is
still relying on this. We don't need to setup the full set, as the SPL
is doing most of it, but it misses one clock (AHB2) and programs another
(AHB1) to quite conservative values.
Fix this up during the platform setup to improve USB and Ethernet
performance, iperf values go up by 31% in my setup with that patch.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Sughosh Ganu [Wed, 14 Nov 2018 05:36:24 +0000 (11:06 +0530)]
SPM: Raise running priority of the core while in Secure Partition
The current secure partition design mandates that a) at a point, only
a single core can be executing in the secure partition, and b) a core
cannot be preempted by an interrupt while executing in secure
partition.
Ensure this by activating the SPM priority prior to entering the
parition. Deactivate the priority on return from the
partition.
Change-Id: Icb3473496d16b733564592eef06304a1028e4f5c
Signed-off-by: Sughosh Ganu <sughosh.ganu@arm.com>
Sughosh Ganu [Wed, 14 Nov 2018 05:12:46 +0000 (10:42 +0530)]
SPM: Register Secure Partition priority level with ehf module
Register a priority level, PLAT_SP_PRI, for secure partition with EL3
exception handling framework(ehf) module.
The secure partition manager(SPM) would raise the core's priority to
PLAT_SP_PRI before entering the secure partition, to protect the core
from getting interrupted while in secure partition.
Change-Id: I686897f052a4371e0efa9b929c07d3ad77249e95
Signed-off-by: Sughosh Ganu <sughosh.ganu@arm.com>
Sughosh Ganu [Wed, 14 Nov 2018 05:10:33 +0000 (10:40 +0530)]
SPM: EHF: Build EHF module along with Secure Partition Manager
Add a dependency for building EL3 exception handling framework(EHF)
module with the secure partition manager(SPM).
The EHF module is needed for raising the core's running priority
before the core enters the secure partition, and lowering it
subsequently on exit from the secure partition.
Change-Id: Icbe2d0a63f00b46dc593ff3d86b676c9333506c3
Signed-off-by: Sughosh Ganu <sughosh.ganu@arm.com>
Pete Batard [Tue, 13 Nov 2018 13:14:26 +0000 (13:14 +0000)]
rpi3: add RPI3_RUNTIME_UART build option
Some OSes (e.g. Ubuntu 18.04 LTS on Raspberry Pi 3) may disable the
runtime UART in a manner that prevents the system from rebooting if
ATF tries to send runtime messages there.
Also, we don't want the firmware to share the UART with normal
world, as this can be a DoS attack vector into the secure world.
This patch fixes these 2 issues by introducing new build option
RPI3_RUNTIME_UART, that disables the runtime UART by default.
Fixes ARM-software/tf-issues#647
Signed-off-by: Pete Batard <pete@akeo.ie>
Antonio Nino Diaz [Tue, 13 Nov 2018 13:27:41 +0000 (13:27 +0000)]
Merge pull request #1676 from Yann-lms/static_analysis
Correct some issues found with static analysis tools
Antonio Niño Díaz [Tue, 13 Nov 2018 11:26:28 +0000 (12:26 +0100)]
Merge pull request #1677 from acolinisi/PR--drivers-cadence-uart-prototype
cadence: uart: comply to console_register prototype
Alexei Colin [Fri, 9 Nov 2018 22:36:55 +0000 (17:36 -0500)]
cadence: uart: comply to console_register prototype
Signed-off-by: Alexei Colin <acolin@isi.edu>
Antonio Niño Díaz [Mon, 12 Nov 2018 10:40:11 +0000 (11:40 +0100)]
Merge pull request #1674 from jforissier/hisi-multi-console
hikey, hikey960, poplar: use new console APIs
Antonio Niño Díaz [Mon, 12 Nov 2018 09:56:41 +0000 (10:56 +0100)]
Merge pull request #1605 from sivadur/integration
Add support new Xilinx Versal ACAP platform
Yann Gautier [Fri, 9 Nov 2018 16:47:34 +0000 (17:47 +0100)]
stm32mp1: remove duplicate function declaration
It is already in include/drivers/st/stm32mp1_ddr_helpers.h.
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Yann Gautier [Fri, 9 Nov 2018 14:57:18 +0000 (15:57 +0100)]
stm32mp1: correct some static analysis tools issues
These issues wer found by sparse:
drivers/st/clk/stm32mp1_clk.c:1524:19:
warning: incorrect type in assignment (different base types)
expected restricted fdt32_t const [usertype] *pkcs_cell
got unsigned int const [usertype] *
plat/st/stm32mp1/plat_image_load.c:13:6:
warning: symbol 'plat_flush_next_bl_params' was not declared.
Should it be static?
plat/st/stm32mp1/plat_image_load.c:21:16:
warning: symbol 'plat_get_bl_image_load_info' was not declared.
Should it be static?
plat/st/stm32mp1/plat_image_load.c:29:13:
warning: symbol 'plat_get_next_bl_params' was not declared.
Should it be static?
plat/st/stm32mp1/bl2_io_storage.c:40:10:
warning: symbol 'block_buffer' was not declared. Should it be static?
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Yann Gautier [Fri, 9 Nov 2018 17:21:04 +0000 (18:21 +0100)]
drivers: partition: correct some static analysis tools issues
cppcheck:
[drivers/partition/gpt.c:19] -> [drivers/partition/gpt.c:19]:
(warning) Either the condition 'str_in!=((void*)0)' is redundant
or there is possible null pointer dereference: name.
sparse:
drivers/partition/gpt.c:39:9:
warning: Using plain integer as NULL pointer
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Yann Gautier [Fri, 9 Nov 2018 17:21:51 +0000 (18:21 +0100)]
psci: put __dead2 attribute after void in plat_psci_ops
These warnings were issued by sparse:
plat/st/stm32mp1/stm32mp1_pm.c:365:36:
warning: incorrect type in initializer (different modifiers)
expected void ( *[noreturn] pwr_domain_pwr_down_wfi )( ... )
got void ( [noreturn] *<noident> )( ... )
plat/st/stm32mp1/stm32mp1_pm.c:366:23:
warning: incorrect type in initializer (different modifiers)
expected void ( *[noreturn] system_off )( ... )
got void ( [noreturn] *<noident> )( ... )
plat/st/stm32mp1/stm32mp1_pm.c:367:25:
warning: incorrect type in initializer (different modifiers)
expected void ( *[noreturn] system_reset )( ... )
got void ( [noreturn] *<noident> )( ... )
This cannot be changed the other way in all platforms pm drivers
or else there is a compilation error:
plat/st/stm32mp1/stm32mp1_pm.c:234:1: error: attributes should be specified
before the declarator in a function definition
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Siva Durga Prasad Paladugu [Tue, 25 Sep 2018 13:14:58 +0000 (18:44 +0530)]
arm64: versal: Add support for new Xilinx Versal ACAPs
Xilinx is introducing Versal, an adaptive compute acceleration platform
(ACAP), built on 7nm FinFET process technology. Versal ACAPs combine Scalar
Processing Engines, Adaptable Hardware Engines, and Intelligent Engines with
leading-edge memory and interfacing technologies to deliver powerful
heterogeneous acceleration for any application. The Versal AI Core series has
five devices, offering 128 to 400 AI Engines. The series includes dual-core Arm
Cortex-A72 application processors, dual-core Arm Cortex-R5 real-time
processors, 256KB of on-chip memory with ECC, more than 1,900 DSP engines
optimized for high-precision floating point with low latency.
This patch adds Virtual QEMU platform support for
this SoC "versal_virt".
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Jerome Forissier [Thu, 8 Nov 2018 11:57:30 +0000 (11:57 +0000)]
poplar: Use new console APIs
Switch to the new console APIs enabled by setting MULTI_CONSOLE_API=1.
Enables building with ERROR_DEPRECATED=1.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Jerome Forissier [Thu, 8 Nov 2018 08:59:29 +0000 (09:59 +0100)]
hikey960: Use new console APIs
Switch to the new console APIs enabled by setting MULTI_CONSOLE_API=1.
Enables building with ERROR_DEPRECATED=1.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Jerome Forissier [Thu, 8 Nov 2018 10:17:47 +0000 (10:17 +0000)]
hikey: Use new console APIs
Switch to the new console APIs enabled by setting MULTI_CONSOLE_API=1.
Enables building with ERROR_DEPRECATED=1.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Antonio Niño Díaz [Thu, 8 Nov 2018 11:22:42 +0000 (12:22 +0100)]
Merge pull request #1673 from antonio-nino-diaz-arm/an/headers
Standardise header guards across codebase
Antonio Nino Diaz [Thu, 8 Nov 2018 10:20:19 +0000 (10:20 +0000)]
Standardise header guards across codebase
All identifiers, regardless of use, that start with two underscores are
reserved. This means they can't be used in header guards.
The style that this project is now to use the full name of the file in
capital letters followed by 'H'. For example, for a file called
"uart_example.h", the header guard is UART_EXAMPLE_H.
The exceptions are files that are imported from other projects:
- CryptoCell driver
- dt-bindings folders
- zlib headers
Change-Id: I50561bf6c88b491ec440d0c8385c74650f3c106e
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Soby Mathew [Wed, 7 Nov 2018 17:03:45 +0000 (17:03 +0000)]
Merge pull request #1672 from sandrine-bailleux-arm/sb/fix-dram-constants
Arm platforms: Fix DRAM address macros
Soby Mathew [Wed, 7 Nov 2018 17:00:49 +0000 (17:00 +0000)]
Merge pull request #1668 from ldts/rcar_gen3/e3_build
rcar_gen3: E3 target: fix compilation issues
Soby Mathew [Wed, 7 Nov 2018 16:58:03 +0000 (16:58 +0000)]
Merge pull request #1670 from antonio-nino-diaz-arm/an/misra-arm
plat/arm: Fix MISRA defects in common code
Soby Mathew [Wed, 7 Nov 2018 16:56:03 +0000 (16:56 +0000)]
Merge pull request #1669 from sandrine-bailleux-arm/sb/rm-tzc-top-fn
Remove unneeded _tzc_get_max_top_addr() function
Soby Mathew [Wed, 7 Nov 2018 16:54:17 +0000 (16:54 +0000)]
Merge pull request #1666 from pmanish87/mp2/manish_local
plat/arm: Support direct Linux kernel boot in AArch32
Sandrine Bailleux [Wed, 31 Oct 2018 13:28:17 +0000 (14:28 +0100)]
Arm platforms: Fix DRAM address macros
On AArch32, ARM_DRAM1_BASE and ARM_DRAM1_SIZE constants are currently
32-bit values (because they are suffixed with UL and the value
0x80000000 fits in a unsigned long int, i.e. a 32-bit value). When
summing them up, the result overflows the maximum value that can be
encoded in a 32-bit value so it wraps around and does not result in
the expected value.
This patch changes the suffix of these constants into ULL so that they
always are 64-bit values.
Change-Id: I3b19b1805e35cc7e43050458df379081b1e882d5
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Sandrine Bailleux [Wed, 31 Oct 2018 12:41:47 +0000 (13:41 +0100)]
Remove _tzc_get_max_top_addr() function
This function was needed at the time where we didn't have the
compiler_rt lib. An AArch32-specific variant was provided to handle
the 64-bit shift operation in 32-bit. This is no longer needed.
Change-Id: Ibab709a95e3a723ae2eeaddf873dba70ff2012b3
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Sandrine Bailleux [Wed, 31 Oct 2018 12:37:42 +0000 (13:37 +0100)]
compiler_rt: Import lshrdi3.c file
Imported from the LLVM compiler_rt library on master branch as of
30 Oct 2018 (SVN revision: r345645).
This is to get the __aeabi_llsr() builtin, which is required by a
subsequent patch that uses a logical right shift operator in AArch32.
Change-Id: I9884139a12855a8a87206fb572aaa7dd35582b09
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Sandrine Bailleux [Wed, 31 Oct 2018 12:35:01 +0000 (13:35 +0100)]
compiler_rt: Import latest changes on int_lib.h
Imported from the LLVM compiler_rt library on master branch as of
30 Oct 2018 (SVN revision: r345645).
Change-Id: I058cfb5894daf1d12e1ef971c0ba36b0aa089be5
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Antonio Nino Diaz [Tue, 6 Nov 2018 13:14:21 +0000 (13:14 +0000)]
plat/arm: Fix MISRA defects in common code
Change-Id: I2419416fadfcdf64da8b7690a348007591c4edf3
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>