Haojian Zhuang [Sat, 14 Sep 2019 10:43:51 +0000 (18:43 +0800)]
hikey960: fix to load FIP by partition table
Avoid to load FIP by hacking address. Load it by partition table instead.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Change-Id: Ib476d024a51e4b9705441a0007d78f9fdf0ca078
Haojian Zhuang [Sat, 14 Sep 2019 10:01:16 +0000 (18:01 +0800)]
drivers: partition: support different block size
The block size of some storage device is 4096-byte long, such as UFS. But
PARTITION_BLOCK_SIZE is defined as 512-byte long. So replace it by
PLAT_PARTITION_BLOCK_SIZE. Make it configurable in platform.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Change-Id: Iada05f7c646d0a0f2c0d3b8545540b3cb7153de3
Soby Mathew [Fri, 13 Sep 2019 15:22:23 +0000 (15:22 +0000)]
Merge "Refactor ARMv8.3 Pointer Authentication support code" into integration
Soby Mathew [Fri, 13 Sep 2019 14:19:37 +0000 (14:19 +0000)]
Merge "Add Linux DTS files for 32 bit threaded FVPs" into integration
Soby Mathew [Fri, 13 Sep 2019 14:18:36 +0000 (14:18 +0000)]
Merge "Modify FVP makefile for cores that support both AArch64/32" into integration
Soby Mathew [Fri, 13 Sep 2019 14:17:26 +0000 (14:17 +0000)]
Merge "amlogic: console: Move console driver to common directory" into integration
Alexei Fedorov [Fri, 13 Sep 2019 13:11:59 +0000 (14:11 +0100)]
Refactor ARMv8.3 Pointer Authentication support code
This patch provides the following features and makes modifications
listed below:
- Individual APIAKey key generation for each CPU.
- New key generation on every BL31 warm boot and TSP CPU On event.
- Per-CPU storage of APIAKey added in percpu_data[]
of cpu_data structure.
- `plat_init_apiakey()` function replaced with `plat_init_apkey()`
which returns 128-bit value and uses Generic timer physical counter
value to increase the randomness of the generated key.
The new function can be used for generation of all ARMv8.3-PAuth keys
- ARMv8.3-PAuth specific code placed in `lib\extensions\pauth`.
- New `pauth_init_enable_el1()` and `pauth_init_enable_el3()` functions
generate, program and enable APIAKey_EL1 for EL1 and EL3 respectively;
pauth_disable_el1()` and `pauth_disable_el3()` functions disable
PAuth for EL1 and EL3 respectively;
`pauth_load_bl31_apiakey()` loads saved per-CPU APIAKey_EL1 from
cpu-data structure.
- Combined `save_gp_pauth_registers()` function replaces calls to
`save_gp_registers()` and `pauth_context_save()`;
`restore_gp_pauth_registers()` replaces `pauth_context_restore()`
and `restore_gp_registers()` calls.
- `restore_gp_registers_eret()` function removed with corresponding
code placed in `el3_exit()`.
- Fixed the issue when `pauth_t pauth_ctx` structure allocated space
for 12 uint64_t PAuth registers instead of 10 by removal of macro
CTX_PACGAKEY_END from `include/lib/el3_runtime/aarch64/context.h`
and assigning its value to CTX_PAUTH_REGS_END.
- Use of MODE_SP_ELX and MODE_SP_EL0 macro definitions
in `msr spsel` instruction instead of hard-coded values.
- Changes in documentation related to ARMv8.3-PAuth and ARMv8.5-BTI.
Change-Id: Id18b81cc46f52a783a7e6a09b9f149b6ce803211
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Soby Mathew [Fri, 13 Sep 2019 12:09:21 +0000 (12:09 +0000)]
Merge "stm32mp1: manage CONSOLE_FLAG_TRANSLATE_CRLF and cleanup driver" into integration
Soby Mathew [Fri, 13 Sep 2019 12:02:11 +0000 (12:02 +0000)]
Merge "Assert if power level value greater then PSCI_INVALID_PWR_LVL" into integration
Soby Mathew [Fri, 13 Sep 2019 12:00:59 +0000 (12:00 +0000)]
Merge changes from topic "jc/rsa-pkcs" into integration
* changes:
Remove RSA PKCS#1 v1.5 support from cert_tool
Add documentation for new KEY_SIZE option
Add cert_create tool support for RSA key sizes
Support larger RSA key sizes when using MBEDTLS
Soby Mathew [Fri, 13 Sep 2019 11:51:49 +0000 (11:51 +0000)]
Merge changes I08cf22df,I535ee414,Ie84cfc96,I8c35ce4e,If7649764, ... into integration
* changes:
mediatek: mt8183: Support coreboot configuration
mediatek: mt8183: support system reset
mediatek: mt8183: pass platform parameters
mediatek: mt8183: add GPIO driver
mediatek: mt8183: support system off
mediatek: mt8183: support CPU hotplug
mediatek: mt8183: refine GIC driver
Soby Mathew [Fri, 13 Sep 2019 11:35:56 +0000 (11:35 +0000)]
Merge "Unify type of "cpu_idx" across PSCI module." into integration
Sandrine Bailleux [Fri, 13 Sep 2019 07:03:01 +0000 (07:03 +0000)]
Merge "mediatek: mt8173: apply MULTI_CONSOLE framework" into integration
Deepika Bhavnani [Mon, 26 Aug 2019 21:32:24 +0000 (00:32 +0300)]
Unify type of "cpu_idx" across PSCI module.
cpu_idx is used as mix of `unsigned int` and `signed int` in code
with typecasting at some places. This change is to unify the
cpu_idx as `unsigned int` as underlying API;s `plat_my_core_pos`
returns `unsigned int`
It was discovered via coverity issue CID 354715
Signed-off-by: Deepika Bhavnani <deepika.bhavnani@arm.com>
Change-Id: I4f0adb0c596ff1177210c5fe803bff853f2e54ce
Carlo Caione [Thu, 5 Sep 2019 11:27:39 +0000 (12:27 +0100)]
amlogic: console: Move console driver to common directory
The code managing the console is the same for all the platforms
currently supported. Since it is unlikely to change in the future move
the code to an external file in the common directory.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I6df555ea82d483b4f08a4a1e2cb0a7488fbaa015
kenny liang [Thu, 2 May 2019 12:33:58 +0000 (20:33 +0800)]
mediatek: mt8173: apply MULTI_CONSOLE framework
- Switch uart driver from Mediatek 8250 to TI 16550
- Enable MULTI_CONSOLE
Signed-off-by: kenny liang <kenny.liang@mediatek.com>
Change-Id: Ie3948d9e64d05d29a1f69592792e277b680c4ed4
Soby Mathew [Thu, 12 Sep 2019 16:14:36 +0000 (16:14 +0000)]
Merge "Add python configuration for editorconfig" into integration
Soby Mathew [Thu, 12 Sep 2019 16:10:29 +0000 (16:10 +0000)]
Merge "Tegra: memctrl_v2: fix "overflow before widen" coverity issue" into integration
Soby Mathew [Thu, 12 Sep 2019 16:09:56 +0000 (16:09 +0000)]
Merge "Invalidate dcache build option for bl2 entry at EL3" into integration
Justin Chadwell [Mon, 9 Sep 2019 14:24:31 +0000 (15:24 +0100)]
Remove RSA PKCS#1 v1.5 support from cert_tool
Support for PKCS#1 v1.5 was deprecated in SHA
1001202 and fully removed
in SHA
fe199e3, however, cert_tool is still able to generate
certificates in that form. This patch fully removes the ability for
cert_tool to generate these certificates.
Additionally, this patch also fixes a bug where the issuing certificate
was a RSA and the issued certificate was EcDSA. In this case, the issued
certificate would be signed using PKCS#1 v1.5 instead of RSAPSS per
PKCS#1 v2.1, preventing TF-A from verifying the image signatures. Now
that PKCS#1 v1.5 support is removed, all certificates that are signed
with RSA now use the more modern padding scheme.
Change-Id: Id87d7d915be594a1876a73080528d968e65c4e9a
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
Justin Chadwell [Mon, 29 Jul 2019 16:18:21 +0000 (17:18 +0100)]
Add documentation for new KEY_SIZE option
This patch adds documentation for the new KEY_SIZE build option that is
exposed by cert_create, and instructions on how to use it.
Change-Id: I09b9b052bfdeeaca837e0f0026e2b01144f2472c
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
Justin Chadwell [Mon, 29 Jul 2019 16:13:45 +0000 (17:13 +0100)]
Add cert_create tool support for RSA key sizes
cert_tool is now able to accept a command line option for specifying the
key size. It now supports the following options: 1024, 2048 (default),
3072 and 4096. This is also modifiable by TFA using the build flag
KEY_SIZE.
Change-Id: Ifadecf84ade3763249ee8cc7123a8178f606f0e5
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
Justin Chadwell [Mon, 29 Jul 2019 16:13:10 +0000 (17:13 +0100)]
Support larger RSA key sizes when using MBEDTLS
Previously, TF-A could not support large RSA key sizes as the
configuration options passed to MBEDTLS prevented storing and performing
calculations with the larger, higher-precision numbers required. With
these changes to the arguments passed to MBEDTLS, TF-A now supports
using 3072 (3K) and 4096 (4K) keys in certificates.
Change-Id: Ib73a6773145d2faa25c28d04f9a42e86f2fd555f
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
Hadi Asyrafi [Tue, 20 Aug 2019 07:33:27 +0000 (15:33 +0800)]
Invalidate dcache build option for bl2 entry at EL3
Some of the platform (ie. Agilex) make use of CCU IPs which will only be
initialized during bl2_el3_early_platform_setup. Any operation to the
cache beforehand will crash the platform. Hence, this will provide an
option to skip the data cache invalidation upon bl2 entry at EL3
Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I2c924ed0589a72d0034714c31be8fe57237d1f06
Soby Mathew [Thu, 12 Sep 2019 12:34:27 +0000 (12:34 +0000)]
Merge "libc: fix sparse warning for __assert()" into integration
Soby Mathew [Thu, 12 Sep 2019 12:33:20 +0000 (12:33 +0000)]
Merge "doc: Updated user guide with new Mbed TLS version number" into integration
Soby Mathew [Thu, 12 Sep 2019 12:33:02 +0000 (12:33 +0000)]
Merge "intel: agilex: Fix psci power domain off" into integration
Soby Mathew [Thu, 12 Sep 2019 12:31:22 +0000 (12:31 +0000)]
Merge changes from topic "jc/mte_enable" into integration
* changes:
Add documentation for CTX_INCLUDE_MTE_REGS
Enable MTE support in both secure and non-secure worlds
Soby Mathew [Thu, 12 Sep 2019 12:29:46 +0000 (12:29 +0000)]
Merge "plat: xilinx: zynqmp: Initialize IPI table from zynqmp_config_setup()" into integration
Soby Mathew [Thu, 12 Sep 2019 11:38:42 +0000 (11:38 +0000)]
Merge "Zeus: apply the MSR SSBS instruction" into integration
Soby Mathew [Thu, 12 Sep 2019 11:14:21 +0000 (11:14 +0000)]
Merge "Add UBSAN support and handlers" into integration
Soby Mathew [Thu, 12 Sep 2019 11:11:34 +0000 (11:11 +0000)]
Merge changes I072c0f61,I798401f4,I9648ef55,I7225d9fa,Ife682288, ... into integration
* changes:
rcar_gen3: drivers: ddr_b: Update DDR setting for H3, M3, M3N
rcar_gen3: drivers: qos: update QoS setting
rcar_gen3: drivers: ddr_b: Fix checkpatch errors in headers
rcar_gen3: drivers: ddr_b: Fix line-over-80s
rcar_gen3: drivers: ddr_b: Further checkpatch cleanups
rcar_gen3: drivers: ddr_b: Clean up camel case
rcar_get3: drivers: ddr_b: Basic checkpatch fixes
rcar_get3: drivers: ddr: Partly unify register macros between DDR A and B
rcar_get3: drivers: ddr: Clean up common code
Soby Mathew [Thu, 12 Sep 2019 10:58:43 +0000 (10:58 +0000)]
Merge changes from topic "amlogic-refactoring" into integration
* changes:
amlogic: Fix includes order
amlogic: Fix header guards
amlogic: Fix prefixes in the SoC specific files
amlogic: Fix prefixes in the PM code
amlogic: Fix prefixes in the SCPI related code
amlogic: Fix prefixes in the MHU code
amlogic: Fix prefixes in the SIP/SVC code
amlogic: Fix prefixes in the thermal driver
amlogic: Fix prefixes in the private header file
amlogic: Fix prefixes in the efuse driver
amlogic: Fix prefixes in the platform macros file
amlogic: Fix prefixes in the helpers file
amlogic: Rework Makefiles
amlogic: Move the SIP SVC code to common directory
amlogic: Move topology file to common directory
amlogic: Move thermal code to common directory
amlogic: Move MHU code to common directory
amlogic: Move efuse code to common directory
amlogic: Move platform macros assembly file to common directory
amlogic: Introduce unified private header file
amlogic: Move SCPI code to common directory
amlogic: Move the SHA256 DMA driver to common directory
amlogic: Move assembly helpers to common directory
amlogic: Introduce directory parameters in the makefiles
meson: Rename platform directory to amlogic
Hadi Asyrafi [Thu, 12 Sep 2019 07:14:01 +0000 (15:14 +0800)]
intel: agilex: Fix psci power domain off
Disable gic cpu interface for powered down cpu. This patch also removes
core reset during power off as core reset will be done during power on
Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I2ca96d876b6e71e56d24a9a7e184b6d6226b8673
Carlo Caione [Tue, 3 Sep 2019 11:38:58 +0000 (12:38 +0100)]
amlogic: Fix includes order
As part of the code refactoring fix the order of the include files
across all the source files.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Ice72f687cc26ee881a9051168149467688100cfb
Carlo Caione [Wed, 28 Aug 2019 09:14:46 +0000 (10:14 +0100)]
amlogic: Fix header guards
Make the header guards more generic and contextually remove the
GXBB_BL31_PLAT_PARAM_VAL value that is unused on the GXL platform.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I842fa2e084e71280ae17b39c67877e844821a171
Soby Mathew [Wed, 11 Sep 2019 16:21:29 +0000 (16:21 +0000)]
Merge "mbedtls: use #include <...> instead of "..."" into integration
John Tsichritzis [Tue, 13 Aug 2019 09:11:41 +0000 (10:11 +0100)]
Modify FVP makefile for cores that support both AArch64/32
Some cores support only AArch64 from EL1 and above, e.g. A76, N1 etc. If
TF-A is compiled with CTX_INCLUDE_AARCH32_REGS=0 so as to properly
handle those cores, only the AArch64 cores' assembly is included in the
TF-A binary. In other words, for FVP, TF-A assumes that AArch64 only
cores will never exist in the same cluster with cores that also support
AArch32.
However, A55 and A75 can be used as AArch64 only cores, despite
supporting AArch32, too. This patch enables A55 and A75 to exist in
clusters together with AArch64 cores.
Change-Id: I58750ad6c3d76ce77eb354784c2a42f2c179031d
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
John Tsichritzis [Tue, 13 Aug 2019 09:28:25 +0000 (10:28 +0100)]
Zeus: apply the MSR SSBS instruction
Zeus supports the SSBS mechanism and also the new MSR instruction to
immediately apply the mitigation. Hence, the new instruction is utilised
in the Zeus-specific reset function.
Change-Id: I962747c28afe85a15207a0eba4146f9a115b27e7
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
Justin Chadwell [Tue, 20 Aug 2019 10:01:52 +0000 (11:01 +0100)]
Add UBSAN support and handlers
This patch adds support for the Undefined Behaviour sanitizer. There are
two types of support offered - minimalistic trapping support which
essentially immediately crashes on undefined behaviour and full support
with full debug messages.
The full support relies on ubsan.c which has been adapted from code used
by OPTEE.
Change-Id: I417c810f4fc43dcb56db6a6a555bfd0b38440727
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
Masahiro Yamada [Fri, 26 Jul 2019 11:21:39 +0000 (20:21 +0900)]
libc: fix sparse warning for __assert()
Sparse warns this:
lib/libc/assert.c:29:6: error: symbol '__assert' redeclared with different type (originally declared at include/lib/libc/assert.h:36) - different modifiers
Add __dead2 to match the header declaration and C definition.
I also changed '__dead2 void' to 'void __dead2' for the consistency
with other parts.
Change-Id: Iefa4f0e787c24fa7e7e499d2e7baf54d4deb49ef
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Jolly Shah [Tue, 27 Aug 2019 18:23:08 +0000 (11:23 -0700)]
plat: xilinx: zynqmp: Initialize IPI table from zynqmp_config_setup()
Common ipi_table needs to be initialized before using any
IPI command (i.e send/receive). Move zynqmp ipi config table
initialization from sip_svc_setup() to zynqmp_config_setup().
Change-Id: Ic8aaa0728a43936cd4c6e1ed590e01ba8f0fbf5b
Signed-off-by: Tejas Patel <tejas.patel@xilinx.com>
Signed-off-by: Jolly Shah <jolly.shah@xilinx.com>
Yann Gautier [Wed, 4 Sep 2019 09:55:10 +0000 (11:55 +0200)]
stm32mp1: manage CONSOLE_FLAG_TRANSLATE_CRLF and cleanup driver
The STM32 console driver was pre-pending '\r' before '\n'.
It is now managed by the framework with the flag:
CONSOLE_FLAG_TRANSLATE_CRLF.
Remove the code in driver, and add the flag for STM32MP1.
Change-Id: I5d0d5d5c4abee0b7dc11c2f8707b1b5cf10149ab
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Soby Mathew [Tue, 10 Sep 2019 14:32:59 +0000 (14:32 +0000)]
Merge changes from topic "yg/stm32mp1_wdg_updates" into integration
* changes:
mmc: stm32_sdmmc2: correctly manage block size
mmc: stm32_sdmmc2: manage max-frequency property from DT
stm32mp1: move check_header() to common code
stm32mp1: keep console during runtime
stm32mp1: sp_min: initialize MMU and cache earlier
stm32mp1: add support for LpDDR3
stm32mp1: use a common function to check spinlock is available
clk: stm32mp: enable RTCAPB clock for dual-core chips
stm32mp1: check if the SoC is single core
stm32mp1: print information about board
stm32mp1: print information about SoC
stm32mp1: add watchdog support
Justin Chadwell [Tue, 27 Aug 2019 08:43:47 +0000 (09:43 +0100)]
Add python configuration for editorconfig
As it currently is, python files are formatted using the general rules
in .editorconfig - this means that 8-character hard tabs are used, which
is not the recommended behaviour according to the PEP-8 standard. This
patch correct this, and additionally limits the line length to 79
characters as required by the standard.
Change-Id: I3b5c0aff12034c4184d4555aab36490cdb3885da
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
Hung-Te Lin [Thu, 2 May 2019 13:42:41 +0000 (21:42 +0800)]
mediatek: mt8183: Support coreboot configuration
When built for coreboot, we want to enable coreboot library to have
better integration. For example, serial console should be initialized by
coreboot_serial instead of hard-coded values.
Most coreboot configuration will enable memory console, which needs
larger XLAT_TABLES so MAX_XLAT_TABLES is increased; and to support that,
TZRAM_SIZE also need to be enlarged.
Change-Id: I08cf22df2fa26e48284e323d22ad8ce73a6ea803
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
kenny liang [Fri, 3 May 2019 09:02:46 +0000 (17:02 +0800)]
mediatek: mt8183: support system reset
Implement system reset handler.
Change-Id: I535ee414616dde8d2b59dec5a723a540a3a1341d
Signed-off-by: kenny liang <kenny.liang@mediatek.com>
kenny liang [Fri, 3 May 2019 08:59:07 +0000 (16:59 +0800)]
mediatek: mt8183: pass platform parameters
Add plat parameter structs to support BL2 to pass
variable-length, variable-type parameters to BL31.
The parameters are structured as a link list.
During BL31 setup time, we traverse the list to process
each parameter.
Signed-off-by: kenny liang <kenny.liang@mediatek.com>
Change-Id: Ie84cfc9606656fb1d2780a68cadf27e09afa6628
kenny liang [Thu, 2 May 2019 12:24:50 +0000 (20:24 +0800)]
mediatek: mt8183: add GPIO driver
Add GPIO driver.
Change-Id: I8c35ce4ea247f3726081b0bbb95f0930c2b82517
Signed-off-by: kenny liang <kenny.liang@mediatek.com>
kenny liang [Thu, 2 May 2019 12:02:05 +0000 (20:02 +0800)]
mediatek: mt8183: support system off
- Add PMIC driver
- Add RTC drvier
- Refactor PMIC and RTC to mediatek/common
- Implement system off handler
Change-Id: If76497646ace1b78bc9a5fa0110b652fe512281a
Signed-off-by: kenny liang <kenny.liang@mediatek.com>
kenny liang [Thu, 2 May 2019 11:29:25 +0000 (19:29 +0800)]
mediatek: mt8183: support CPU hotplug
- Add DCM driver
- Add SPMC driver
- Implement core and cluster power on/off handlers
Change-Id: I902002f8ea6f98fd73bf259188162b10d3939c72
Signed-off-by: kenny liang <kenny.liang@mediatek.com>
kenny liang [Tue, 25 Jun 2019 07:33:48 +0000 (15:33 +0800)]
mediatek: mt8183: refine GIC driver
Refine MTK GIC driver.
Remove unused codes.
Signed-off-by: kenny liang <kenny.liang@mediatek.com>
Change-Id: I39e05ce7aa3c257e237fbc8e661cdde65cbcec7c
Deepika Bhavnani [Fri, 16 Aug 2019 22:10:02 +0000 (01:10 +0300)]
Assert if power level value greater then PSCI_INVALID_PWR_LVL
Signed-off-by: Deepika Bhavnani <deepika.bhavnani@arm.com>
Change-Id: I4a496d5a8e7a9a127cd6224c968539eb74932fca
Justin Chadwell [Thu, 18 Jul 2019 15:16:32 +0000 (16:16 +0100)]
Add documentation for CTX_INCLUDE_MTE_REGS
A new build flag, CTX_INCLUDE_MTE_REGS, has been added; this patch adds
documentation for it in the User Guide along with instructions of what
different values mean.
Change-Id: I430a9c6ced06b1b6be317edbeff4f5530e30f63a
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
Justin Chadwell [Thu, 18 Jul 2019 13:25:33 +0000 (14:25 +0100)]
Enable MTE support in both secure and non-secure worlds
This patch adds support for the new Memory Tagging Extension arriving in
ARMv8.5. MTE support is now enabled by default on systems that support
at EL0. To enable it at ELx for both the non-secure and the secure
world, the compiler flag CTX_INCLUDE_MTE_REGS includes register saving
and restoring when necessary in order to prevent register leakage
between the worlds.
Change-Id: I2d4ea993d6b11654ea0d4757d00ca20d23acf36c
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
Imre Kis [Thu, 8 Aug 2019 17:06:12 +0000 (19:06 +0200)]
Add Linux DTS files for 32 bit threaded FVPs
RevC models have the MT bit set and the affinities shifted in the MPIDR
register. To make the Linux able to boot all CPUs it needs a modified
DTS file containing the shifted affinity values.
Beside these values the DTS files should be the same so the common part
was moved into a new file which is included in the DTS files with
shifted and non-shifted affinities.
The same setup already exists for 64 bit systems.
Signed-off-by: Imre Kis <imre.kis@arm.com>
Change-Id: I90f7b9c8d8a24c9b3f97232441dbe0a29aa8976d
Varun Wadekar [Thu, 5 Sep 2019 15:17:02 +0000 (08:17 -0700)]
Tegra: memctrl_v2: fix "overflow before widen" coverity issue
This patch fixes a coding error, where the size of the protected memory area
was truncated due to an incorrect typecast.
This defect was found by coverity and reported as CID 336781.
Change-Id: I41878b0a9a5e5cd78ef3393fdc7b9ea7f7403ed3
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Carlo Caione [Wed, 28 Aug 2019 14:32:22 +0000 (15:32 +0100)]
amlogic: Fix prefixes in the SoC specific files
Remove the GXBB prefix where needed and add SoC specific prefixes for
GXBB/GXL.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Ic3eb3a77ca2d9c779a9dee5cee786e9c16ecdb27
Carlo Caione [Wed, 28 Aug 2019 14:19:56 +0000 (15:19 +0100)]
amlogic: Fix prefixes in the PM code
Remove the GXBB prefix from the code in the common directory and add
SoC-specific prefixes in the SoC specific code.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Ic983ef70b0ef23f95088dd8df488d8c42c3bc030
Carlo Caione [Wed, 28 Aug 2019 09:08:24 +0000 (10:08 +0100)]
amlogic: Fix prefixes in the SCPI related code
Add a new aml_* prefix to the SCPI related function calls.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I697812ac1c0df28cbb639a1dc3e838f1107fb739
Carlo Caione [Wed, 28 Aug 2019 08:46:18 +0000 (09:46 +0100)]
amlogic: Fix prefixes in the MHU code
Make the MHU code AML specific adding a new aml_* prefix and remove the
GXBB prefix from the register names.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I8f20918e29f08542bd71bd679f88e65b4efaa7d2
Carlo Caione [Mon, 26 Aug 2019 12:04:12 +0000 (13:04 +0100)]
amlogic: Fix prefixes in the SIP/SVC code
All the SIP/SVC related code is currently the same between GXL and GXBB.
Rename function names and register names to avoid hardcoding the GXBB
prefix.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I7e58ab68489df8d4762663fc01fb64e6899cc8bf
Carlo Caione [Sun, 25 Aug 2019 17:09:59 +0000 (18:09 +0100)]
amlogic: Fix prefixes in the thermal driver
No need to have a special SoC-specific prefix.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I0da543e7d92d56604e79440a98027ffd9a2eaa59
Carlo Caione [Sun, 25 Aug 2019 17:09:03 +0000 (18:09 +0100)]
amlogic: Fix prefixes in the private header file
The header file is shared between all the SoCs. Better avoiding
hardcoding the SoC name in the function names.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I9074871bd1ed8a702c1a656e0f50f2d3c6cb0425
Carlo Caione [Sun, 25 Aug 2019 16:26:27 +0000 (17:26 +0100)]
amlogic: Fix prefixes in the efuse driver
The efuse driver is hardcoding the GXBB prefix. No need to do that since
the driver is shared between multiple SoCs.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I97691b0bbd55170d8216d301a3fc04feb8c2af2e
Carlo Caione [Sat, 24 Aug 2019 17:51:48 +0000 (18:51 +0100)]
amlogic: Fix prefixes in the platform macros file
Fixing at the same time the related register names.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Ib1130d50abe6088f1c0826878d1ae454a0f23008
Carlo Caione [Sat, 24 Aug 2019 17:47:06 +0000 (18:47 +0100)]
amlogic: Fix prefixes in the helpers file
The code is the common directory is now generic, no need to have the SoC
prefix hardcoded in the function names.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Ied3a5e506b9abd4c2d6f893bafef50019bff24f1
Carlo Caione [Sat, 24 Aug 2019 17:37:46 +0000 (18:37 +0100)]
amlogic: Rework Makefiles
Now that every piece is in place, the makefiles can be refactored and
slightly beautified removing useless and redundant parts.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: If74e1909df52d475cf4b0dfed819d07d3a4c85b9
Carlo Caione [Sat, 24 Aug 2019 16:52:40 +0000 (17:52 +0100)]
amlogic: Move the SIP SVC code to common directory
The code is the same between GXBB and GXL. Move it to the common source
directory.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I875689a6fd029971aa755fc2725217e90ed06b6c
Carlo Caione [Sat, 24 Aug 2019 16:50:16 +0000 (17:50 +0100)]
amlogic: Move topology file to common directory
As done already for multiple files, move the topology file to the common
directory.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Iaca357a089593ad58c35c05c929239132249dcda
Carlo Caione [Sat, 24 Aug 2019 16:48:11 +0000 (17:48 +0100)]
amlogic: Move thermal code to common directory
As for most of the Amlogic code, this is common between the Amlogic
SoCs. Move the code to the common directory.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Id3f0073ff1f0b9ddbe964f80303323ee4a2f27b0
Carlo Caione [Sat, 24 Aug 2019 16:46:04 +0000 (17:46 +0100)]
amlogic: Move MHU code to common directory
The MHU code is shared between all the supported platforms. Move it to
the common directory instead.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Iaf53122866eae85c13f772927d16836dcfa877a3
Carlo Caione [Sat, 24 Aug 2019 16:43:33 +0000 (17:43 +0100)]
amlogic: Move efuse code to common directory
The efuse code is the same between GXL and GXBB. Move the code to common
directory.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Ie37f21d1907a36292724f1fb645a78041fe4a6b3
Carlo Caione [Sat, 24 Aug 2019 16:36:32 +0000 (17:36 +0100)]
amlogic: Move platform macros assembly file to common directory
The platform macros are shared between all the SoCs. Move it to common
directory.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Ia04c3ffe4d7b068aa701268ed99f69995d8db92b
Carlo Caione [Sat, 24 Aug 2019 16:31:51 +0000 (17:31 +0100)]
amlogic: Introduce unified private header file
Now that also the SHA256 DMA driver is shared between all the SoCs, we
can have one single private platform header file.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I77d51915f9d8233aeceeed66ed1f491573402cfc
Carlo Caione [Sat, 24 Aug 2019 16:28:23 +0000 (17:28 +0100)]
amlogic: Move SCPI code to common directory
The SCPI code is the same between GXBB and GXL. No need to have it
replicated for each SoCs. Move it to the common directory.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I7e416caf1e9538b3ce7702c0363ee00a054e2451
Carlo Caione [Sat, 24 Aug 2019 16:17:30 +0000 (17:17 +0100)]
amlogic: Move the SHA256 DMA driver to common directory
The SHA256 DMA driver can be used by multiple SoCs. Move it to the
common directory.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I96319eeeeeebd503ef0dcb07c0e4ff6a67afeaa5
Carlo Caione [Fri, 23 Aug 2019 19:02:32 +0000 (20:02 +0100)]
amlogic: Move assembly helpers to common directory
The assembly helpers are common to all the amlogic SoCs. Move the .S
file to the common directory.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I0d8616a7ae22dbcb14848cefd0149b6bb5814ea6
Carlo Caione [Fri, 23 Aug 2019 18:34:44 +0000 (19:34 +0100)]
amlogic: Introduce directory parameters in the makefiles
Make the platform name a parameter for the source directories. Besides a
cosmetic fix, this is going to be helpful when reusing the same Makefile
for different SoCs.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: I307897a21800cca8ad68a5ab8972d27e9356ff2a
Carlo Caione [Fri, 23 Aug 2019 17:28:36 +0000 (18:28 +0100)]
meson: Rename platform directory to amlogic
Meson is the internal code name for the SoC family. The correct name for
the platform should be Amlogic. Change the name of the platform
directory.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Icc140e1ea137f12117acbf64c7dcb1a8b66b345d
Sandrine Bailleux [Thu, 5 Sep 2019 09:11:31 +0000 (09:11 +0000)]
Merge "intel: stratix10: Fix reliance on hard coded clock information" into integration
zelalem-aweke [Wed, 4 Sep 2019 21:16:51 +0000 (16:16 -0500)]
doc: Updated user guide with new Mbed TLS version number
Signed-off-by: zelalem-aweke <zelalem.aweke@arm.com>
Change-Id: Ib12ecc0b283274c74cdfa57caf9e1a105dce3afe
Masahiro Yamada [Wed, 4 Sep 2019 05:09:07 +0000 (14:09 +0900)]
mbedtls: use #include <...> instead of "..."
The #include "mbedtls/check_config.h" directive first searches for
the header in the relative path to mbedtls_config.h, i.e.
include/drivers/auth/mbedtls/mbedtls/check_config.h
Obviously, it does not exist since check_config.h is located in
the mbedtls project.
It is more sensible to use #include <...> form.
Change-Id: If72a71381f84e7748a2c9f07dd1176559d9bb1d2
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Alexei Fedorov [Tue, 3 Sep 2019 11:00:06 +0000 (11:00 +0000)]
Merge "uniphier: set CONSOLE_FLAG_TRANSLATE_CRLF and clean up console driver" into integration
Masahiro Yamada [Tue, 23 Jul 2019 03:53:41 +0000 (12:53 +0900)]
uniphier: set CONSOLE_FLAG_TRANSLATE_CRLF and clean up console driver
This console driver sends '\r' before 'n', not after.
It works, but the convention is "\r\n" (i.e. CRLF)
Instead of fixing it in the driver, set CONSOLE_FLAG_TRANSLATE_CRLF
to leave it to the framework.
Change-Id: I2154e29313739a40dff70cfb5c0f8989136d4ad2
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Yann Gautier [Tue, 11 Jun 2019 18:03:07 +0000 (20:03 +0200)]
mmc: stm32_sdmmc2: correctly manage block size
DBLOCKSIZE should be filled such as the data size is 2^DBLOCKSIZE.
Hence it is calculated with __builtin_ctz.
Change-Id: Id6b5ff9b594afc4fc523a388011beed307e6abd1
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Yann Gautier [Tue, 28 May 2019 09:54:50 +0000 (11:54 +0200)]
mmc: stm32_sdmmc2: manage max-frequency property from DT
If the max-frequency property is provided in the device tree mmc node,
it should be managed. The max allowed frequency will be the min between
this property value and what the card can support.
Change-Id: I885b676c3300d2670a0fe4c6ecab87758b5893ad
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Yann Gautier [Fri, 19 Apr 2019 08:48:36 +0000 (10:48 +0200)]
stm32mp1: move check_header() to common code
This function can be used on several stm32mp devices, it is then moved in
plat/st/common/stm32mp_common.c.
Change-Id: I862debe39604410f71a9ddc28713026362e9ecda
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Yann Gautier [Wed, 24 Apr 2019 14:14:22 +0000 (16:14 +0200)]
stm32mp1: keep console during runtime
The runtime console is only kept in DEBUG configuration.
Change-Id: I0447dfcacb9a63a12bcdab7c55584d70c3220e5b
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Yann Gautier [Thu, 11 Jul 2019 08:45:09 +0000 (10:45 +0200)]
stm32mp1: sp_min: initialize MMU and cache earlier
This change enhances performance and security in BL32 stage.
Change-Id: I64df5995fc6b04f6cf42d6a00a6d3d0f602b5407
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Yann Gautier [Tue, 16 Apr 2019 14:20:58 +0000 (16:20 +0200)]
stm32mp1: add support for LpDDR3
This change enables LpDDR3 initialization with PMIC.
Change-Id: I2409a808335dfacd69a8517cb8510cee98bb8161
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Yann Gautier [Wed, 22 May 2019 17:13:51 +0000 (19:13 +0200)]
stm32mp1: use a common function to check spinlock is available
To use spinlocks, MMU should be enabled, as well as data cache.
A common function is created (moved from clock file).
It is then used whenever a spinlock has to be taken, in BSEC and clock
drivers.
Change-Id: I94baed0114a2061ad71bd5287a91bf7f1c6821f6
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Yann Gautier [Mon, 20 May 2019 12:39:26 +0000 (14:39 +0200)]
clk: stm32mp: enable RTCAPB clock for dual-core chips
In order to correctly manage the bring-up of non boot CPUs, the RTCAPB
clock needs to be enabled.
It controls the access to backup registers, where the CPU entrypoint
will be stored.
Change-Id: Ifeeceb4faf64bc9e0778030444f437cc0bb27272
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Yann Gautier [Tue, 4 Jun 2019 16:23:10 +0000 (18:23 +0200)]
stm32mp1: check if the SoC is single core
Among the variants of STM32MP, the STM32MP151 is a single Cortex-A7 chip.
A function is added to check the part number of the SoC.
If it corresponds to STM32MP151A or STM32MP151C, then the chip has a single
Cortex-A7.
Change-Id: Icac2015c5d03ce0bcb8e99bbaf1ec8ada34be49c
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Yann Gautier [Mon, 13 May 2019 16:34:48 +0000 (18:34 +0200)]
stm32mp1: print information about board
On STMicroelectronics boards, the board information is stored in OTP.
This OTP is described in device tree, in BSEC board_id node.
Change-Id: Ieccbdcb048343680faac8dc577b75c67ac106f5b
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Yann Gautier [Tue, 4 Jun 2019 16:02:37 +0000 (18:02 +0200)]
stm32mp1: print information about SoC
This information is located in DBGMCU registers.
Change-Id: I480aa046fed9992e3d9665b1f0520bc4b6cfdf30
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Yann Gautier [Tue, 4 Jun 2019 16:06:34 +0000 (18:06 +0200)]
stm32mp1: add watchdog support
Introduce driver for STM32 IWDG peripheral (Independent Watchdog).
It is configured according to device tree content and should be enabled
from there.
The watchdog is not started by default. It can be started after an HW
reset if the dedicated OTP is fused.
The watchdog also needs to be frozen if a debugger is attached.
This is done by configuring the correct bits in DBGMCU.
This configuration is allowed by checking BSEC properties.
An increase of BL2 size is also required when adding this new code.
Change-Id: Ide7535d717885ce2f9c387cf17afd8b5607f3e7f
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Paul Beesley [Mon, 2 Sep 2019 10:22:38 +0000 (10:22 +0000)]
Merge "Added SPCI to the glossary" into integration
Paul Beesley [Thu, 29 Aug 2019 16:05:28 +0000 (16:05 +0000)]
Merge "Move assembly newline function into common debug code" into integration
Artsem Artsemenka [Thu, 29 Aug 2019 12:47:53 +0000 (13:47 +0100)]
Added SPCI to the glossary
Change-Id: I576ae161477f4a69336d15a7741e566bb103124a
Signed-off-by: Artsem Artsemenka <artsem.artsemenka@arm.com>