Antonio Nino Diaz [Tue, 30 Oct 2018 12:50:41 +0000 (12:50 +0000)]
SPM: Remove old SMC interfaces
Remove interfaces based on MM_COMMUNICATE.
Change-Id: I628c884b91d9f4758269ea2c4dedc37a66bb93cf
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Tue, 30 Oct 2018 11:34:23 +0000 (11:34 +0000)]
SPM: Map memory regions from RD
SPM needs to map a number of regions on behalf of the secure partition.
Previously, it used to get a list of them from platform code using the
plat_get_secure_partition_mmap() API. Now it gets them from the resource
description structure.
The SPM<->SP shared buffer is mapped dynamically at EL3. This buffer is
used to pass information between SPM and SP, so it must be mapped at EL3
as well in order to be used by SPM.
Dynamic translation tables have been enabled when the Trusted Firmware
is compiled with SPM support.
Change-Id: I64ad335e931661812a0a60558e60372e1e5e6b72
Co-authored-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Tue, 26 Jun 2018 09:34:25 +0000 (10:34 +0100)]
SPM: Read entrypoint from resource descriptor
Read entrypoint of the Secure Partition from the resource description
struct.
Change-Id: Ie693c7b4d4fecafd85b6934d9d8c4232efb1dc55
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Tue, 27 Nov 2018 08:36:02 +0000 (08:36 +0000)]
SPM: Load image and RD from SP package
Load SP and RD from package instead of relying on RD being already
loaded in memory and the SP being loaded as a BL32 image.
Change-Id: I18d4fbf4597656c6a7e878e1d7c01a8a324f3f8a
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Tue, 27 Nov 2018 14:58:04 +0000 (14:58 +0000)]
SPM: sptool: Introduce tool to package SP and RD
This tool packages Secure Partitions and Resource Descriptor blobs into
a simple file that can be loaded by SPM.
Change-Id: If3800064f30bdc3d7fc6a15ffbb3007ef632bcaa
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Tue, 30 Oct 2018 11:54:20 +0000 (11:54 +0000)]
SPM: Remove SP memory mappings definitions
This information is retrieved from the resource description now.
Change-Id: Iaae23945eb2c45305cdc6442853e42f4e04fe094
Co-authored-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Tue, 30 Oct 2018 11:52:45 +0000 (11:52 +0000)]
SPM: Deprecate boot info struct
This information is defined by the Secure Partition in the resource
description.
Change-Id: Ia7db90c5de8360a596106880d3f6a632a88d3ea8
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Tue, 30 Oct 2018 11:12:42 +0000 (11:12 +0000)]
SPM: Introduce functions to load DTB files
Introduce helpers to create resource description struct, as well as code
to load the information from DTB files.
Change-Id: I0f5bb94eb8b01c6cb53fe807a9db0c05a70d7a43
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Tue, 27 Nov 2018 09:36:22 +0000 (09:36 +0000)]
SPM: Define resource description data structures
The structures and associated definitions are in different files so that
the definitions can be used inside DTS files while the structs are
private to SPM. They follow the SPRT specification.
Change-Id: Id6a629040a086c482b9d9fa1883b8aa6bbee619f
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Tue, 30 Oct 2018 11:08:08 +0000 (11:08 +0000)]
SPM: Deprecate the current implementation
The current SPM is a prototype that only supports one secure partition
in EL0. The objective of SPM is to have multiple partitions. The current
MM interface isn't adequate for this, so it is needed to modify heavily
the code to add proper support for it.
However, there are platforms which are already using this (like SGI) and
removing the code would break it. For this reason, the current SPM code
has been duplicated in order to temporarily preserve compatibility. All
new improvements/changes to SPM will be done in the non-deprecated copy,
that may change without notice.
The new build option SPM_DEPRECATED has been introduced to select the SPM
implementation. It defaults to 1, that selects the deprecated SPM.
Change-Id: Ic9f80b53b450e97b4d3f47e4ef4a138ee8d87443
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Thu, 18 Oct 2018 13:02:39 +0000 (14:02 +0100)]
fvp: Increase stack size when SPM is enabled
Change-Id: Iec265dc85d44f35048d1fbcfbe55960d45570027
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Niño Díaz [Mon, 10 Dec 2018 14:18:23 +0000 (15:18 +0100)]
Merge pull request #1704 from marex/arm/master/memsize-passing-v1
Arm/master/memsize passing v1
Soby Mathew [Mon, 10 Dec 2018 14:00:01 +0000 (14:00 +0000)]
Merge pull request #1700 from jwerner-chromium/JW_crashfix
MULTI_CONSOLE_API fixes and cleanups
Julius Werner [Wed, 28 Nov 2018 22:00:33 +0000 (14:00 -0800)]
maintainers: Add Julius Werner for coreboot and console API
I wrote most of this code and have a vested interest in keeping it
healthy, so adding myself as a maintainer.
Change-Id: I0edeebbc8336b6976dfaf393b3cfc7bc94089ac6
Signed-off-by: Julius Werner <jwerner@chromium.org>
Julius Werner [Wed, 28 Nov 2018 06:10:56 +0000 (22:10 -0800)]
drivers/console: Reimplement MUTLI_CONSOLE_API framework in C
Now that we have switched to using the stack in MULTI_CONSOLE_API
framework functions and have factored all code involved in crash
reporting out into a separate file, there's really no reason to keep the
main framework code in assembly anymore. This patch rewrites it in C
which allows us to have a single implementation across aarch32/64 and
should be much easier to maintain going forward.
Change-Id: I6c85a01e89a79e8b233f3f8bee812f0dbd026221
Signed-off-by: Julius Werner <jwerner@chromium.org>
Julius Werner [Wed, 28 Nov 2018 01:50:28 +0000 (17:50 -0800)]
drivers/console: Link console framework code by default
This patch makes the build system link the console framework code by
default, like it already does with other common libraries (e.g. cache
helpers). This should not make a difference in practice since TF is
linked with --gc-sections, so the linker will garbage collect all
functions and data that are not referenced by any other code. Thus, if a
platform doesn't want to include console code for size reasons and
doesn't make any references to console functions, the code will not be
included in the final binary.
To avoid compatibility issues with older platform ports, only make this
change for the MULTI_CONSOLE_API.
Change-Id: I153a9dbe680d57aadb860d1c829759ba701130d3
Signed-off-by: Julius Werner <jwerner@chromium.org>
Julius Werner [Tue, 4 Dec 2018 01:01:30 +0000 (17:01 -0800)]
console: Fix console_unregister() signature
console_unregister() has always returned a pointer to the console that
was removed on success, not just an integer. Fix the C prototype to
match the assembly implementation.
Change-Id: Iafc43de0767a5c87c9ae5c3aba53761dd28d51e6
Signed-off-by: Julius Werner <jwerner@chromium.org>
Julius Werner [Mon, 19 Nov 2018 22:25:55 +0000 (14:25 -0800)]
plat/common/crash_console_helpers.S: Fix MULTI_CONSOLE_API support
Crash reporting via the default consoles registered by MULTI_CONSOLE_API
has been broken since commit
d35cc34 (Console: Use callee-saved
registers), which was introduced to allow console drivers written in C.
It's not really possible with the current crash reporting framework to
support console drivers in C, however we should make sure that the
existing assembly drivers that do support crash reporting continue to
work through the MULTI_CONSOLE_API.
This patch fixes the problem by creating custom console_putc() and
console_flush() implementations for the crash reporting case that do not
use the stack. Platforms that want to use this feature will have to link
plat/common/aarch64/crash_console_helpers.S explicitly.
Also update the documentation to better reflect the new reality (of this
being an option rather than the expected default for most platforms).
Change-Id: Id0c761e5e2fddaf25c277bc7b8ab603946ca73cb
Signed-off-by: Julius Werner <jwerner@chromium.org>
Julius Werner [Tue, 20 Nov 2018 21:02:27 +0000 (13:02 -0800)]
plat/common: Remove duplication of plat_crash_console functions/stubs
Commit
e74afb652 (Deprecate weak crash console functions) deprecated the
default inclusion of weak definitions for plat_crash_console functions
in plat/common/aarch64/platform_helpers.S. The code was later copied out
to plat/common/aarch64/crash_console_helpers.S so platforms can link it
explicitly if they want to. However, since deprecation does not mean
removal, the same code is also still duplicated in platform_helpers.S.
The duplicated code contains both empty stubs for the !MULTI_CONSOLE_API
case, and a real implementation that used to work but was broken by
commit
d35cc34 (Console: Use callee-saved registers) for
MULTI_CONSOLE_API. It's not great to have both of these duplicated in
two files, so this patch splits them up: in platform_helpers.S we'll
only keep the empty stubs (guarded by !ERROR_DEPRECATED), which should
not regress functionality since the MULTI_CONSOLE_API implementation was
already broken anyway. In crash_console_helpers.S, we'll only keep the
MULTI_CONSOLE_API version, which is enough both as an implementation in
itself and as a sample for how to reimplement these functions in a
platform-specific file.
Change-Id: I83d95a90ab6aac597dc2ea2f2797ac2c8ed075d4
Signed-off-by: Julius Werner <jwerner@chromium.org>
Soby Mathew [Thu, 6 Dec 2018 15:07:44 +0000 (15:07 +0000)]
Merge pull request #1713 from chandnich/nt-fw-config
plat/arm/sgi: Use NT_FW_CONFIG instead of HW_CONFIG
Soby Mathew [Thu, 6 Dec 2018 11:13:38 +0000 (11:13 +0000)]
Merge pull request #1710 from soby-mathew/sm/smc_save_x0_x3
BL31: Use helper function to save registers in SMC handler
Antonio Niño Díaz [Thu, 6 Dec 2018 10:29:29 +0000 (11:29 +0100)]
Merge pull request #1709 from joannafarley-arm/jf/copyrights-updates
Change copyright guidelines
Antonio Niño Díaz [Thu, 6 Dec 2018 10:28:53 +0000 (11:28 +0100)]
Merge pull request #1706 from Yann-lms/mmc_init_check
MMC init check and STM32MP1 MMC driver improvements
Marek Vasut [Thu, 11 Oct 2018 14:53:58 +0000 (16:53 +0200)]
plat: rcar: Generate FCNL reserved memory node
Generate a /reserved-memory node for FCNL in the DT passed to
subsequent stages, so they will know how the FCNL is configured.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Thu, 11 Oct 2018 14:15:41 +0000 (16:15 +0200)]
plat: rcar: Generate platform compatible string
Generate /compatible string for the platform, so that the subsequent
stages know which platform they are running on. This could be useful
when ie. building U-Boot that contains DTs for multiple platforms and
can thus decide on which platform it is running. This would ultimately
allow single bootloader binary for all Gen3 platforms.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Tue, 2 Oct 2018 18:45:18 +0000 (20:45 +0200)]
plat: rcar: Pass DTB with DRAM layout from BL2 to next stages
Pass DTB containing DRAM layout from BL2 to BL33 via register x3, so
that the BL33 can simply consume it and get accurate DRAM layout info.
BL33 is in most usecases U-Boot.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Tue, 2 Oct 2018 18:43:09 +0000 (20:43 +0200)]
plat: rcar: Use array in the DRAM size reporting
Use array of start-size tuples for the DRAM banks and call single
function which iterates over this array to report the DRAM info.
This is in preparation for expanding this to generate FDT for the
next stage.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Tue, 2 Oct 2018 13:12:15 +0000 (15:12 +0200)]
plat: rcar: Print DRAM configuration after init
Print the DRAM configuration only after the DRAM was initialized. This
will be useful when deduplicating code populating FDT passed to U-Boot,
since it will contain the same macros as bl2_advertise_dram_size().
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Tue, 2 Oct 2018 13:09:04 +0000 (15:09 +0200)]
plat: rcar: Fill in memory information for M3W, M3N
Make the DRAM configuration debug print consistent for all supported SoCs.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Tue, 2 Oct 2018 12:53:27 +0000 (14:53 +0200)]
plat: rcar: Drop H3 v3.0 check on DRAM debug print
There is nothing preventing H3 older than v3.0 from printing the
DRAM configuration, just like v3.0 and newer. Drop the check and
let all H3 revisions print DRAM configuration in BL2.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Tue, 2 Oct 2018 11:51:19 +0000 (13:51 +0200)]
plat: rcar: Add E3 1GBx4 debug print
RCAR_DRAM_DDR3L_MEMCONF = 2 means E3 with 1GBx4 memory configuration.
Add debug print for this configuration for completeness sake.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Tue, 2 Oct 2018 11:33:32 +0000 (13:33 +0200)]
plat: rcar: Move DRAM layout print to separate function
Just move the DRAM layout information into separate function,
no functional change.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Chandni Cherukuri [Wed, 28 Nov 2018 05:56:19 +0000 (11:26 +0530)]
plat/arm/sgi: Use NT_FW_CONFIG instead of HW_CONFIG
With the two new APIs 'plat_arm_sgi_get_platform_id' and
'plat_arm_sgi_get_config_id' that are available now, BL31 need not
depend on hw_config device tree to identify the platform. In addition
to this, the existing hardware description in hw_config can be limited
to use by BL33 and not by the operating system.
So the hardware description from hw_config dts can be moved into
nt_fw_config dts and the use of hw_config dts can be removed.
Change-Id: I873b7e1e72823d3ec5d253a848e85ae724f09e49
Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
Antonio Niño Díaz [Wed, 5 Dec 2018 11:24:01 +0000 (12:24 +0100)]
Merge pull request #1711 from antonio-nino-diaz-arm/an/fix-imx
tzc380: Fix some asserts
Antonio Nino Diaz [Wed, 5 Dec 2018 11:01:17 +0000 (11:01 +0000)]
tzc380: Fix some asserts
This driver can be compiled in release builds, but GCC generates warnings
for some comparisons and that prevents the firmware from being built in
debug builds.
Change-Id: Ic52e1b4a11896ecf086864fbe2b5bfc143ec9b1b
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Soby Mathew [Fri, 16 Nov 2018 15:43:34 +0000 (15:43 +0000)]
BL31: Use helper function to save registers in SMC handler
Use the helper function `save_gp_registers` to save the register
state to cpu_context on entry to EL3 in SMC handler. This has the
effect of saving x0 - x3 as well into the cpu_context which was
not done previously but it unifies the register save sequence
in BL31.
Change-Id: I5753c942263a5f9178deda3dba896e3220f3dd83
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Antonio Niño Díaz [Wed, 5 Dec 2018 10:22:55 +0000 (11:22 +0100)]
Merge pull request #1653 from JackyBai/master
Add NXP i.MX8MQ basic support
Joanna Farley [Tue, 13 Nov 2018 10:52:12 +0000 (10:52 +0000)]
Change copyright guidelines
Copyright guidance has been changed for migration of the
ARM run project to trustedfirmware.org where the project
governance is different.
Change-Id: I059177453fb357843eced93c2a55b3705a379683
Signed-off-by: Joanna Farley <joanna.farley@arm.com>
Bai Ping [Sat, 27 Oct 2018 16:12:34 +0000 (00:12 +0800)]
plat: imx: Add i.MX8MQ basic support
i.MX8MQ is new SOC of NXP's i.MX8M family based on
A53. It can provide industry-leading audio, voice
and video processing for applications that scale
from consumer home audio to industrial building
automation and mobile computers
this patchset add the basic supoort to boot up
the 4 X A53. more feature will be added later.
Signed-off-by: Bai Ping <ping.bai@nxp.com>
Antonio Niño Díaz [Tue, 4 Dec 2018 16:19:50 +0000 (17:19 +0100)]
Merge pull request #1703 from oscardagrach/hikey960-dmac-fix
hikey960: initialize EDMAC and channels
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>
Peng Fan [Wed, 5 Jul 2017 08:34:37 +0000 (16:34 +0800)]
drivers: add tzc380 support
Add tzc380 support.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Bai Ping <ping.bai@nxp.com>
Yann Gautier [Fri, 30 Nov 2018 14:22:11 +0000 (15:22 +0100)]
drivers: st: mmc: improve error cases in send_cmd function
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Yann Gautier [Thu, 29 Nov 2018 14:44:04 +0000 (15:44 +0100)]
stm32mp: check stm32_sdmmc2_mmc_init return
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Yann Gautier [Thu, 29 Nov 2018 14:43:37 +0000 (15:43 +0100)]
drivers: mmc: check mmc_reset_to_idle return
Signed-off-by: Yann Gautier <yann.gautier@st.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'
Ryan Grachek [Thu, 29 Nov 2018 18:45:55 +0000 (12:45 -0600)]
hikey960: initialize EDMAC and channels
This is needed to utilize the DMA controller on the hikey960
Signed-off-by: Ryan Grachek <ryan@edited.us>
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>