Commit Graph

8945 Commits

Author SHA1 Message Date
Anurag Koul 387a9065a2 fix(fdts/morello): fix scmi clock specifier to cluster mappings
Fix the mapping of SCMI clock specifiers to the clusters they drive.
Also, add CPU cores to cluster mappings.

Signed-off-by: Anurag Koul <anurag.koul@arm.com>
Change-Id: I230bea5614de4e29b54e1686b31bf01c0b6aa86c
2021-06-16 14:38:08 +01:00
Mark Dykes b085b990ed Merge "feat(plat/mediatek/mpu): add MPU support for DSP" into integration 2021-06-10 00:09:13 +02:00
Mark Dykes 66bf006e28 Merge "fix(security): Set MDCR_EL3.MCCD bit" into integration 2021-06-08 18:26:52 +02:00
Joanna Farley 8055bbf7bb Merge "docs(imx8m): update build support for imx8mq" into integration 2021-06-08 17:23:06 +02:00
Jacky Bai e3c07d2f5a docs(imx8m): update build support for imx8mq
Due to the small OCRAM space used for TF-A, we will
meet imx8mq build failure caused by too small RAM size.
We CANNOT support it in TF-A CI. It does NOT mean that
imx8mq will be dropped by NXP. NXP will still actively
maintain it in NXP official release.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: Iad726ffbc4eedc5f6770612bb9750986b9324ae9
2021-06-08 09:35:14 +08:00
Madhukar Pappireddy b39a1308ab Merge changes I85a87dc9,If75df769,I55b0c910 into integration
* changes:
  feat(plat/st): add STM32MP_EMMC_BOOT option
  feat(drivers/st): manage boot part in io_mmc
  feat(drivers/mmc): boot partition read support
2021-06-07 18:21:16 +02:00
Manish Pandey 95d064b451 Merge "fix(plat/marvell/armada): select correct pcie reference clock source" into integration 2021-06-07 15:45:30 +02:00
Manish Pandey 076bb38df5 Merge "fix(plat/marvell/a3720/uart): fix UART parent clock rate determination" into integration 2021-06-07 15:36:46 +02:00
Joanna Farley 7737fdf0ed Merge "docs: add threat model code owners" into integration 2021-06-06 16:06:54 +02:00
Olivier Deprez 1a2c0ff927 Merge changes from topic "od/cleanup-changes" into integration
* changes:
  perf(spmd): omit sel1 context save if sel2 present
  fix(fvp): spmc optee manifest remove SMC allowlist
  fix: random typos in tf-a code base
2021-06-04 14:50:20 +02:00
Vyacheslav Yurkov 214c8a8d08 feat(plat/st): add STM32MP_EMMC_BOOT option
Added a new STM32MP_EMMC_BOOT option, which is used to look for SSBL in
the same eMMC boot partition TF-A booted from at a fixed 256k offset. In
case STM32 image header is not found, the boot process rolls back to a
GPT partition look-up scheme.

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Change-Id: I85a87dc9ae7f2b915ed8e584be80f4b3588efc48
2021-06-04 10:10:51 +02:00
Vyacheslav Yurkov f3d2750aa2 feat(drivers/st): manage boot part in io_mmc
Use dedicated read function for boot partition

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Change-Id: If75df7691fce0797205365736fc6e4e3429efdca
2021-06-04 10:08:39 +02:00
Vyacheslav Yurkov 5014b52dec feat(drivers/mmc): boot partition read support
Added a public function to read blocks from a current boot partition.
switch between partitions has to respect eMMC partition switch timing.

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Change-Id: I55b0c910314253e5647486609583fd290dadd30a
2021-06-04 09:52:37 +02:00
Madhukar Pappireddy 0ef419b145 Merge "feat(plat/zynqmp): add SDEI support" into integration 2021-06-03 16:52:26 +02:00
Jan Kiszka 4143268a5c feat(plat/zynqmp): add SDEI support
Add basic SDEI support, implementing the software event 0 only for now.
This already allows hypervisors like Jailhouse to use SDEI for internal
signaling while passing the GICC through to the guest (see also IMX8).

With SDEI on, we overrun the SRAM and need to stay in DRAM. So keep SDEI
off by default.

Co-developed-by: Angelo Ruocco <angeloruocco90@gmail.com>
Signed-off-by: Angelo Ruocco <angeloruocco90@gmail.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Change-Id: Ic0d71b4ef0978c0a34393f4e3530ed1e24a39ca2
2021-06-03 16:34:12 +02:00
Madhukar Pappireddy a49babce63 Merge changes from topic "stm32_bl2_io" into integration
* changes:
  refactor(plat/st): remove io_dummy code for OP-TEE
  refactor(plat/st): remove BL2 image loading
  refactor(plat/st): rename OP-TEE pager to core
2021-06-03 16:08:35 +02:00
Yann Gautier 3f916a412a refactor(plat/st): remove io_dummy code for OP-TEE
The io_dummy code and function calls are only used in case BL32 is TF-A
SP_min, and not OP-TEE. This code in bl2_io_storage can then be put under
#ifndef AARCH32_SP_OPTEE.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I52787a775160b335f97547203f653419621f5147
2021-06-03 10:48:57 +02:00
Yann Gautier e1db570a30 refactor(plat/st): remove BL2 image loading
STM32MP1 does not use BL1, the loading of BL2 is done by ROM code. It is
then useless to have an entry BL2_IMAGE_ID in the policies.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I464cedf588114d60522433123f8dbef32ae36818
2021-06-03 10:45:17 +02:00
Yann Gautier 06c3b100ea refactor(plat/st): rename OP-TEE pager to core
OPTEE_PAGER defines are renamed OPTEE_CORE.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I4c28d3b0a6ed843088a3ef06e3e348ce689fabde
2021-06-03 10:43:42 +02:00
Olivier Deprez 678ce2237c perf(spmd): omit sel1 context save if sel2 present
The SPMC at S-EL2 manages S-EL1 execution contexts for SPs. The
currently running SP vCPU state is always saved when the SPMC exits to
SPMD. A fresh vCPU context is always restored when the SPMC is entered
from the SPMD and a SP resumed. For performance optimization reasons
this permits omitting the saving/restoring of the S-EL1 context from
within the EL3 SPMD on entering/exiting the SPMC. The S-EL2 SPMC and
NS-EL1 context save/restore remain done in the SPMD.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I66413ed5983913791ff5c9fc03c590ee65c6ccd7
2021-06-03 09:31:24 +02:00
Olivier Deprez 183725b39d fix(fvp): spmc optee manifest remove SMC allowlist
Fix a remainder from early prototyping. OP-TEE as a secure partition
does not need specific SMC function id pass through to EL3.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I2843d1b9a5eb4c966f82790e1655fb569c2de7d4
2021-06-03 09:31:18 +02:00
Olivier Deprez 2e61d6871c fix: random typos in tf-a code base
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: Id610f7e4398e799a2fbd74861274fd684c32db53
2021-06-03 09:31:10 +02:00
Manish Pandey cbcdf688a1 Merge "fix(plat/arm): correct UUID strings in FVP DT" into integration 2021-06-03 08:41:33 +02:00
Yann Gautier 748bdd19aa fix(plat/arm): correct UUID strings in FVP DT
The UUID strings used in FW_CONFIG DT are not aligned with UUIDs defined
in include/tools_share/firmware_image_package.h for BL32_EXTRA1 and
TRUSTED_KEY_CERT.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I517f8f9311585931f2cb931e0588414da449b694
2021-06-02 17:21:06 +02:00
Madhukar Pappireddy 2512d0480f Merge "feat(plat/imx8m): add SiP call for secondary boot" into integration 2021-06-02 15:45:29 +02:00
Pali Rohár 5a91c439cb fix(plat/marvell/a3720/uart): fix UART parent clock rate determination
The UART code for the A3K platform assumes that UART parent clock rate
is always 25 MHz. This is incorrect, because the xtal clock can also run
at 40 MHz (this is board specific).

The frequency of the xtal clock is determined by a value on a strapping
pin during SOC reset. The code to determine this frequency is already in
A3K's comphy driver.

Move the get_ref_clk() function from the comphy driver to a separate
file and use it for UART parent clock rate determination.

Signed-off-by: Pali Rohár <pali@kernel.org>
Change-Id: I8bb18a2d020ef18fe65aa06ffa4ab205c71be92e
2021-06-02 14:19:52 +01:00
Madhukar Pappireddy 203d48adca Merge "refactor(plat/marvell/uart): de-duplicate PLAT_MARVELL_UART macros" into integration 2021-06-01 20:24:05 +02:00
Madhukar Pappireddy 94869f0fd1 Merge "refactor(plat/marvell/uart): remove unused macros" into integration 2021-06-01 18:58:39 +02:00
Guo Yi 371648e1c7 fix(plat/marvell/armada): select correct pcie reference clock source
when comphy is in pcie mode, correct reference clock need be
selected according to SAR register that reflect the CPx_MPP boot
strapping pins. Either from external or from internal

Signed-off-by: Guo Yi <yguo@cavium.com>
Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
Change-Id: I99ed64a141e85174cc0f8e9dab5886ab2506efa1
2021-06-01 17:44:21 +02:00
Madhukar Pappireddy 73a3db718c Merge "fix(morello): initialise CNTFRQ in Non Secure CNTBaseN" into integration 2021-06-01 17:07:45 +02:00
Madhukar Pappireddy 906116f829 Merge "fix(plat/marvell/a3720/uart): fix configuring UART clock" into integration 2021-06-01 16:45:49 +02:00
Pali Rohár 3133625859 refactor(plat/marvell/uart): de-duplicate PLAT_MARVELL_UART macros
Macros PLAT_MARVELL_BOOT_UART* and PLAT_MARVELL_CRASH_UART* are defined
to same values. De-duplicate them into PLAT_MARVELL_UART* macros.

Signed-off-by: Pali Rohár <pali@kernel.org>
Change-Id: Iae5daf7cad6a971e6f3dbe561df3d0174106ca7f
2021-06-01 16:34:52 +02:00
Pali Rohár 6b557f48c3 refactor(plat/marvell/uart): remove unused macros
Macros PLAT_MARVELL_BL31_RUN_UART* are not used since commit
d7c4420cb8 ("plat/marvell: Migrate to multi-console API").

Remove them.

Signed-off-by: Pali Rohár <pali@kernel.org>
Change-Id: I5ec959ef4de87dcfb332c017ad2599bf8af6ffc3
2021-06-01 16:34:08 +02:00
Pali Rohár b9185c75f7 fix(plat/marvell/a3720/uart): fix configuring UART clock
When configuring the UART_BAUD_REG register, the function
console_a3700_core_init() currently only changes the baud divisor field,
leaving other fields to their previous value.

This is incorrect, because the baud divisor is computed with the
assumption that the parent clock rate is 25 MHz, and since the other
fields in this register configure the parent clock, which could have
been changed by U-Boot or Linux.

Fix this function to also configure the other fields so that the UART
parent clock is selected to be the xtal clock.

For example without this change TF-A prints only

    ERROR: a3700_system_off needs to be implemented

followed by garbage after plat_crash_console_init() is called.

After applying this change instead of garbage it also print crash info:

    PANIC at PC : 0x0000000004023800

Signed-off-by: Pali Rohár <pali@kernel.org>
Change-Id: I72f338355cc60d939b8bb978d9c7fdd576416b81
2021-06-01 16:32:10 +02:00
Madhukar Pappireddy 4fe55a2fd8 Merge "fix(plat/marvell/a3720/uart): fix UART clock rate value and divisor calculation" into integration 2021-06-01 16:13:11 +02:00
Madhukar Pappireddy fb88c71d2a Merge "feat(plat/mdeiatek/mt8195): add display port control in SiP service" into integration 2021-06-01 15:36:16 +02:00
Madhukar Pappireddy e4622d3cec Merge "feat(plat/zynqmp): add support for XCK26 silicon" into integration 2021-06-01 15:35:45 +02:00
Manoj Kumar 7f2d23d9d7 fix(morello): initialise CNTFRQ in Non Secure CNTBaseN
Morello exhibits the behavior similar to Juno wherein CNTBaseN.CNTFRQ
can be written but does not reflect the value of the CNTFRQ register
in CNTCTLBase frame. This doesn't follow ARM ARM in that the value
updated in CNTCTLBase.CNTFRQ is not reflected in CNTBaseN.CNTFRQ.

Hence enable the workaround (applied to Juno) for Morello that updates
the CNTFRQ register in the Non Secure CNTBaseN frame.

Change-Id: Iabe53bf3c25152052107e08321323e4bde5fbef4
Signed-off-by: Manoj Kumar <manoj.kumar3@arm.com>
2021-06-01 13:11:50 +01:00
Jiaxin Yu 6c4973b0a9 feat(plat/mediatek/mpu): add MPU support for DSP
Forbidden domain D4(DSP) access 0x40000000~0x1FFFF0000.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Change-Id: If409df10cecbcccc493d7958ab2765fd110d9009
2021-05-31 10:13:16 +01:00
Olivier Deprez b35f8f2d1e Merge "feat(tc0): add support for trusted services" into integration 2021-05-31 08:44:33 +02:00
Venkatesh Yadav Abbarapu 7a30e08b70 feat(plat/zynqmp): add support for XCK26 silicon
Add support for XCK26 silicon which is available on SOM board.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: Ic98213328702903af8a79f487a2868f3e6d60338
2021-05-30 21:37:20 -06:00
Madhukar Pappireddy 2ea8d41979 Merge "fix: rename Matterhorn, Matterhorn ELP, and Klein CPUs" into integration 2021-05-28 22:08:24 +02:00
johpow01 c6ac4df622 fix: rename Matterhorn, Matterhorn ELP, and Klein CPUs
This patch renames the Matterhorn, Matterhorn ELP, and Klein CPUs to
Cortex A710, Cortex X2, and Cortex A510 respectively.

Signed-off-by: John Powell <john.powell@arm.com>
Change-Id: I056d3114210db71c2840a24562b51caf2546e195
2021-05-28 13:53:23 -05:00
Pali Rohár 66a7752834 fix(plat/marvell/a3720/uart): fix UART clock rate value and divisor calculation
UART parent clock is by default the platform's xtal clock, which is
25 MHz.

The value defined in the driver, though, is 25.8048 MHz. This is a hack
for the suboptimal divisor calculation
  Divisor = UART clock / (16 * baudrate)
which does not use rounding division, resulting in a suboptimal value
for divisor if the correct parent clock rate was used.

Change the code for divisor calculation to
  Divisor = Round(UART clock / (16 * baudrate))
and change the parent clock rate value to 25 MHz.

The final UART divisor for default baudrate 115200 is not affected by
this change.

(Note that the parent clock rate should not be defined via a macro,
since the xtal clock can also be 40 MHz. This is outside of the scope of
this fix, though.)

Signed-off-by: Pali Rohár <pali@kernel.org>
Change-Id: Iaa401173df87aec94f2dd1b38a90fb6ed0bf0ec6
2021-05-28 10:13:06 +01:00
Madhukar Pappireddy 0f7d2e8911 Merge "fix(plat/mediatek/pmic_wrap): update idle flow" into integration 2021-05-27 16:56:28 +02:00
Madhukar Pappireddy 1f8dceeac1 Merge "feat(plat/sgi): enable use of PSCI extended state ID format" into integration 2021-05-27 15:50:00 +02:00
Manish Pandey e55d12b7eb Merge changes from topic "Arm_PCI_Config_Space_Interface" into integration
* changes:
  TF-A: Document SMC_PCI_SUPPORT option
  SMCCC/PCI: Handle std svc boilerplate
  SMCCC/PCI: Add initial PCI conduit definitions
  SMCCC: Hoist SMC_32 sanitization
2021-05-27 09:49:10 +02:00
Pranav Madhu 7bd64c70e9 feat(plat/sgi): enable use of PSCI extended state ID format
The SGI/RD platforms have been using PSCI state ID format as defined in
PSCI version prior to 1.0. This is being changed and the PSCI extended
state ID format as defined in PSCI version 1.1 is being adapted. In
addition to this, the use of Arm recommended PSCI state ID encoding is
enabled as well.

Change-Id: I2be8a9820987a96b23f4281563b6fa22db48fa5f
Signed-off-by: Pranav Madhu <pranav.madhu@arm.com>
2021-05-27 10:29:17 +05:30
Hsin-Hsiung Wang 9ed4e6fb66 fix(plat/mediatek/pmic_wrap): update idle flow
Update idle flow in case of last read command timeout.

Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Change-Id: Idb0552d70d59b23822c38269d0fa9fe9ac0d6975
2021-05-27 02:13:37 +01:00
Madhukar Pappireddy b941145973 Merge "fix(services): drop warning on unimplemented calls" into integration 2021-05-27 00:45:41 +02:00