Commit graph

11359 commits

Author SHA1 Message Date
Olivier Deprez
9a5dec6695 Merge "fix(bl31): allow use of EHF with S-EL2 SPMC" into integration 2022-09-02 11:06:52 +02:00
Himanshu Sharma
4a81e91f27 fix(n1sdp): mapping Run-time UART to IOFPGA UART0
Currently the Run-time UART is mapped to AP UART1 which is internally
routed to MCP UART1, so unsharing it from AP UART1 and mapping it to
IOFPGA UART0 for exclusiveness among the usage of the UARTs.

Signed-off-by: Himanshu Sharma <Himanshu.Sharma@arm.com>
Change-Id: I366740a971a880decf0d373e9055e7ebda5df53a
2022-09-01 15:23:49 +05:30
sahil
2974d2f2d0 fix(n1sdp): add numa node id for pcie controllers
If not mentioned explicitly, numa-node-id for pcie_ctlr
is assigned as unknown. With this patch pcie_ctlr and
ccix_pcie_ctlr are assigned numa-node-id=0 and
pcie_secondary_ctlr is assigned numa-node-id=1.

Signed-off-by: sahil <sahil@arm.com>
Change-Id: I533abdd6ea162df7b15ee04cbfc48ba7a544b91a
2022-09-01 15:23:42 +05:30
SAHIL
e6ffafbeea fix(n1sdp): replace non-inclusive terms from dts file
Signed-off-by: sahil <sahil@arm.com>
Change-Id: I6aa3b6dcf7c2fea18ea2d4f44a2293123ff34bdf
2022-09-01 15:23:35 +05:30
Lauren Wehrmeister
ada1daeda9 Merge "refactor(cpu): update IP names of Makalu CPU lib" into integration 2022-08-31 20:42:52 +02:00
Rupinderjit Singh
c58b9a8e12 refactor(cpu): update IP names of Makalu CPU lib
* ASM files are renamed to have public IP names in their filename.
   * updated other files to include ASM filename changes.

Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
Change-Id: Ie899c512b11fd7c4312e3a808bb6b9d2376cdb8c
2022-08-31 18:31:29 +01:00
Lauren Wehrmeister
3a0b28cb35 Merge "chore: use tabs for indentation" into integration 2022-08-31 17:32:16 +02:00
Rex-BC Chen
ef988aed9e feat(mediatek): support coreboot BL31 loading
The ChromeOS project uses Coreboot as BL2 instead of MediaTek regular
bootloader, so we use COREBOOT flag to support Coreboot boot flow.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I45e95ea51e90158187452eba52fc58090d1c60a4
2022-08-31 09:32:32 +08:00
Akram Ahmad
11d448c934 fix(errata): workaround for Cortex-A510 erratum 2347730
Cortex-A510 erratum 2347730 is a Cat B erratum that affects
revisions r0p0, r0p1, r0p2, r0p3, r1p0 and r1p1. It is
fixed in r1p2. The workaround is to set CPUACTLR_EL1[17]
to 1, which will disable specific microarchitectural clock
gating behaviour.

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

Signed-off-by: Akram Ahmad <Akram.Ahmad@arm.com>
Change-Id: I115386284c2d91bd61515142f971e2e72de43e68
2022-08-30 20:38:27 +01:00
Jorge Troncoso
e2fe267d87 chore: use tabs for indentation
This patch changes definitions of bl2_mem_params_descs 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: I7bd99a50a79499aca0d349e49a3e095e6c5d2f08
2022-08-30 19:40:44 +02:00
Hari Nagalla
4a566b26ae feat(ti-k3): add support for J784S4 SoCs
The J784S4 SoC has two quad Cortex-A72 core clusters. This is the first
SoC in the K3 family with Quad cores in a A-72 cluster. So, a new board
configuration is introduced to support quad core clusters on the J784S4
SoC of the K3 family of devices.

See J784S4 Technical Reference Manual (SPRUJ52 - JUNE 2022)
for further details: http://www.ti.com/lit/zip/spruj52

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
Change-Id: I0ed1f14ab32a56ae06e3df3161ace4597d14a48d
2022-08-30 11:10:53 -05:00
Raghu Krishnamurthy
7c2fe62f13 fix(bl31): allow use of EHF with S-EL2 SPMC
Currently, when SPMC at S-EL2 is used, we cannot use the RAS framework
to handle Group 0 interrupts. This is required on platforms where first
level of triaging needs to occur at EL3, before forwarding RAS handling
to a secure partition running atop an SPMC (hafnium).
The RAS framework depends on EHF and EHF registers for Group 0
interrupts to be trapped to EL3 when execution is both in secure world
and normal world. However, an FF-A compliant SPMC requires secure
interrupts to be trapped by the SPMC when execution is in S-EL0/S-EL1.
Consequently, the SPMC (hafnium) is incompatible with EHF, since it is
not re-entrant, and a Group 0 interrupt trapped to EL3 when execution is
in secure world, cannot be forwarded to an SP running atop SPMC.
This patch changes EHF to only register for Group 0 interrupts to be
trapped to EL3 when execution is in normal world and also makes it a
valid routing model to do so, when EL3_EXCEPTION_HANDLING is set (when
enabling the RAS framework).

Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
Change-Id: I72d4cf4d8ecc549a832d1c36055fbe95866747fe
2022-08-30 08:29:25 -07:00
Madhukar Pappireddy
00460e7dfa Merge "docs(marvell): document UART image downloading" into integration 2022-08-30 16:31:10 +02:00
Olivier Deprez
5340c5a041 Merge changes from topics "mtk_cold_boot", "mtk_init_scheme", "smc_registration_use_case", "vendor_extend_pubsub_event" into integration
* changes:
  feat(mediatek): implement generic platform port
  refactor(mediatek): smc registration services
  feat(mediatek): introduce mtk init framework
  refactor(mediatek): partition MTK SiP SMC ID
  feat(mediatek): extend SiP vendor subscription events
2022-08-30 12:26:47 +02:00
Leon Chen
394b92084d feat(mediatek): implement generic platform port
Implement mandatory platform port functions. Receive
boot arguments from bl2, populate bl33 and bl32 image
entry structs, call each MTK initcall levels
in these mandatory platform port functions.
After bl31_main exit and handover to 2nd boot loader,
mtk bl33 issues SMC and traps to TF-A to execute boot_to_kernel
and then handover to Linux kernel.

Signed-off-by: Leon Chen <leon.chen@mediatek.com>
Change-Id: I8d5a3511668fc749c4c71edf1ac700002cb5a9c8
2022-08-30 16:47:43 +08:00
Leon Chen
6a7e8ebf76 refactor(mediatek): smc registration services
To modularize SMC handler, provide macro function in mtk_sip_svc.h.
Drivers register SMC name with value in mtk_sip_def.h, and bind the SMC
handler with the SMC ID by calling DECLARE_SMC_HANDLER macro.

MTK_SIP_SMC_FROM_BL33_TABLE expand the SMC table as switch-case table
statically. DECLARE_SMC_HANDLER wrap SMC handlers with a structure and
put in a section.
During cold boot initialization, in MTK_EARLY_PLAT_INIT level parse the
section to assign each handler with an index. Each SMC request can be
identified with switch-case and take the index to call into
corresponding SMC handler.

Signed-off-by: Leon Chen <leon.chen@mediatek.com>
Change-Id: I03da212c786de0ec0ea646ba906065ecfcd82571
2022-08-30 16:47:43 +08:00
Leon Chen
52035dee1a feat(mediatek): introduce mtk init framework
Provide six initcall levels for drivers/modules initialize HW
controllers or runtime arguments during cold boot.

The initcall level cold boot execution order:

-MTK_EARLY_PLAT_INIT
Call before MMU enabled.

-MTK_ARCH_INIT
MMU Enabled, arch related init(GiC init, interrupt type registration).

-MTK_PLAT_SETUP_0_INIT
MTK driver init level 0.

-MTK_PLAT_SETUP_1_INIT
MTK driver init level 1.

-MTK_PLAT_RUNTIME_INIT
MTK driver init. After this initcall, TF-A handovers to MTK 2nd
bootloader.

-MTK_PLAT_BL33_DEFER_INIT
MTK 2nd bootloader traps to TF-A before handover to rich OS.
This initcall executed in the trap handler(boot_to_kernel).

Signed-off-by: Leon Chen <leon.chen@mediatek.com>
Change-Id: Icd7fe95372441db73c975ccb6ce77a6c529df1cc
2022-08-30 16:47:43 +08:00
Leon Chen
2f3f5939a1 refactor(mediatek): partition MTK SiP SMC ID
Manage MTK SiP SMC ID with macros for 32/64 bit and
function declaration code generation.
Partition SMC ID with different exception level sources.

Signed-off-by: Leon Chen <leon.chen@mediatek.com>
Change-Id: I8966cd94f0d825e7ebae08833d2bd9fceedfd45e
2022-08-30 16:47:43 +08:00
Leon Chen
99d30b72c0 feat(mediatek): extend SiP vendor subscription events
Leverage pubsub event framework to customize vendor's
event for better software modularization instead of adding
call entries in abstraction layer for customized platform function
with wrap-up define.

Signed-off-by: Leon Chen <leon.chen@mediatek.com>
Change-Id: I48be2303c45f759776fa2baa1c21130c1a8f0fa3
2022-08-30 16:47:43 +08:00
Lionel Debieve
e0bbc190d5 feat(stm32mp1): allow to override MTD base offset
Add an external parameter STM32MP_FORCE_MTD_START_OFFSET that allows to
override the default FIP offset used to read the first programmed image.
It can be used for NOR, RAW_NAND or SPI_NAND boot device.

Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Change-Id: Ibe664aae0e5ee90dd6629e544c9e034d751fffed
2022-08-30 09:20:20 +02:00
Yann Gautier
d3434dca0b feat(stm32mp1): manage second NAND OTP on STM32MP13
On STM32MP13, 2 OTP fuses can be used to configure NAND devices.
By default OTP CFG9 is used for sNAND. A new OTP (CFG10) is used
to configure raw NAND. Thanks to bit 0 of CFG10 OTP, this default
configuration can be switched.
For sNAND on STM32MP13, the NAND_PARAM_STORED_IN_OTP is not used.
The sNAND parameters have to be taken from OTP bits.

Change-Id: Ib95e0f9b9e66179a58b07f723ea01dce68b96475
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
2022-08-30 09:20:20 +02:00
Lionel Debieve
9ee2510b62 feat(stm32mp1): add define for external scratch buffer for nand devices
Override the default platform function to use an external buffer
on STM32MP13 platform.
It allows to use a temporary buffer located at the SRAM1 memory end.

Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
Change-Id: Ibd84bb336c60af24608268916b3a18bb5a0fa3db
2022-08-30 09:20:20 +02:00
Lionel Debieve
f29c0702d2 feat(mtd): add platform function to allow using external buffer
The scratch buffer could be large. The new function allows
platform to defined its own external buffer or use the default
one.

Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
Change-Id: Ib7ab8ff19fa0a9cb06e364f058b91af58c3c471a
2022-08-30 09:20:20 +02:00
Yann Gautier
351f9cd889 feat(libc): introduce __maybe_unused
Checkpatch script doesn't support __unused macro. To avoid errors, add
__maybe_unused macro, which is supported.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I795134fb152991f2bc804a6b3be2fd1da7032758
2022-08-30 09:20:20 +02:00
Madhukar Pappireddy
029f9b9c01 Merge changes I60b3b59e,Ibd5d22b4 into integration
* changes:
  fix(ufs): init utrlba/utrlbau with desc_base
  fix(ufs): fix slot base address computation
2022-08-29 15:35:35 +02:00
Yann Gautier
5dbda5cb23 refactor(stm32mp15-fdts): remove timers15 node
The node is currently not used in TF-A. Remove it.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Iedc4745f155ebb9c80132311a8623e4498f0689f
2022-08-26 12:59:57 +02:00
Yann Gautier
f0c19f252b refactor(stm32mp15-fdts): remove unused secure-status properties
For peripheral where both status and secure-status are set to okay,
the function fdt_get_status() returns the same status (DT_SHARED) if
secure-status property is omitted. This secure-status property can then
be removed in boards DT files for iwdg nodes.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I9f9360842d4d41288db0cf1b92063f347c72d137
2022-08-26 12:59:57 +02:00
Yann Gautier
0791aaf442 refactor(stm32mp15-fdts): remove RCC secure-status
The RCC security is managed with a dedicated compatible:
"st,stm32mp1-rcc-secure" [1].
Remove useless secure-status property in boards rcc nodes.

[1] 812daf916c ("feat(st): update the security based on new compatible")

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Iff31044ade78dd9c432120dce65375fe2b0d36d6
2022-08-26 12:59:57 +02:00
Madhukar Pappireddy
46577fb599 Merge "feat(stm32mp15-fdts): add Avenger96 board with STM32MP157A DHCOR SoM" into integration 2022-08-25 23:11:19 +02:00
Johann Neuhauser
51e223058f feat(stm32mp15-fdts): add Avenger96 board with STM32MP157A DHCOR SoM
This should replace the stm32mp157a-avenger96.dts with the new device
tree files split into the STM32MP15 DHCOR SoM definition and the
Avenger96 baseboard like it's done in Linux and U-Boot.

Differences to stm32mp157a-avenger96.dts:
- Enable sdmmc2 for booting from eMMC
- improved clock settings like in U-Boot commit b6055945
  "ARM: dts: stm32: Adjust PLL4 settings on AV96 again"
- improved DDR settings for DHSOMs like in U-Boot commit 92ca0f74
  "ARM: dts: stm32: Synchronize DDR setttings on DH SoMs"

TF-A with this new dts(i) files on this board was fully tested with
the latest OP-TEE developer setup.

Change-Id: I85ce8eca7747965af3555fc19fd7b192dc3e5740
Signed-off-by: Johann Neuhauser <jneuhauser@dh-electronics.com>
2022-08-25 22:11:33 +02:00
Olivier Deprez
0c0bab0cb4 Merge changes from topic "ffa_el3_spmc" into integration
* changes:
  feat(tsp): enable test cases for EL3 SPMC
  feat(tsp): increase stack size for tsp
  feat(tsp): add ffa_helpers to enable more FF-A functionality
2022-08-25 16:28:09 +02:00
Marc Bonnici
15ca1ee342 feat(tsp): enable test cases for EL3 SPMC
Introduce initial test cases to the TSP which are
designed to be exercised by the FF-A Test Driver
in the Normal World. These have been designed to
test basic functionality of the EL3 SPMC.

These tests currently ensure the following functionality:
  - Partition discovery.
  - Direct messaging.
  - Communication with a Logical SP.
  - Memory Sharing and Lending ABIs
  - Sharing of contiguous and non-contiguous memory regions.
  - Memory region descriptors spread of over multiple
    invocations.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Signed-off-by: Shruti Gupta <shruti.gupta@arm.com>
Change-Id: Iaee4180aa18d6b7ac7b53685c6589f0ab306e876
2022-08-25 14:57:20 +01:00
Shruti Gupta
5b7bd2af0b feat(tsp): increase stack size for tsp
TSP testcases for EL3 SPMC have higher stack usage.

Change-Id: Ib5bfdccc6d0f65174e257f3b0e8b41bcd3c704a6
Signed-off-by: Shruti Gupta <shruti.gupta@arm.com>
2022-08-25 13:37:34 +01:00
Marc Bonnici
e9b1f300a9 feat(tsp): add ffa_helpers to enable more FF-A functionality
Include ffa_helpers originally taken from the TF-A Tests repo
to provide support for additional FF-A functionality.

Change-Id: Iacc3ee270d5e3903f86f8078ed915d1e791c1298
Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Signed-off-by: Shruti Gupta <shruti.gupta@arm.com>
2022-08-25 13:37:19 +01:00
Kathleen Capella
14cddd7a58 fix(gpt): correct the GPC enable sequence
Since GPC control register fields are permitted to be cached in a TLB,
invalidate TLB after setting fields to ensure future checks are using
the updated values.

Signed-off-by: Kathleen Capella <kathleen.capella@arm.com>
Change-Id: I95630b40b673363bbf74da2705deca03089fff3a
2022-08-25 00:22:01 -04:00
Bipin Ravi
748749a870 Merge "fix(errata): workaround for Cortex-A510 erratum 2371937" into integration 2022-08-24 23:46:02 +02:00
Bipin Ravi
ac2605e69a Merge "fix(errata): workaround for Cortex-A78C erratum 2395411" into integration 2022-08-24 23:37:52 +02:00
Akram Ahmad
4b6f0026ea fix(errata): workaround for Cortex-A78C erratum 2395411
Cortex-A78C erratum 2395411 is a Cat B erratum that affects
revisions r0p1 and r0p2, and is currently open. The workaround
is to set CPUACTLR2_EL1[40] to 1, which will disable folding
of demand requests into older prefetches with L2 miss requests
outstanding.

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

Signed-off-by: Akram Ahmad <Akram.Ahmad@arm.com>
Change-Id: I4f0fb278ac20a2eb4dd7e4efd1b1246dd85e48c4
2022-08-24 19:46:13 +01:00
Bipin Ravi
e221c55c52 Merge "fix(errata): workaround for Cortex-A710 erratum 2147715" into integration 2022-08-24 20:10:21 +02:00
Akram Ahmad
a67c1b1b2b fix(errata): workaround for Cortex-A510 erratum 2371937
Cortex-A510 erratum 2371937 is a Cat B erratum that applies
to revisions r0p0, r0p1, r0p2, r0p3, r1p0, and r1p1. It is
fixed in r1p2. The workaround is to set the ATOM field of
CPUECTLR_EL1 (bits [40:38]) to 0b010, which will force all
cacheable atomic operations to be executed near.

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

Signed-off-by: Akram Ahmad <Akram.Ahmad@arm.com>
Change-Id: Ia219a609a3397e39631de65831ecff8a3cd1227e
2022-08-24 16:35:25 +02:00
Olivier Deprez
19037a7100 Merge changes from topic "ffa_el3_spmc" into integration
* changes:
  feat(tsp): add FF-A support to the TSP
  feat(fvp/tsp_manifest): add example manifest for TSP
  fix(spmc): fix relinquish validation check
2022-08-24 16:31:01 +02:00
Achin Gupta
4a8bfdb909 feat(tsp): add FF-A support to the TSP
This patch adds the FF-A programming model in the test
secure payload to ensure that it can be used to test
the following spec features.

1. SP initialisation on the primary and secondary cpus.
2. An event loop to receive direct requests and respond
   with direct responses.
3. Ability to receive messages that indicate power on
   and off of a cpu.
4. Ability to handle a secure interrupt.

Signed-off-by: Achin Gupta <achin.gupta@arm.com>
Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Signed-off-by: Shruti <shruti.gupta@arm.com>
Change-Id: I81cf744904d5cdc0b27862b5e4bc6f2cfe58a13a
2022-08-24 14:46:30 +01:00
Bipin Ravi
51efe88344 Merge "feat(qemu): increase size of bl31" into integration 2022-08-24 02:01:02 +02:00
Lauren Wehrmeister
9d5069e72b Merge "build: fix syntax error in semantic ver generation" into integration 2022-08-23 18:33:47 +02:00
Harrison Mutai
d424b8e71a build: fix syntax error in semantic ver generation
Change-Id: I344aa5c779ec3f0a410d3b8bc42b6014a9b37314
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2022-08-23 16:51:13 +01:00
Juan Pablo Conde
9ff5f754ae feat(pauth): add/modify helpers to support QARMA3
QARMA3 is a pointer authentication algorithm that generates
the PAC codes.

The is_armv8_3_pauth_present() helper was modified in order to
consider the presence of the QARMA3 algorithm (i.e.: when
ID_AA64ISAR2_EL1.{GPA3, APA3} fields are not 0.

In addition, helper is_feat_pacqarma3_present() was implemented to
explicitly detect the presence of QARMA3 algorithm.

Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
Change-Id: I68e8fa7f8b7ca50d74ae0a2f5f182236d68f3d7b
2022-08-23 11:28:33 -04:00
Joanna Farley
5936b5bedb Merge "build: fix semantic ver generation for windows" into integration 2022-08-23 17:01:34 +02:00
Joanna Farley
d97fc8de85 Merge "fix(zynqmp): fix for incorrect afi write mask value" into integration 2022-08-23 10:52:21 +02:00
Akshay Belsare
4264bd33e7 fix(zynqmp): fix for incorrect afi write mask value
Currently, the AFIFM6_WRCTRL bus-width configuration is not happening
correctly due to the wrong register write mask value. To fix this issue
updated the mask value handling logic.

Signed-off-by: Nava kishore Manne <nava.kishore.manne@amd.com>
Signed-off-by: Akshay Belsare <Akshay.Belsare@amd.com>
Acked-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Change-Id: I8443c369a84339018310cfb6cd498d21474da3e4
2022-08-23 11:50:52 +05:30
Akram Ahmad
3280e5e655 fix(errata): workaround for Cortex-A710 erratum 2147715
Cortex-A710 erratum 2147715 is a Cat B erratum that applies
to revision r2p0 of the CPU, and is fixed in r2p1. The work-
around is to set CPUACTLR_EL1[22]=1. Setting this will cause
the CFP instruction to invalidate all branch predictor resources
regardless of the context.

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

Signed-off-by: Akram Ahmad <Akram.Ahmad@arm.com>
Change-Id: I94771bc1fc9b65a0c17d75200ec2b1df8a3279c6
2022-08-22 20:30:36 +02:00