]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
3 years agofix(qti): adding secure rm flag
Muhammad Arsath K F [Thu, 22 Sep 2022 12:49:41 +0000 (05:49 -0700)]
fix(qti): adding secure rm flag

Adding SECURE rm flag to support INTR_EL3_VALID_RM1 routing model.

Signed-off-by: Muhammad Arsath K F <quic_mkf@quicinc.com>
Change-Id: Ie72d62148e81d3cf7fb05f46124f846cc45d9d41

3 years agoMerge "feat(pauth): add/modify helpers to support QARMA3" into integration
Manish Pandey [Thu, 22 Sep 2022 09:59:39 +0000 (11:59 +0200)]
Merge "feat(pauth): add/modify helpers to support QARMA3" into integration

3 years agoMerge "fix(synquacer): increase size of BL33" into integration
Manish V Badarkhe [Thu, 22 Sep 2022 08:46:06 +0000 (10:46 +0200)]
Merge "fix(synquacer): increase size of BL33" into integration

3 years agoMerge "feat(versal_net): add support for QEMU COSIM platform" into integration
Joanna Farley [Thu, 22 Sep 2022 08:22:10 +0000 (10:22 +0200)]
Merge "feat(versal_net): add support for QEMU COSIM platform" into integration

3 years agoMerge "docs(maintainers): update xilinx record to cover docs" into integration
Joanna Farley [Thu, 22 Sep 2022 08:15:38 +0000 (10:15 +0200)]
Merge "docs(maintainers): update xilinx record to cover docs" into integration

3 years agodocs(maintainers): update xilinx record to cover docs
Michal Simek [Thu, 22 Sep 2022 06:50:07 +0000 (08:50 +0200)]
docs(maintainers): update xilinx record to cover docs

Recently new Xilinx Versal NET platform has been merged but documentation
cover only zynqmp. Fix the fragment to cover all Xilinx documentation.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: I10f8f865ca8d46518135adb80ba0ba4470534529

3 years agofeat(versal_net): add support for QEMU COSIM platform
Sai Pavan Boddu [Thu, 8 Sep 2022 10:39:04 +0000 (16:09 +0530)]
feat(versal_net): add support for QEMU COSIM platform

QEMU COSIM platform is equivalent to qemu with additional cosim
extensions, so just switching platform_id to QEMU if QEMU_COSIM is
detected.

Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: I922d10b1605c7f900158fa7fbe82571d3b9d4792

3 years agofix(synquacer): increase size of BL33
Jassi Brar [Wed, 14 Sep 2022 20:41:43 +0000 (15:41 -0500)]
fix(synquacer): increase size of BL33

Increase the max possible size of BL33 from 1MB to 2MB.
For example, edk2 is usually bigger than 1MB

Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Change-Id: Idd4762e25e623de145c65f31cf2dfe1fee466a74

3 years agoMerge "docs(build): update GCC to 11.3.Rel1 version" into integration
Joanna Farley [Wed, 21 Sep 2022 16:43:02 +0000 (18:43 +0200)]
Merge "docs(build): update GCC to 11.3.Rel1 version" into integration

3 years agoMerge changes from topic "xilinx-versal-net" into integration
Joanna Farley [Wed, 21 Sep 2022 16:29:58 +0000 (18:29 +0200)]
Merge changes from topic "xilinx-versal-net" into integration

* changes:
  feat(versal-net): add support for platform management
  feat(versal-net): add support for IPI
  feat(versal-net): add SMP support for Versal NET
  feat(versal-net): add support for Xilinx Versal NET platform
  feat(versal-net): add documentation for Versal NET SoC

3 years agofeat(versal-net): add support for platform management
Jay Buddhabhatti [Mon, 5 Sep 2022 09:56:32 +0000 (02:56 -0700)]
feat(versal-net): add support for platform management

Add support for PM EEMI interface for Versal_net. Also use PM
APIs in psci ops. Added TFA_NO_PM flag to disable PM functionality.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: If2b2941c868bc9b0850d7f3adb81eac0e660c149

3 years agofeat(versal-net): add support for IPI
Michal Simek [Mon, 19 Sep 2022 12:04:55 +0000 (14:04 +0200)]
feat(versal-net): add support for IPI

Add support to send IPI to firmware.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Akshay Belsare <Akshay.Belsare@amd.com>
Change-Id: I8cd54c05b6a726e0d398dfc1cdcc7f4cf09ba725

3 years agoMerge "fix(imx8m): move caam init after serial init" into integration
Madhukar Pappireddy [Tue, 20 Sep 2022 13:12:04 +0000 (15:12 +0200)]
Merge "fix(imx8m): move caam init after serial init" into integration

3 years agofix(imx8m): move caam init after serial init
Andrey Zhizhikin [Mon, 19 Sep 2022 18:49:16 +0000 (20:49 +0200)]
fix(imx8m): move caam init after serial init

CAAM provides serial output during initialization, but the serial init
occurs after CAAM. This leads to serial output produced by CAAM init
function to be omitted and not displayed.

Change the order of initialization and call CAAM init after Serial. This
has no impact as Serial does not require CAAM to be initialized upfront.

Fixes: 2502709f60de ("plat: imx8m: Add caam module init on imx8m")
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Cc: Jacky Bai <ping.bai@nxp.com>
Change-Id: I09c0a5474a1babfb0b53c4455891689ec08b5bdb

3 years agoMerge "fix(imx8m): correct serial output for HAB JR0" into integration
Madhukar Pappireddy [Tue, 20 Sep 2022 13:11:25 +0000 (15:11 +0200)]
Merge "fix(imx8m): correct serial output for HAB JR0" into integration

3 years agofeat(versal-net): add SMP support for Versal NET
Michal Simek [Mon, 19 Sep 2022 11:52:54 +0000 (13:52 +0200)]
feat(versal-net): add SMP support for Versal NET

Add SMP support for Versal NET via register access.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Akshay Belsare <Akshay.Belsare@amd.com>
Change-Id: I46d73e2cd678ae720b5255722b6b0611c22659e8

3 years agofeat(versal-net): add support for Xilinx Versal NET platform
Michal Simek [Wed, 31 Aug 2022 14:45:14 +0000 (16:45 +0200)]
feat(versal-net): add support for Xilinx Versal NET platform

New SoC is a78 based with gicv3 and uart over pl011. Communication
interfaces are similar to Versal platform. System starts with Xilinx PLM
firmware which loads TF-A(bl31) to DDR, which is already configured, and
jumps to it. PLM also prepare handoff structure for TF-A with information
what components were load and flags which indicate which EL level SW should
be started.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Akshay Belsare <Akshay.Belsare@amd.com>
Change-Id: I2a16c242a77be6c91be3d198727dc3b9bbb97410

3 years agofix(imx8m): correct serial output for HAB JR0
Andrey Zhizhikin [Mon, 19 Sep 2022 18:34:45 +0000 (20:34 +0200)]
fix(imx8m): correct serial output for HAB JR0

Serial output is missing the EOL marker, which makes the output garbled.

Add EOL to the output, which adds a newline and makes log output
consistent.

Fixes: 77850c96f23b ("feat(plat/imx8m): do not release JR0 to NS if HAB is using it")
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Cc: Franck LENORMAND <franck.lenormand@nxp.com>
Cc: Jacky Bai <ping.bai@nxp.com>
Change-Id: I58b67f441016122bc9361d7224d310522917eff0

3 years agoMerge "fix(zynqmp): resolve the misra 4.6 warnings" into integration
Joanna Farley [Mon, 19 Sep 2022 16:23:28 +0000 (18:23 +0200)]
Merge "fix(zynqmp): resolve the misra 4.6 warnings" into integration

3 years agofeat(versal-net): add documentation for Versal NET SoC
Michal Simek [Wed, 31 Aug 2022 11:05:57 +0000 (13:05 +0200)]
feat(versal-net): add documentation for Versal NET SoC

Add description for Versal NET SoC.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Akshay Belsare <Akshay.Belsare@amd.com>
Change-Id: Idcbb893c6b9e46512308c53ba2a0bee48a022b0a

3 years agofix(zynqmp): resolve the misra 4.6 warnings
HariBabu Gattem [Fri, 16 Sep 2022 05:35:11 +0000 (22:35 -0700)]
fix(zynqmp): resolve the misra 4.6 warnings

MISRA Violation: MISRA-C:2012 R.4.6
- Using basic numerical type int rather than a typedef
that includes size and signedness information.

Change-Id: Id85e69b29b124052b4a87462ce27fcdfc00c13c9
Signed-off-by: HariBabu Gattem <haribabu.gattem@amd.com>
3 years agoMerge "feat(versal): update macro name to generic and move to common place" into...
Joanna Farley [Fri, 16 Sep 2022 08:56:59 +0000 (10:56 +0200)]
Merge "feat(versal): update macro name to generic and move to common place" into integration

3 years agoMerge changes from topic "provencore-spd" into integration
Joanna Farley [Fri, 16 Sep 2022 08:52:37 +0000 (10:52 +0200)]
Merge changes from topic "provencore-spd" into integration

* changes:
  feat(zynqmp): add support for ProvenCore
  feat(services): add a SPD for ProvenCore
  feat(gic): add APIs to raise NS and S-EL1 SGIs

3 years agoMerge changes from topic "RDN2_WARM_REBOOT_WITH_SGI" into integration
Manish V Badarkhe [Fri, 16 Sep 2022 08:27:21 +0000 (10:27 +0200)]
Merge changes from topic "RDN2_WARM_REBOOT_WITH_SGI" into integration

* changes:
  feat(sgi): enable css implementation of warm reset
  feat(scmi): send powerdown request to online secondary cpus
  feat(plat/arm/css): add interrupt handler for reboot request
  refactor(psci): move psci_do_pwrdown_sequence() out of private header
  feat(plat/arm/css): add per-cpu power down support for warm reset
  feat(scmi): set warm reboot entry point
  fix(gicv3): update the affinity mask to 8 bit

3 years agofeat(zynqmp): add support for ProvenCore
Jeremie Corbier [Tue, 7 Sep 2021 09:49:58 +0000 (11:49 +0200)]
feat(zynqmp): add support for ProvenCore

ProvenCore requires secure SGIs to be handled at S-EL1. This patch
overrides the default ZynqMP configuration to handle them at EL3 in case
ProvenCore SPD is enabled.

Signed-off-by: Jeremie Corbier <jeremie.corbier@provenrun.com>
Signed-off-by: Mélanie Favre <melanie.favre@provenrun.com>
Change-Id: I2e36d2983f82fbb9b7acf7e18791b8ed92811b60

3 years agofeat(services): add a SPD for ProvenCore
Florian Lugou [Wed, 8 Sep 2021 10:42:54 +0000 (12:42 +0200)]
feat(services): add a SPD for ProvenCore

Adds a dispatcher for ProvenCore based on the test secure payload
dispatcher.

Signed-off-by: Florian Lugou <florian.lugou@provenrun.com>
Change-Id: I978afc3af6a6f65791655685a7bc80070673c9f3

3 years agofeat(sgi): enable css implementation of warm reset
Pranav Madhu [Wed, 27 Jul 2022 08:31:24 +0000 (14:01 +0530)]
feat(sgi): enable css implementation of warm reset

Enable the CSS implementation of the warm reset for the rdn2 platform.

In addition to these  changes, fix coding style issues that are not
directly related to the code being introduced in this patch.

Change-Id: I75128d8bbcccbc26cf1e904691c7ef71349c622f
Signed-off-by: Pranav Madhu <pranav.madhu@arm.com>
3 years agofeat(scmi): send powerdown request to online secondary cpus
Pranav Madhu [Fri, 22 Jul 2022 18:16:11 +0000 (23:46 +0530)]
feat(scmi): send powerdown request to online secondary cpus

To initiate a reset or reboot, the nonsecure OS invokes the PSCI
SYSTEM_RESET function from any one core. As per the PSCI specification,
it is the responsibility of firmware to implement the system view of
the reset or reboot operation. For the platforms supported by CSS,
trigger the reset/reboot operation by sending an SGI to rest all CPUs
which are online. The CPUs respond to this interrupt by initiating its
powerdown sequence.

In addition to these changes, fix coding style issues that are not
directly related to the code being introduced in this patch.

Change-Id: I547253ee28ef7eefa78180d016893671a406bbfa
Signed-off-by: Pranav Madhu <pranav.madhu@arm.com>
3 years agofeat(plat/arm/css): add interrupt handler for reboot request
Pranav Madhu [Wed, 27 Jul 2022 07:42:27 +0000 (13:12 +0530)]
feat(plat/arm/css): add interrupt handler for reboot request

Add platform specific interrupt handler for handling the reboot of
all CPU's. On shutdown/reboot, only one CPU invoke PSCI and enter into
trusted firmware. The CPU which entered trusted firmware signals the
rest of the cores which are online using SGI to initiate power down
sequence. On receiving the SGI, the handler will power down the
GIC redistributor interface of the respective core, configure the power
control register and power down the CPU by executing wfi.

In addition to these changes, fix coding style issues that are not
directly related to the code being introduced in this patch.

Change-Id: I4917dfdc47be5ce7367bee629486a6344cdd706f
Signed-off-by: Pranav Madhu <pranav.madhu@arm.com>
3 years agorefactor(psci): move psci_do_pwrdown_sequence() out of private header
Pranav Madhu [Fri, 22 Jul 2022 17:41:16 +0000 (23:11 +0530)]
refactor(psci): move psci_do_pwrdown_sequence() out of private header

Move the psci_do_pwrdown_sequence() function declaration from PSCI
private header to common header. The psci_do_pwrdown_sequence is
required to support warm reset, where each CPU need to execute the
powerdown sequence.

Change-Id: I298e7a120be814941fa91c0b001002a080e56263
Signed-off-by: Pranav Madhu <pranav.madhu@arm.com>
3 years agofeat(plat/arm/css): add per-cpu power down support for warm reset
Pranav Madhu [Wed, 27 Jul 2022 07:19:24 +0000 (12:49 +0530)]
feat(plat/arm/css): add per-cpu power down support for warm reset

Add a new function to setup a SGI interrupt that will be used to trigger
a request for per-cpu power down when executing the PSCI SYSTEM_RESET
request. This will be used on CSS platform that require all the CPUs to
execute the CPU specific power down sequence to complete a warm reboot
sequence in which only the CPUs are power cycled.

Change-Id: I80da0f6c3cd0c5c442c82239ba1e1f773821a7f5
Signed-off-by: Pranav Madhu <pranav.madhu@arm.com>
3 years agofeat(scmi): set warm reboot entry point
Pranav Madhu [Sat, 11 Dec 2021 16:53:25 +0000 (22:23 +0530)]
feat(scmi): set warm reboot entry point

Before issuing the system power down command, set the trusted mailbox
to 0. This will ensure that in the case of a warm/cold reset, the
primary CPU executes from the cold boot sequence, clearing any stale
jump address at this location.

Change-Id: I491ef5baf7a6728acd7e90e4558939ba77b8f9bf
Signed-off-by: Pranav Madhu <pranav.madhu@arm.com>
3 years agofix(gicv3): update the affinity mask to 8 bit
Pranav Madhu [Mon, 1 Aug 2022 08:27:52 +0000 (13:57 +0530)]
fix(gicv3): update the affinity mask to 8 bit

The GIC ICC_SGI0R_EL1 register's affinity fields are 8bit wide for GIC
v3 and v4. Fix the SGIR_AFF_MASK variable accordingly.

Change-Id: I09f3fdd006708b40162776620f82abcfc6c3f782
Signed-off-by: Pranav Madhu <pranav.madhu@arm.com>
3 years agoMerge "fix: 'sp_mk_generator.py' reference to undef var" into integration
Manish Pandey [Thu, 15 Sep 2022 12:28:34 +0000 (14:28 +0200)]
Merge "fix: 'sp_mk_generator.py' reference to undef var" into integration

3 years agoMerge "feat(gicv3): validate multichip data for GIC-700" into integration
Manish Pandey [Thu, 15 Sep 2022 09:04:41 +0000 (11:04 +0200)]
Merge "feat(gicv3): validate multichip data for GIC-700" into integration

3 years agoMerge "fix(context mgmt): remove explicit ICC_SRE_EL2 register read" into integration
Manish Pandey [Thu, 15 Sep 2022 08:49:38 +0000 (10:49 +0200)]
Merge "fix(context mgmt): remove explicit ICC_SRE_EL2 register read" into integration

3 years agoMerge "fix(versal): route GIC IPI interrupts during setup" into integration
Joanna Farley [Thu, 15 Sep 2022 07:16:20 +0000 (09:16 +0200)]
Merge "fix(versal): route GIC IPI interrupts during setup" into integration

3 years agoMerge "fix(zynqmp): move debug bl31 based address back to OCM" into integration
Joanna Farley [Thu, 15 Sep 2022 07:15:21 +0000 (09:15 +0200)]
Merge "fix(zynqmp): move debug bl31 based address back to OCM" into integration

3 years agofix(versal): route GIC IPI interrupts during setup
Tanmay Shah [Tue, 13 Sep 2022 17:24:27 +0000 (10:24 -0700)]
fix(versal): route GIC IPI interrupts during setup

If primary core is down, then IPI interrupt should be
routed to another core for processing.

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
Change-Id: I01d7c4232a18c0c3b3f3f9ddadfa6ff5bd2f2471

3 years agofix: 'sp_mk_generator.py' reference to undef var
J-Alves [Wed, 14 Sep 2022 14:31:17 +0000 (15:31 +0100)]
fix: 'sp_mk_generator.py' reference to undef var

The script 'sp_mk_generator.py' was reworked in [1]. There was a
reference the variable 'data' left. This variable 'data' used to refer
to the json data of a the sp layout file.
This patch fixed the reference with the proper variable according to the
rework [1].

[1] https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=a96a07bfb66b7d38fe3da824e8ba183967659008

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: I9ddbfa8d55a114bcef6997920522571e070fc7d2

3 years agofeat(gic): add APIs to raise NS and S-EL1 SGIs
Florian Lugou [Wed, 8 Sep 2021 10:40:24 +0000 (12:40 +0200)]
feat(gic): add APIs to raise NS and S-EL1 SGIs

This patch adds two helper functions:
 - plat_ic_raise_ns_sgi to raise a NS SGI
 - plat_ic_raise_s_el1_sgi to raise a S-EL1 SGI

Signed-off-by: Florian Lugou <florian.lugou@provenrun.com>
Change-Id: I6f262dd1da1d77fec3f850eb74189e726b8e24da

3 years agofix(context mgmt): remove explicit ICC_SRE_EL2 register read
Varun Wadekar [Tue, 13 Sep 2022 11:38:47 +0000 (12:38 +0100)]
fix(context mgmt): remove explicit ICC_SRE_EL2 register read

ICC_SRE_EL2 has only 4 bits, while others are RES0. The library programs
all four of them already, so there is no need to read the previous
settings from the actual register.

This patch removes the explicit register read as a result.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: Iff0cb3b0d6fd85e5ae891068e440d855973a1c5e

3 years agoMerge changes from topic "morello-dt-fix" into integration
Manish V Badarkhe [Wed, 14 Sep 2022 10:35:29 +0000 (12:35 +0200)]
Merge changes from topic "morello-dt-fix" into integration

* changes:
  fix(morello): dts: remove #a-c and #s-c from memory node
  fix(morello): dts: fix GICv3 compatible string
  fix(morello): dts: fix DT node naming
  fix(morello): dts: fix SCMI shmem/mboxes grouping
  fix(morello): dts: use documented DPU compatible string
  fix(morello): dts: fix DP SMMU IRQ ordering
  fix(morello): dts: fix SMMU IRQ ordering
  fix(morello): dts: add model names
  fix(morello): dts: fix stdout-path target

3 years agoMerge changes from topic "xilinx-pm-misc-changes" into integration
Joanna Farley [Wed, 14 Sep 2022 10:01:37 +0000 (12:01 +0200)]
Merge changes from topic "xilinx-pm-misc-changes" into integration

* changes:
  fix(xilinx): update define for ZynqMP specific functions
  fix(xilinx): remove unnecessary header include
  fix(xilinx): include missing header

3 years agoMerge changes from topic "xilinx-misc-changes" into integration
Joanna Farley [Wed, 14 Sep 2022 09:52:29 +0000 (11:52 +0200)]
Merge changes from topic "xilinx-misc-changes" into integration

* changes:
  chore(zynqmp): fix comment style in zynqmp_def.h
  chore(versal): add missing dot at the end of sentence
  fix(zynqmp): remove additional 0x in %p print
  fix(versal): fix Misra-C violations in bl31_setup and pm_svc_main

3 years agofix(xilinx): update define for ZynqMP specific functions
Rajan Vaja [Wed, 31 Aug 2022 10:54:34 +0000 (12:54 +0200)]
fix(xilinx): update define for ZynqMP specific functions

Instead of exclude code for Versal, define only for ZynqMP.
For new platforms this code should be excluded so instead of
excluding for all platform, define only for ZynqMP.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: I45798dadc0f374c5794f517f7d0158675a75caa9

3 years agofix(xilinx): remove unnecessary header include
Rajan Vaja [Wed, 31 Aug 2022 10:54:40 +0000 (12:54 +0200)]
fix(xilinx): remove unnecessary header include

Platform specific IPI header inclusion is not required
in common IPI source file. So remove inclusion of the same.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: I6686757f00370c6ec42b5ee2c44ea5cd13da70c0

3 years agofix(xilinx): include missing header
Rajan Vaja [Wed, 31 Aug 2022 10:54:38 +0000 (12:54 +0200)]
fix(xilinx): include missing header

pm_ipi.h needs some definitions from stddef.h so include it.
Currently it is working because required file is included
indirectly due to other includes.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: Ic4a6c469c3152e21eaeb365ba96f3a29f14593bf

3 years agochore(zynqmp): fix comment style in zynqmp_def.h
Michal Simek [Wed, 14 Sep 2022 07:35:09 +0000 (09:35 +0200)]
chore(zynqmp): fix comment style in zynqmp_def.h

Add missing space in one line comment to follow common coding style.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: Idebf8f34bf48444ee20a68ac3e6fd7f5a41bf8b0

3 years agochore(versal): add missing dot at the end of sentence
Michal Simek [Wed, 14 Sep 2022 07:32:47 +0000 (09:32 +0200)]
chore(versal): add missing dot at the end of sentence

Add missing dot at the end of sentence.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: I356e65fd8c572c12795e3492dd02d73f48cb4b67

3 years agofix(zynqmp): remove additional 0x in %p print
Michal Simek [Wed, 14 Sep 2022 07:29:50 +0000 (09:29 +0200)]
fix(zynqmp): remove additional 0x in %p print

%p is already printing value in hex that's why 0x prefix is not needed.
Origin message looks like this
"NOTICE:  Can't read DT at 0x0x100000"
and after fixing
"NOTICE:  Can't read DT at 0x100000"

Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: If83c485a61441f6105d8cbd797f04060dfce2817

3 years agofix(versal): fix Misra-C violations in bl31_setup and pm_svc_main
Michal Simek [Tue, 13 Sep 2022 09:48:53 +0000 (11:48 +0200)]
fix(versal): fix Misra-C violations in bl31_setup and pm_svc_main

Fix some Misra-C violations. The similar fixes were done by commit
eb0d2b17722c ("fix(zynqmp): resolve misra R15.6 warnings") and commit
dd1fe7178b57 ("fix(zynqmp): resolve misra R14.4 warnings").

Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: I3ffa92724a09871f7f99c9ac6c326994c165e9bd

3 years agoMerge "fix(zynqmp): ensure memory write finish with dsb()" into integration
Joanna Farley [Wed, 14 Sep 2022 07:14:34 +0000 (09:14 +0200)]
Merge "fix(zynqmp): ensure memory write finish with dsb()" into integration

3 years agoMerge "fix(cpus): workaround for Cortex-A710 2216384" into integration
Bipin Ravi [Tue, 13 Sep 2022 18:59:43 +0000 (20:59 +0200)]
Merge "fix(cpus): workaround for Cortex-A710 2216384" into integration

3 years agofix(zynqmp): ensure memory write finish with dsb()
Tanmay Shah [Tue, 13 Sep 2022 18:10:08 +0000 (11:10 -0700)]
fix(zynqmp): ensure memory write finish with dsb()

GICD reg write must complete before core goes to idle
mode. Achieve this with dsb() barrier instruction in IPI
ISR

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
Change-Id: I5af42ca901567ee5e54a5434ebe3e673a92cb9be

3 years agodocs(build): update GCC to 11.3.Rel1 version
Jayanth Dodderi Chidanand [Mon, 12 Sep 2022 13:50:12 +0000 (14:50 +0100)]
docs(build): update GCC to 11.3.Rel1 version

This toolchain provides multiple cross compilers and is publicly
available on https://developer.arm.com/

We build TF-A in CI using:
AArch32 bare-metal target (arm-none-eabi)
AArch64 ELF bare-metal target (aarch64-none-elf)

Change-Id: I94e13f6c1ebe3a4a58ca6c79c1605bd300b372d3
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
3 years agofix(zynqmp): move debug bl31 based address back to OCM
Michal Simek [Thu, 4 Aug 2022 07:18:06 +0000 (09:18 +0200)]
fix(zynqmp): move debug bl31 based address back to OCM

The commit 389594dfa7e6 ("fix(zynqmp): move bl31 with DEBUG=1 back to OCM")
tried to move address to OCM but address was actually out of OCM and likely
it was typo. Correct default address should be 0xfffe5000. If TF-A size is
bigger please select location DDR which should be fine for DEBUG cases.

Reported-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: I055f3a59cdca527f6029fcc2a19d76be35924d24

3 years agofeat(versal): update macro name to generic and move to common place
Jay Buddhabhatti [Tue, 5 Apr 2022 06:42:04 +0000 (23:42 -0700)]
feat(versal): update macro name to generic and move to common place

Update TZ_VERSION macro name to generic macro name and move to
common header file so that it can be used for keystoneb.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@xilinx.com>
Acked-by: Tanmay Shah <tanmay.shah@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: Ic3819eea78b6c7b51ffaa13081026dd191b76125

3 years agoMerge changes Id49d94f6,I35316310 into integration
Joanna Farley [Tue, 13 Sep 2022 08:24:37 +0000 (10:24 +0200)]
Merge changes Id49d94f6,I35316310 into integration

* changes:
  feat(versal): add infrastructure to handle multiple interrupts
  fix(versal): add SGI register call version check

3 years agoMerge "docs(porting-guide): correct typo of "bits" to "bytes"" into integration
Joanna Farley [Tue, 13 Sep 2022 07:37:39 +0000 (09:37 +0200)]
Merge "docs(porting-guide): correct typo of "bits" to "bytes"" into integration

3 years agofeat(versal): add infrastructure to handle multiple interrupts
Tanmay Shah [Fri, 26 Aug 2022 22:06:00 +0000 (15:06 -0700)]
feat(versal): add infrastructure to handle multiple interrupts

Only one hardcode interrupt handler is supported as of now.
This is IPI interrupt between APU and PMC processor.
This patch adds infrastructure to register multiple interrupt
handlers. This infrastructure was used and tested for two
interrupts and so, interrupt id and handler container size is
2 which is defined by MAX_INTR_EL3. Interrupt id is not used
as container index due to size constraints. User is expected to
adjust MAX_INTR_EL3 based on how many interrupts are handled in
TF-A

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
Change-Id: Id49d94f6773fbb6874ccf89c0d12572efc7e678e

3 years agofix(versal): add SGI register call version check
Tanmay Shah [Fri, 26 Aug 2022 22:13:48 +0000 (15:13 -0700)]
fix(versal): add SGI register call version check

PM_FEATURE_CHECK is supported only for platform
management API. PM_LOAD_PDI command is not intended
for platform management. This patch removes version
check of PM_LOAD_PDI and adds version check of command
that is used for SGI registartion.

Signed-off-by: Tanmay Shah <tanmay.shah@xilinx.com>
Change-Id: I353163109b639acab73120f405a811770e8831a0

3 years agoMerge "chore: use tabs for indentation" into integration
Joanna Farley [Tue, 13 Sep 2022 07:18:57 +0000 (09:18 +0200)]
Merge "chore: use tabs for indentation" into integration

3 years agochore: use tabs for indentation
Jorge Troncoso [Mon, 12 Sep 2022 22:12:01 +0000 (15:12 -0700)]
chore: use tabs for indentation

This patch changes the definition of image_info_t to follow the TF-A
coding style documented at
https://trustedfirmware-a.readthedocs.io/en/latest/process/coding-style.html

Signed-off-by: Jorge Troncoso <jatron@google.com>
Change-Id: I17af22b4ba60b41cf0b5fa84ac47beeb1536edcc

3 years agodocs(porting-guide): correct typo of "bits" to "bytes"
Max Yu [Thu, 8 Sep 2022 23:21:21 +0000 (23:21 +0000)]
docs(porting-guide): correct typo of "bits" to "bytes"

The CACHE_WRITEBACK_GRANULE is documented to be in bits, but
specifying the value in bits broke a build. Further investigation
suggests that the value should in fact be in bytes. See
https://github.com/ARM-software/arm-trusted-firmware/blob/master/include/arch/aarch64/
smccc_helpers.h#L101
and
https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Common-Type-Attributes.html

Change-Id: I9a2b2fbe18d5a58a8f9aeb2726a0623f3484c88e
Signed-off-by: Max Yu <maxlyu@google.com>
3 years agoMerge "fix(mmc): resolve the build error" into integration
Manish Pandey [Mon, 12 Sep 2022 08:42:27 +0000 (10:42 +0200)]
Merge "fix(mmc): resolve the build error" into integration

3 years agofix(mmc): resolve the build error
Jayanth Dodderi Chidanand [Fri, 9 Sep 2022 16:21:24 +0000 (17:21 +0100)]
fix(mmc): resolve the build error

Adding the header file plat/common/common_def.h to
resolve the "SIZE_128" undeclared identifier error.

Change-Id: I399edf4248776f6dd9f93e000b8672cadc71509d
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
3 years agoMerge changes from topic "fix_fip_in_emmc_boot" into integration
Manish Pandey [Thu, 8 Sep 2022 11:40:36 +0000 (13:40 +0200)]
Merge changes from topic "fix_fip_in_emmc_boot" into integration

* changes:
  fix(st): add max size for FIP in eMMC boot part
  feat(mmc): get boot partition size

3 years agoMerge "fix(cpus): workaround for Cortex-A78C erratum 2376749" into integration
Manish V Badarkhe [Thu, 8 Sep 2022 11:27:11 +0000 (13:27 +0200)]
Merge "fix(cpus): workaround for Cortex-A78C erratum 2376749" into integration

3 years agofix(cpus): workaround for Cortex-A78C erratum 2376749
Akram Ahmad [Tue, 6 Sep 2022 10:23:25 +0000 (11:23 +0100)]
fix(cpus): workaround for Cortex-A78C erratum 2376749

Cortex-A78C erratum 2376749 is a Cat B erratum that applies
to revisions r0p1 and r0p2 of the A78C and is currently open.
The workaround is to set CPUACTLR2_EL1[0] to 1 to force
PLDW/PFRM ST to behave like PLD/PRFM LD and not cause
invalidations to other PE caches.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN2004089/latest

Signed-off-by: Akram Ahmad <Akram.Ahmad@arm.com>
Change-Id: I3b29f4b7f167bf499d5d11ffef91a94861bd1383

3 years agoMerge changes Idde51a13,Ife8f1e84 into integration
Manish Pandey [Thu, 8 Sep 2022 10:44:24 +0000 (12:44 +0200)]
Merge changes Idde51a13,Ife8f1e84 into integration

* changes:
  feat(mediatek): add smcc call for MSDC
  refactor(mediatek): refactor plat_sip_calls.h for mt8192/mt8195/mt8186

3 years agofeat(mediatek): add smcc call for MSDC
Bo-Chen Chen [Wed, 22 Jun 2022 11:51:41 +0000 (19:51 +0800)]
feat(mediatek): add smcc call for MSDC

Some registers of MSDC need to be set in ATF, so we add MSDC drivers.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: Idde51a136ad08dbaece0bdaa804b934fca7046b6

3 years agorefactor(mediatek): refactor plat_sip_calls.h for mt8192/mt8195/mt8186
Bo-Chen Chen [Thu, 8 Sep 2022 05:14:47 +0000 (13:14 +0800)]
refactor(mediatek): refactor plat_sip_calls.h for mt8192/mt8195/mt8186

- MTK_SIP_KERNEL_DFD can be moved to mtk_sip_def.h.
- Remove unused MTK_SIP_* definations which are already defined in
  mtk_sip_def.h.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: Ife8f1e842d986691488548632426f194199d42b9

3 years agoMerge "feat(ti-k3): add support for J784S4 SoCs" into integration
Madhukar Pappireddy [Wed, 7 Sep 2022 22:18:24 +0000 (00:18 +0200)]
Merge "feat(ti-k3): add support for J784S4 SoCs" into integration

3 years agoMerge changes from topic "stm32mp15-dt-updates" into integration
Madhukar Pappireddy [Wed, 7 Sep 2022 13:38:06 +0000 (15:38 +0200)]
Merge changes from topic "stm32mp15-dt-updates" into integration

* changes:
  refactor(stm32mp15-fdts): remove timers15 node
  refactor(stm32mp15-fdts): remove unused secure-status properties
  refactor(stm32mp15-fdts): remove RCC secure-status

3 years agoMerge "refactor(renesas): remove mbedtls_common makefile inclusion" into integration
Manish V Badarkhe [Wed, 7 Sep 2022 11:08:42 +0000 (13:08 +0200)]
Merge "refactor(renesas): remove mbedtls_common makefile inclusion" into integration

3 years agorefactor(renesas): remove mbedtls_common makefile inclusion
Manish V Badarkhe [Wed, 29 Jun 2022 13:12:50 +0000 (14:12 +0100)]
refactor(renesas): remove mbedtls_common makefile inclusion

Renesas platform does not support crypto, but mbedtls_common.mk
is still included in its makefile. Therefore, this inclusion
was removed to avoid un-necessary compilation of mbedTLS source.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: Ib6978255e39a7f5d5013952841930ae68b12c318

3 years agofix(st): add max size for FIP in eMMC boot part
Yann Gautier [Fri, 2 Sep 2022 06:36:40 +0000 (08:36 +0200)]
fix(st): add max size for FIP in eMMC boot part

When putting FIP binary in eMMC boot partition (with STM32MP_EMMC_BOOT),
the FIP max size should be precised. If it is not, an assert fails in
io_block driver, as cur->size will be zero.
For this length, we then use the size of the eMMC boot partition minus
STM32MP_EMMC_BOOT_FIP_OFFSET.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I48b7635cff64f52d4b337a4c8c3becd9a0be72e8

3 years agofeat(mmc): get boot partition size
Yann Gautier [Thu, 1 Sep 2022 17:23:39 +0000 (19:23 +0200)]
feat(mmc): get boot partition size

The boot partition size of an eMMC is given in ext_csd register, at
offset 226 (BOOT_SIZE_MULT), which has to be multiplied by 128kB.
Add a helper function mmc_boot_part_size() to get this eMMC boot
partition size.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I0e8e0fc9632f147fa1b1b3374accb78439025403

3 years agofix(cpus): workaround for Cortex-A710 2216384
Jayanth Dodderi Chidanand [Thu, 1 Sep 2022 21:09:54 +0000 (22:09 +0100)]
fix(cpus): workaround for Cortex-A710 2216384

Cortex-A710 erratum 2216384 is a Cat B erratum that applies to revisions
r0p0, r1p0, and r2p0, and is fixed in r2p1. The workaround is to set
CPUACTLR5_EL1[17] to 1 and applying an instruction patching sequence.
Setting this bit, along with these instructions will prevent the
deadlock, and thereby avoids the reset of the processor.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN1775101/latest

Change-Id: I2821591c23f854c12111288ad1fd1aef45db6add
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
3 years agoMerge changes I366740a9,I533abdd6,I6aa3b6dc into integration
Manish V Badarkhe [Tue, 6 Sep 2022 15:49:10 +0000 (17:49 +0200)]
Merge changes I366740a9,I533abdd6,I6aa3b6dc into integration

* changes:
  fix(n1sdp): mapping Run-time UART to IOFPGA UART0
  fix(n1sdp): add numa node id for pcie controllers
  fix(n1sdp): replace non-inclusive terms from dts file

3 years agoMerge "fix(gpt): correct the GPC enable sequence" into integration
Manish V Badarkhe [Tue, 6 Sep 2022 15:24:17 +0000 (17:24 +0200)]
Merge "fix(gpt): correct the GPC enable sequence" into integration

3 years agoMerge "fix(errata): workaround for Cortex-A510 erratum 2347730" into integration
Manish Pandey [Tue, 6 Sep 2022 12:49:53 +0000 (14:49 +0200)]
Merge "fix(errata): workaround for Cortex-A510 erratum 2347730" into integration

3 years agoMerge changes from topic "st-nand-updates" into integration
Manish Pandey [Mon, 5 Sep 2022 14:42:34 +0000 (16:42 +0200)]
Merge changes from topic "st-nand-updates" into integration

* changes:
  feat(stm32mp1): allow to override MTD base offset
  feat(stm32mp1): manage second NAND OTP on STM32MP13
  feat(stm32mp1): add define for external scratch buffer for nand devices
  feat(mtd): add platform function to allow using external buffer
  feat(libc): introduce __maybe_unused

3 years agoMerge changes from topic "mt8188" into integration
Manish Pandey [Mon, 5 Sep 2022 13:54:11 +0000 (15:54 +0200)]
Merge changes from topic "mt8188" into integration

* changes:
  feat(mt8188): add pinctrl support
  feat(mt8188): add RTC support
  feat(mt8188): add pmic and pwrap support
  refator(mediatek): move pmic.[c|h] to common folder
  refator(mediatek): move common definitions of pmic wrap to common folder
  feat(mt8188): add IOMMU enable control in SiP service
  feat(mt8188): add display port control in SiP service
  fix(mediatek): use uppercase for definition
  feat(mediatek): move dp drivers to common folder
  feat(mediatek): move mtk_cirq.c drivers to cirq folder
  feat(mt8188): initialize GIC
  feat(mt8188): initialize systimer
  feat(mt8188): initialize platform for MediaTek MT8188
  refator(mediatek): remove unused files
  refator(mediatek): move drivers folder in common to plat/mediatek
  feat(mediatek): support coreboot BL31 loading

3 years agofeat(mt8188): add pinctrl support
Jianguo Zhang [Fri, 29 Jul 2022 05:55:03 +0000 (13:55 +0800)]
feat(mt8188): add pinctrl support

Add pinctrl support for MT8188.

TEST=build pass
BUG=b:236331724

Signed-off-by: Jianguo Zhang <jianguo.zhang@mediatek.corp-partner.google.com>
Change-Id: Id4ac8f67009621fff8f15f3ab2d8f200343c8356

3 years agofeat(mt8188): add RTC support
Song Fan [Mon, 25 Jul 2022 11:50:52 +0000 (19:50 +0800)]
feat(mt8188): add RTC support

TEST=build pass.
BUG=b:233720142

Signed-off-by: Song Fan <ot_song.fan@mediatek.corp-partner.google.com>
Change-Id: I348eff0f53341593f74a63780e2e8298cbc3ec88

3 years agofeat(mt8188): add pmic and pwrap support
Hui Liu [Thu, 28 Jul 2022 12:28:32 +0000 (20:28 +0800)]
feat(mt8188): add pmic and pwrap support

Add PWRAP and PMIC driver to support power-off.

TEST=build pass.
BUG=b:233720142

Signed-off-by: Hui Liu <hui.liu@mediatek.corp-partner.google.com>
Change-Id: Id9951134925f6cb5f8d304a7b8e7901837809bd9

3 years agorefator(mediatek): move pmic.[c|h] to common folder
Bo-Chen Chen [Thu, 1 Sep 2022 08:32:46 +0000 (16:32 +0800)]
refator(mediatek): move pmic.[c|h] to common folder

These two files are identical on MT8192 and MT8195. They can also be
used on MT8188. So move them to common/drivers/pmic/.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I8c12d15f1da79ab5767ac02b3ab70e8508155ee8

3 years agorefator(mediatek): move common definitions of pmic wrap to common folder
Bo-Chen Chen [Thu, 1 Sep 2022 07:16:23 +0000 (15:16 +0800)]
refator(mediatek): move common definitions of pmic wrap to common folder

Some definitions can be shared among mt8192, mt8195, and
mt8186, so move them to pmic_wrap_init_common.h.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I992b61a47a84039fe8c246e2ff75721c57ee41a5

3 years agofeat(mt8188): add IOMMU enable control in SiP service
Chengci Xu [Wed, 20 Jul 2022 08:20:15 +0000 (16:20 +0800)]
feat(mt8188): add IOMMU enable control in SiP service

Add SiP service for multimedia & infra master to enable/disable
MM & INFRA IOMMU in secure world

TEST=build pass
BUG=b:236339614

Signed-off-by: Chengci Xu <chengci.xu@mediatek.corp-partner.google.com>
Change-Id: I4eb1fda6044cf2cb6c22c005cb2fa550906b71e9

3 years agofeat(mt8188): add display port control in SiP service
Rex-BC Chen [Mon, 11 Jul 2022 11:03:35 +0000 (19:03 +0800)]
feat(mt8188): add display port control in SiP service

MTK display port mute/unmute control registers need to be
set in secure world.

TEST=build pass
BUG=b:236331724

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I0aa0675f07c80aab4349493bfbb0782bf0bbef58

3 years agofix(mediatek): use uppercase for definition
Rex-BC Chen [Tue, 12 Jul 2022 02:24:26 +0000 (10:24 +0800)]
fix(mediatek): use uppercase for definition

Use uppercase for definition.
s/eDP_SEC_BASE/EDP_SEC_BASE/.
s/eDP_SEC_SIZE/EDP_SEC_SIZE/.

TEST=build pass for mt8195
BUG=b:233720142

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I390055500a6347b67fefde36a7f103438ba2d5ff

3 years agofeat(mediatek): move dp drivers to common folder
Rex-BC Chen [Mon, 11 Jul 2022 10:48:43 +0000 (18:48 +0800)]
feat(mediatek): move dp drivers to common folder

Display port driver can be reused, so we move it to common/drivers.

TEST=build mt8195 pass
BUG=b:233720142

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I58c7b41ba3ad653cdf6f6fbae6778abfd7e950a9

3 years agofeat(mediatek): move mtk_cirq.c drivers to cirq folder
Rex-BC Chen [Fri, 8 Jul 2022 06:48:56 +0000 (14:48 +0800)]
feat(mediatek): move mtk_cirq.c drivers to cirq folder

To use cirq drivers more easier, we place mtk_cirq.c and mtk_cirq.h
to common/drivers/cirq.

We also rename mtk_cirq.c/h to mt_cirq.c/h for consistency with other
driver folders.

TEST=build pass for mt8192/mt8195/mt8186
BUG=b:236331724

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I71bc442f00b16fb4031260937982c0496fcaaea0

3 years agofeat(mt8188): initialize GIC
Rex-BC Chen [Fri, 8 Jul 2022 05:58:33 +0000 (13:58 +0800)]
feat(mt8188): initialize GIC

Initialize GIC for mt8188.

TEST=build pass
BUG=b:236331724

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I5acf77d654f1bbce32e9fbb3f3567600b7db10ed

3 years agofeat(mt8188): initialize systimer
Rex-BC Chen [Fri, 8 Jul 2022 05:16:17 +0000 (13:16 +0800)]
feat(mt8188): initialize systimer

Add systimer to support timer function.

TEST=build pass
BUG=b:236331724

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: Ibe6b96a162caa8804bebb7ff7de326ebcb2a6daa

3 years agofeat(mt8188): initialize platform for MediaTek MT8188
Rex-BC Chen [Thu, 7 Jul 2022 11:30:22 +0000 (19:30 +0800)]
feat(mt8188): initialize platform for MediaTek MT8188

- Add basic platform setup.
- Add MT8188 documentation at docs/plat/.
- Add generic CPU helper functions.
- Add basic register address.
- Add mtk_pm.c in lib/pm

TEST=build pass
BUG=b:236331724

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I5f8617c42ffba2c9d3a16f3980cb75fda5624031

3 years agorefator(mediatek): remove unused files
Bo-Chen Chen [Mon, 5 Sep 2022 05:03:34 +0000 (13:03 +0800)]
refator(mediatek): remove unused files

We do not use oem_svc.[c|h], so remove them.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I0afb64d997cf4e23063f4fa2226e8d2649d22574

3 years agorefator(mediatek): move drivers folder in common to plat/mediatek
Bo-Chen Chen [Mon, 5 Sep 2022 03:18:04 +0000 (11:18 +0800)]
refator(mediatek): move drivers folder in common to plat/mediatek

We plan to put some soc related drivers in common/drivers. To reduce
confision, we move them to plat/mediatek.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I6b344e660f40a23b15151aab073d3045b28f52aa