Commit Graph

5993 Commits

Author SHA1 Message Date
Soby Mathew 4fdad60c34 Merge "doc: Add more missing platforms" into integration 2019-10-08 12:59:24 +00:00
Soby Mathew 1d880258e1 Merge "delay: correct timeout_init_us()" into integration 2019-10-08 12:58:48 +00:00
Yann Gautier 9d811b856e delay: correct timeout_init_us()
The function has to use read_cntpct_el0() to update the counter, and not
read_cntfrq_el0().

Change-Id: I9c676466e784c3122e9ffc2d87e66708797086e7
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-10-08 11:13:06 +02:00
Paul Beesley e43ed98b80 doc: Add more missing platforms
Add meson-g12a, qemu-sbsa and rpi4 to the documentation index so
that they will have their docs rendered and integrated into the
table of contents.

Change-Id: Id972bf2fee67312dd7bff29f92bea67842e62431
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-10-07 12:24:25 +00:00
Soby Mathew 80003d86a6 Merge "Explicitly disable the SPME bit in MDCR_EL3" into integration 2019-10-07 12:06:08 +00:00
Soby Mathew 25792ce443 Merge "Neoverse N1 Errata Workaround 1542419" into integration 2019-10-07 12:05:26 +00:00
Soby Mathew 5b567758bb Merge "Fix the CAS spinlock implementation" into integration 2019-10-07 11:43:32 +00:00
Petre-Ionut Tudor 2a7adf2567 Explicitly disable the SPME bit in MDCR_EL3
Currently the MDCR_EL3 initialisation implicitly disables
MDCR_EL3.SPME by using mov_imm.

This patch makes the SPME bit more visible by explicitly
disabling it and documenting its use in different versions
of the architecture.

Signed-off-by: Petre-Ionut Tudor <petre-ionut.tudor@arm.com>
Change-Id: I221fdf314f01622f46ac5aa43388f59fa17a29b3
2019-10-07 11:50:07 +01:00
laurenw-arm 80942622fe Neoverse N1 Errata Workaround 1542419
Coherent I-cache is causing a prefetch violation where when the core
executes an instruction that has recently been modified, the core might
fetch a stale instruction which violates the ordering of instruction
fetches.

The workaround includes an instruction sequence to implementation
defined registers to trap all EL0 IC IVAU instructions to EL3 and a trap
handler to execute a TLB inner-shareable invalidation to an arbitrary
address followed by a DSB.

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: Ic3b7cbb11cf2eaf9005523ef5578a372593ae4d6
2019-10-04 19:31:24 +03:00
Soby Mathew 81da28c209 Merge "delay: timeout detection support" into integration 2019-10-04 13:47:40 +00:00
Soby Mathew c97cba4ea4 Fix the CAS spinlock implementation
Make the spinlock implementation use ARMv8.1-LSE CAS instruction based
on a platform build option. The CAS-based implementation used to be
unconditionally selected for all ARM8.1+ platforms.

The previous CAS spinlock implementation had a bug wherein the spin_unlock()
implementation had an `sev` after `stlr` which is not sufficient. A dsb is
needed to ensure that the stlr completes prior to the sev. Having a dsb is
heavyweight and a better solution would be to use load exclusive semantics
to monitor the lock and wake up from wfe when a store happens to the lock.
The patch implements the same.

Change-Id: I5283ce4a889376e4cc01d1b9d09afa8229a2e522
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
2019-10-04 10:19:35 +02:00
Lionel Debieve 0711ee5cbc delay: timeout detection support
Introduce timeout_init_us/timeout_elapsed() delay tracking with CNTPCT.

timeout_init_us(some_timeout_us); returns a reference to detect
timeout for the provided microsecond delay value from current time.

timeout_elapsed(reference) return true/false whether the reference
timeout is elapsed.

Cherry picked from OP-TEE implementation [1].
  [1] commit 33d30a74502b ("core: timeout detection support")

Minor:
- Remove stm32mp platform duplicated implementation.
- Add new include in marvell ble.mk

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Change-Id: Iaef6d43c11a2e6992fb48efdc674a0552755ad9c
2019-10-03 18:57:25 +00:00
Soby Mathew cf9319f46a Merge "TF-A: Add support for ARMv8.3-PAuth in BL1 SMC calls and BL2U" into integration 2019-10-03 16:22:41 +00:00
Alexei Fedorov 530ceda572 TF-A: Add support for ARMv8.3-PAuth in BL1 SMC calls and BL2U
This patch adds support for ARMv8.3-PAuth in BL1 SMC calls and
BL2U image for firmware updates by programming APIAKey_EL1 registers
and enabling Pointer Authentication in EL3 and EL1 respectively.

Change-Id: I875d952aba8242caf74fb5f4f2d2af6f0c768c08
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2019-10-03 14:43:55 +01:00
Soby Mathew 8326aad7be Merge "Introducing support for Cortex-A65AE" into integration 2019-10-03 13:43:51 +00:00
Imre Kis 78f02ae296 Introducing support for Cortex-A65AE
Change-Id: I1ea2bf088f1e001cdbd377cbfb7c6a2866af0422
Signed-off-by: Imre Kis <imre.kis@arm.com>
2019-10-03 15:38:31 +02:00
Soby Mathew 2d35bc1386 Merge changes from topic "stm32mp_corrections_w40" into integration
* changes:
  gpio: stm32_gpio: do not mix error code types
  fdts: stm32mp1: move FDCAN to PLL4_R
  mmc: increase delay between ACMD41 retries
  crypto: stm32_hash: align stm32_hash_update() prototype
2019-10-03 13:32:45 +00:00
Soby Mathew 34c4f86a62 Merge "Add missing support for BL2_AT_EL3 in XIP memory" into integration 2019-10-03 13:32:13 +00:00
Soby Mathew efcf951f61 Merge changes from topic "qemu_sbsa" into integration
* changes:
  qemu/qemu_sbsa: Adding memory mapping for both FLASH0/FLASH1
  qemu/qemu_sbsa: Adding Qemu SBSA platform
2019-10-03 13:23:37 +00:00
Soby Mathew 82d8d4ab59 Merge changes I0355e084,I6a6dd1c0 into integration
* changes:
  mediatek: mt8183: add EMI MPU driver for DRAM protection
  mediatek: mt8183: add DEVAPC driver to control protection
2019-10-03 10:30:40 +00:00
Soby Mathew 251b2643fc Merge "a5ds: Add handler for when user tries to switch off secondary cores" into integration 2019-10-03 10:22:06 +00:00
Nicolas Le Bayon 243b61d15a gpio: stm32_gpio: do not mix error code types
Change-Id: I84f8a99be2dcdf7c51fbecdb324df8e2f32cc855
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-10-03 11:17:48 +02:00
Antonio Borneo 2dc9fe70da fdts: stm32mp1: move FDCAN to PLL4_R
LTDC modifies the clock frequency to adapt it to the display. Such
frequency change is not detected by the FDCAN driver that instead
caches the value at probe and pretends to use it later.

This change fixes the issue by moving the FDCAN to PLL4_R,
leaving the LTDC alone on PLL4_Q.

Signed-off-by: Antonio Borneo <antonio.borneo@st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I8230868b2b5fd6deb6e3f9dc3911030d8d484c58
2019-10-03 11:17:40 +02:00
Yann Gautier 57f4b6f839 mmc: increase delay between ACMD41 retries
In the SD Specification, Power Up Diagram of Card figure, the Timeout
value for initialization process (ACMD41 command retries) is 1 second.
Align to match MMC cards (in mmc_send_op_cond()) and Linux kernel code,
and set the delay between ACMD41 command retries to 10ms.

Change-Id: I2e07cb9944e7d7b72f2d4b13e0505e6751458091
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-10-03 11:17:31 +02:00
Yann Gautier 19e2af7977 crypto: stm32_hash: align stm32_hash_update() prototype
Use size_t for length parameter in header file, as in .c file.

Change-Id: I310f2a6159cde1c069b4f814f6558c2488c203ec
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-10-03 11:17:15 +02:00
Usama Arif 59ffec157c a5ds: Add handler for when user tries to switch off secondary cores
a5ds only has always-on power domain and there is no power control
present. However, without the pwr_domain_off handler, the kernel
panics when the user will try to switch off secondary cores. The
a5ds_pwr_domain_off handler will prevent kernel from crashing,
i.e. the kernel will attempt but fail to shut down the secondary CPUs
if the user tries to switch them offline.

Change-Id: I3c2239a1b6f035113ddbdda063c8495000cbe30c
Signed-off-by: Usama Arif <usama.arif@arm.com>
2019-10-03 10:09:04 +01:00
kenny liang f25ea7e3ac mediatek: mt8183: add EMI MPU driver for DRAM protection
Add EMI MPU driver for DRAM protection.

Signed-off-by: kenny liang <kenny.liang@mediatek.com>
Change-Id: I0355e084184b5396ad8ac99fff6ef9d050fb5e96
2019-10-03 10:46:09 +08:00
kenny liang 1b0174efdb mediatek: mt8183: add DEVAPC driver to control protection
Add DEVAPC driver to control protection.

Signed-off-by: kenny liang <kenny.liang@mediatek.com>
Change-Id: I6a6dd1c0bffa372b6df2cb604ca5e02eabbb9d26
2019-10-03 10:45:16 +08:00
Soby Mathew b81167d318 Merge "Introducing support for Cortex-A65" into integration 2019-10-02 20:12:37 +00:00
Imre Kis 6ad216dca5 Introducing support for Cortex-A65
Change-Id: I645442d52a295706948e2cac88c36c1a3cb0bc47
Signed-off-by: Imre Kis <imre.kis@arm.com>
2019-10-02 18:12:28 +02:00
Lionel Debieve 0a12302c3f Add missing support for BL2_AT_EL3 in XIP memory
Add the missing flag for aarch32 XIP memory mode. It was
previously added in aarch64 only.
Minor: Correct the aarch64 missing flag.

Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Change-Id: Iac0a7581a1fd580aececa75f97deb894858f776f
2019-10-02 09:06:39 +02:00
Sandrine Bailleux 5f38b5362c Merge "doc: Fix GCC version to 8.3-2019.03" into integration 2019-10-02 06:41:05 +00:00
Louis Mayencourt b48691eda0 doc: Fix GCC version to 8.3-2019.03
Change-Id: I3b866e927d93f4b690aa4891940fc8afabf4146e
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2019-10-02 06:38:33 +00:00
Soby Mathew 3bdade5d33 Merge "Cortex_hercules: Add support for Hercules-AE" into integration 2019-10-01 20:15:23 +00:00
Sandrine Bailleux 2f625c5e5c Merge "doc: Migrate to Linaro release 19.06" into integration 2019-10-01 15:49:54 +00:00
Radoslaw Biernacki fa405e3b82 qemu/qemu_sbsa: Adding memory mapping for both FLASH0/FLASH1
This patch adds mapping for secure FLASH0 for qemu/virt and
qemu/qemu_sbsa platforms. This change is targeted for sbsa but since both
platforms share common code, changes in common defines was necessary.

For qemu_sbsa, this patch adds necessary mapping in order to boot without
semi-hosting from secure FLASH0. EFI need to stay in FLASH1 (share it with
variables) since it need to "run in place" in non secure domain. Changes
for this are under RFC at edk2-platforms mailing list:
https://patches.linaro.org/patch/171327/
(edk2-platforms/Platform/Qemu/SbsaQemu/SbsaQemu.dsc).

In docs qemu/virt is described as using semi-hosting, therefore this change
should be orthogonal to existing assumptions while giving possibility to
store both bl1 and fip in FLASH0 at some point (additional changes required
for that).

Signed-off-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
Change-Id: I782bc3637c91c01eaee680b3c5c408e24b4b6e28
2019-10-01 17:24:06 +02:00
Radoslaw Biernacki 558a6f444d qemu/qemu_sbsa: Adding Qemu SBSA platform
This patch introduces Qemu SBSA platform.
Both platform specific files where copied from qemu/qemu with changes for
DRAM base above 32bit and removal of ARMv7 conditional defines/code.
Documentation is aligned to rest of SBSA patches along the series and
planed changes in edk2-platform repo.

Fixes ARM-software/tf-issues#602

Signed-off-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
Change-Id: I8ebc34eedb2268365e479ef05654b2df1b99128c
2019-10-01 17:23:56 +02:00
zelalem-aweke 35010bb803 doc: Migrate to Linaro release 19.06
- Updated Linaro release version number to 19.06
- Updated links to Linaro instructions and releases
- Removed the Linaro old releases link

Signed-off-by: zelalem-aweke <zelalem.aweke@arm.com>
Change-Id: Ib786728106961e89182b42183e7b889f6fc74190
2019-09-30 12:15:16 -05:00
Artsem Artsemenka a4668c36f1 Cortex_hercules: Add support for Hercules-AE
Not tested on FVP Model.

Change-Id: Iedebc5c1fbc7ea577e94142b7feafa5546f1f4f9
Signed-off-by: Artsem Artsemenka <artsem.artsemenka@arm.com>
2019-09-30 12:55:31 +01:00
Soby Mathew c5235cae8e Merge "AArch32: Disable Secure Cycle Counter" into integration 2019-09-27 10:55:15 +00:00
Soby Mathew ace23683be Merge changes from topic "ld/stm32-authentication" into integration
* changes:
  stm32mp1: add authentication support for stm32image
  bsec: move bsec_mode_is_closed_device() service to platform
  crypto: stm32_hash: Add HASH driver
2019-09-27 09:54:27 +00:00
Soby Mathew 32d514e5c6 Merge "doc: Fix platform port inclusion" into integration 2019-09-27 09:54:07 +00:00
Soby Mathew f7fa528917 Merge changes from topic "amlogic-g12a" into integration
* changes:
  amlogic: g12a: Add support for the S905X2 (G12A) platform
  amlogic: makefile: Use PLAT variable when possible
  amlogic: sha_dma: Move register mappings to platform header
2019-09-27 09:53:40 +00:00
Soby Mathew 757d904b2f Merge changes from topic "a5ds-multicore" into integration
* changes:
  a5ds: add multicore support
  a5ds: Hold the secondary cpus in pen rather than panic
2019-09-27 09:49:23 +00:00
Soby Mathew 1ec3919326 Merge "GICv3 driver: Fix support for full SPI range" into integration 2019-09-27 09:49:05 +00:00
Soby Mathew 95982ffc98 Merge "Fix MTE support from causing unused variable warnings" into integration 2019-09-27 09:46:59 +00:00
Soby Mathew 17b0bb6cf5 Merge changes from topic "raspberry-pi-4-support" into integration
* changes:
  rpi4: Add initial documentation file
  rpi4: Add stdout-path to device tree
  rpi4: Add GIC maintenance interrupt to GIC DT node
  rpi4: Cleanup memory regions, move pens to first page
  rpi4: Reserve resident BL31 region from non-secure world
  rpi4: Amend DTB to advertise PSCI
  rpi4: Determine BL33 entry point at runtime
  rpi4: Accommodate "armstub8.bin" header at the beginning of BL31 image
  Add basic support for Raspberry Pi 4
  rpi3: Allow runtime determination of UART base clock rate
  FDT helper functions: Respect architecture in PSCI function IDs
  FDT helper functions: Add function documentation
2019-09-27 09:45:42 +00:00
Soby Mathew 41bda86330 Merge changes from topic "mp/giv3-discovery" into integration
* changes:
  Migrate ARM platforms to use the new GICv3 API
  Adding new optional PSCI hook pwr_domain_on_finish_late
  GICv3: Enable multi socket GIC redistributor frame discovery
2019-09-27 09:42:37 +00:00
Alexei Fedorov c3e8b0be9b AArch32: Disable Secure Cycle Counter
This patch changes implementation for disabling Secure Cycle
Counter. For ARMv8.5 the counter gets disabled by setting
SDCR.SCCD bit on CPU cold/warm boot. For the earlier
architectures PMCR register is saved/restored on secure
world entry/exit from/to Non-secure state, and cycle counting
gets disabled by setting PMCR.DP bit.
In 'include\aarch32\arch.h' header file new
ARMv8.5-PMU related definitions were added.

Change-Id: Ia8845db2ebe8de940d66dff479225a5b879316f8
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2019-09-26 15:36:02 +00:00
Paul Beesley 69ef7b7ffe Merge changes I0283fc2e,Ib476d024,Iada05f7c into integration
* changes:
  hikey: fix to load FIP by partition table.
  hikey960: fix to load FIP by partition table
  drivers: partition: support different block size
2019-09-26 13:40:38 +00:00