]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
3 years agofeat(plat/fvp): add EL3 SPMC #defines
Marc Bonnici [Mon, 29 Nov 2021 16:59:02 +0000 (16:59 +0000)]
feat(plat/fvp): add EL3 SPMC #defines

Introduce additional #defines for running with the EL3
SPMC on the FVP.

The increase in xlat tables has been chosen to allow
the test cases to complete successfully and may need
adjusting depending on the desired usecase.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I7f44344ff8b74ae8907d53ebb652ff8def2d2562

3 years agotest(plat/fvp/lsp): add example logical partition
Marc Bonnici [Thu, 19 Aug 2021 13:42:19 +0000 (14:42 +0100)]
test(plat/fvp/lsp): add example logical partition

Add an example logical partition to the FVP platform that
simply prints and echos the contents of a direct request
with the appropriate direct response.

Change-Id: Ib2052c9a63a74830e5e83bd8c128c5f9b0d94658
Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
3 years agofeat(spmc/lsp): add logical partition framework
Marc Bonnici [Mon, 14 Feb 2022 17:06:09 +0000 (17:06 +0000)]
feat(spmc/lsp): add logical partition framework

Introduce a framework to support running logical
partitions alongside the SPMC in EL3  as per the
v1.1 FF-A spec.

The DECLARE_LOGICAL_PARTITION macro has been added to
simplify the process to define a Logical Partition.
The partitions themselves are statically allocated
with the descriptors placed in RO memory.

It is assumed that the MAX_EL3_LP_DESCS_COUNT will
be defined by the platform.

Change-Id: I1c2523e0ad2d9c5d36aeeef6b8bcb1e80db7c443
Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
3 years agoMerge "build(commitlint): make the scope optional" into integration
Sandrine Bailleux [Wed, 4 May 2022 06:29:23 +0000 (08:29 +0200)]
Merge "build(commitlint): make the scope optional" into integration

3 years agoMerge changes from topic "allwinner-idle" into integration
André Przywara [Wed, 4 May 2022 00:10:02 +0000 (02:10 +0200)]
Merge changes from topic "allwinner-idle" into integration

* changes:
  feat(allwinner): provide CPU idle states to the rich OS
  feat(allwinner): simplify CPU_SUSPEND power state encoding
  feat(allwinner): choose PSCI states to avoid translation
  feat(fdt): add the ability to supply idle state information
  fix(allwinner): improve DTB patching error handling
  refactor(allwinner): patch the DTB after setting up PSCI
  refactor(allwinner): move DTB change code into allwinner/common

3 years agoMerge changes from topic "refactor-hw-config-load" into integration
Lauren Wehrmeister [Tue, 3 May 2022 15:06:49 +0000 (17:06 +0200)]
Merge changes from topic "refactor-hw-config-load" into integration

* changes:
  docs(fvp): update loading addresses of HW_CONFIG
  docs(fconf): update device tree binding for FCONF
  feat(fvp): update HW_CONFIG DT loading mechanism
  refactor(st): update set_config_info function call
  refactor(fvp_r): update set_config_info function call
  refactor(arm): update set_config_info function call
  feat(fconf): add NS load address in configuration DTB nodes

3 years agobuild(commitlint): make the scope optional
Sandrine Bailleux [Tue, 3 May 2022 06:14:23 +0000 (08:14 +0200)]
build(commitlint): make the scope optional

In all TF-A commit messages, the first line must comply to the
following format:

  type(scope): description

Although the conventional commits specification says that the scope
above is optional, we have made it mandatory in TF-A and the following
error message is printed if no scope is provided:

  scope may not be empty [scope-empty]

However, this can be too restrictive for some types of commits. For
example, it is typically hard to choose a scope for documentation
patches which modify several documents of different natures.

Lift this restriction in the tools and leave it up to the developer to
decide whether a scope is needed or not.

Change-Id: I9d35e7790fc3fa74651794216fe8db265ad09982
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agoMerge "feat(xilinx): add SPP/EMU platform support for versal" into integration
Madhukar Pappireddy [Mon, 2 May 2022 21:42:48 +0000 (23:42 +0200)]
Merge "feat(xilinx): add SPP/EMU platform support for versal" into integration

3 years agofeat(xilinx): add SPP/EMU platform support for versal
Venkatesh Yadav Abbarapu [Wed, 13 Apr 2022 03:34:53 +0000 (09:04 +0530)]
feat(xilinx): add SPP/EMU platform support for versal

This patch adds SPP/EMU platform support for Xilinx Versal and
also updating the documentation.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: Ibdadec4d00cd33ea32332299e7a00de31dc9d60b

3 years agoMerge changes I47014d72,Ibf00c386 into integration
Madhukar Pappireddy [Fri, 29 Apr 2022 21:12:21 +0000 (23:12 +0200)]
Merge changes I47014d72,Ibf00c386 into integration

* changes:
  docs(bl31): aarch64: RESET_TO_BL31_WITH_PARAMS
  feat(bl31): aarch64: RESET_TO_BL31_WITH_PARAMS

3 years agodocs(bl31): aarch64: RESET_TO_BL31_WITH_PARAMS
Jorge Ramirez-Ortiz [Fri, 15 Apr 2022 09:51:03 +0000 (11:51 +0200)]
docs(bl31): aarch64: RESET_TO_BL31_WITH_PARAMS

Document the RESET_TO_BL31 with parameters feature.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Change-Id: I47014d724f2eb822b69a112c3acee546fbfe82d5

3 years agofeat(bl31): aarch64: RESET_TO_BL31_WITH_PARAMS
Jorge Ramirez-Ortiz [Fri, 15 Apr 2022 09:46:47 +0000 (11:46 +0200)]
feat(bl31): aarch64: RESET_TO_BL31_WITH_PARAMS

It is not always the case that RESET_TO_BL31 enabled platforms don't
execute a bootloader before BL31.

For those use cases, being able to receive arguments from that first
loader (i.e: a DTB with TPM logs) might be necessary feature.

This code has been validated on iMX8mm.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Change-Id: Ibf00c3867cb1d1012b8b376e64ccaeca1c9d2bff

3 years agoMerge "fix(zynqmp): update the log message to verbose" into integration
Madhukar Pappireddy [Fri, 29 Apr 2022 17:10:33 +0000 (19:10 +0200)]
Merge "fix(zynqmp): update the log message to verbose" into integration

3 years agoMerge "fix(security): update Cortex-A15 CPU lib files for CVE-2022-23960" into integr...
Bipin Ravi [Fri, 29 Apr 2022 13:29:41 +0000 (15:29 +0200)]
Merge "fix(security): update Cortex-A15 CPU lib files for CVE-2022-23960" into integration

3 years agoMerge "docs(fvp): specify correct reference of the hw_config address" into integration
Manish Pandey [Fri, 29 Apr 2022 11:52:59 +0000 (13:52 +0200)]
Merge "docs(fvp): specify correct reference of the hw_config address" into integration

3 years agofix(zynqmp): update the log message to verbose
Venkatesh Yadav Abbarapu [Tue, 12 Apr 2022 03:51:32 +0000 (09:21 +0530)]
fix(zynqmp): update the log message to verbose

Changing the log message from notice to verbose, to save some space
and that leads to successfull compilation.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: Iee5a808febf211464eb8ba6f0377f79378333f5d

3 years agoMerge "feat(smmu): configure SMMU Root interface" into integration
Manish Pandey [Thu, 28 Apr 2022 21:20:16 +0000 (23:20 +0200)]
Merge "feat(smmu): configure SMMU Root interface" into integration

3 years agofix(security): update Cortex-A15 CPU lib files for CVE-2022-23960
John Powell [Fri, 15 Apr 2022 00:10:17 +0000 (19:10 -0500)]
fix(security): update Cortex-A15 CPU lib files for CVE-2022-23960

Cortex-A15 does not support FEAT_CSV2 so the existing workaround for
Spectre V2 is sufficient to mitigate against Spectre BHB attacks,
however the code needed to be updated to work with the new build flag.

Also, some code was refactored several years ago and not updated in
the Cortex-A15 library file so this patch fixes that as well.

Signed-off-by: John Powell <john.powell@arm.com>
Change-Id: I768c88a38c561c91019b038ac6c22b291955f18e

3 years agoMerge changes I80661161,I82c1fa93,I018ccbb9,Ibc23734d,I97406abe, ... into integration
Manish Pandey [Thu, 28 Apr 2022 16:51:50 +0000 (18:51 +0200)]
Merge changes I80661161,I82c1fa93,I018ccbb9,Ibc23734d,I97406abe, ... into integration

* changes:
  feat(intel): add SMC support for HWMON voltage and temp sensor
  feat(intel): add SMC support for Get USERCODE
  fix(intel): extend SDM command to return the SDM firmware version
  feat(intel): add SMC for enquiring firmware version
  fix(intel): configuration status based on start request
  fix(intel): bit-wise configuration flag handling
  fix(intel): get config status OK status
  fix(intel): use macro as return value
  fix(intel): fix fpga config write return mechanism
  feat(intel): add SiP service for DCMF status
  feat(intel): add RSU 'Max Retry' SiP SMC services
  feat(intel): enable SMC SoC FPGA bridges enable/disable
  feat(intel): add SMC/PSCI services for DCMF version support
  feat(intel): allow to access all register addresses if DEBUG=1
  fix(intel): modify how configuration type is handled
  feat(intel): support SiP SVC version
  feat(intel): enable firewall for OCRAM in BL31
  feat(intel): create source file for firewall configuration
  fix(intel): refactor NOC header

3 years agofeat(smmu): configure SMMU Root interface
Olivier Deprez [Fri, 4 Feb 2022 11:30:11 +0000 (12:30 +0100)]
feat(smmu): configure SMMU Root interface

This change performs a basic configuration of the SMMU root registers
interface on an RME enabled system. This permits enabling GPC checks
for transactions originated from a non-secure or secure device upstream
to an SMMU. It re-uses the boot time GPT base address and configuration
programmed on the PE.
The root register file offset is platform dependent and has to be
supplied on a model command line.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I4f889be6b7afc2afb4d1d147c5c1c3ea68f32e07

3 years agoMerge "feat(qemu): add support for measured boot" into integration
Manish Pandey [Thu, 28 Apr 2022 15:18:47 +0000 (17:18 +0200)]
Merge "feat(qemu): add support for measured boot" into integration

3 years agofeat(intel): add SMC support for HWMON voltage and temp sensor
Kris Chaplin [Fri, 25 Jun 2021 10:31:52 +0000 (11:31 +0100)]
feat(intel): add SMC support for HWMON voltage and temp sensor

Add support to read temperature and voltage using SMC command

Signed-off-by: Kris Chaplin <kris.chaplin@linux.intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I806611610043906b720b5096728a5deb5d652b1d

3 years agofeat(intel): add SMC support for Get USERCODE
Sieu Mun Tang [Wed, 27 Apr 2022 10:57:29 +0000 (18:57 +0800)]
feat(intel): add SMC support for Get USERCODE

This patch adds SMC support for enquiring FPGA's User Code.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I82c1fa9390b6f7509b2284d51e199fb8b6a9b1ad

3 years agofix(intel): extend SDM command to return the SDM firmware version
Sieu Mun Tang [Wed, 27 Apr 2022 10:54:10 +0000 (18:54 +0800)]
fix(intel): extend SDM command to return the SDM firmware version

Updates intel_smc_fw_version function to read SDM
firmware version in major/minor ACDS release number.
Update CONFIG_STATUS Response Data [1] bit0-23.

Return INTEL_SIP_SMC_STATUS_ERROR if unexpected
firmware version is being retrieved.

Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I018ccbb961786a75dc6eb873b0f232e71341e1d2

3 years agofeat(intel): add SMC for enquiring firmware version
Abdul Halim, Muhammad Hadi Asyrafi [Fri, 5 Feb 2021 03:50:58 +0000 (11:50 +0800)]
feat(intel): add SMC for enquiring firmware version

This command allows non-secure world software to enquire the
version of currently running Secure Device Manager (SDM) firmware.

This will be useful in maintaining backward-compatibility as well
as ensuring software cross-compabitility.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: Ibc23734d1135db74423da5e29655f9d32472a3b0

3 years agofix(intel): configuration status based on start request
Abdul Halim, Muhammad Hadi Asyrafi [Tue, 29 Dec 2020 08:49:23 +0000 (16:49 +0800)]
fix(intel): configuration status based on start request

Configuration status command now returns the result based on the last
config start command made to the runtime software. The status type can
be either:
- NO_REQUEST (default)
- RECONFIGURATION
- BITSTREAM_AUTH

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I97406abe09b49b9d9a5b43e62fe09eb23c729bff
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
3 years agofix(intel): bit-wise configuration flag handling
Sieu Mun Tang [Thu, 28 Apr 2022 14:40:58 +0000 (22:40 +0800)]
fix(intel): bit-wise configuration flag handling

Change configuration type handling to bit-wise flag. This is to align
with Linux's FPGA Manager definitions and promotes better compatibility.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I5aaf91d3fec538fe3f4fe8395d9adb47ec969434

3 years agofix(intel): get config status OK status
Abdul Halim, Muhammad Hadi Asyrafi [Fri, 20 Nov 2020 03:41:59 +0000 (11:41 +0800)]
fix(intel): get config status OK status

Config status have different OK requirement between MBOX_CONFIG_STATUS
and MBOX_RECONFIG_STATUS request. This patch adds the checking to
differentiate between both command.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I45a4c3de460b031757dbcbd0b3a8055cb0a55aff
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
3 years agofix(intel): use macro as return value
Abdul Halim, Muhammad Hadi Asyrafi [Fri, 20 Nov 2020 03:06:00 +0000 (11:06 +0800)]
fix(intel): use macro as return value

SMC function should strictly return INTEL_SIP_SMC_STATUS macro. Directly
returning value of variable status might cause confusion in calling
software.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Iea17f4feaa5c917e8b995471f3019dba6ea8dcd3
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
3 years agoMerge changes from topic "vendor_makefile_extension" into integration
Manish Pandey [Thu, 28 Apr 2022 14:25:34 +0000 (16:25 +0200)]
Merge changes from topic "vendor_makefile_extension" into integration

* changes:
  feat(plat/mediatek/build_helpers): introduce mtk makefile
  build(makefile): add extra makefile variable for extension

3 years agofix(intel): fix fpga config write return mechanism
Abdul Halim, Muhammad Hadi Asyrafi [Thu, 5 Nov 2020 10:00:03 +0000 (18:00 +0800)]
fix(intel): fix fpga config write return mechanism

This revert commit 279c8015fefcb544eb311b9052f417fc02ab84aa.
The previous change breaks this feature compatibility with Linux driver.
Hence, the fix for the earlier issue is going to be fixed in uboot instead.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I93220243bad65ed53322050d990544c7df4ce66b

3 years agofeat(intel): add SiP service for DCMF status
Sieu Mun Tang [Thu, 28 Apr 2022 14:21:01 +0000 (22:21 +0800)]
feat(intel): add SiP service for DCMF status

This patch adds 2 additional RSU SiP services for Intel SoCFPGA
platforms:
- INTEL_SIP_SMC_RSU_COPY_DCMF_STATUS stores current DCMF status in
  BL31
- INTEL_SIP_SMC_RSU_DCMF_STATUS is calling function for non-secure
  software to retrieve stored DCMF status

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: Ic7a3e6988c71ad4bf66c58a1d669956524dfdf11

3 years agoMerge "docs(build): update GCC to version 11.2-2022.02" into integration
Madhukar Pappireddy [Thu, 28 Apr 2022 14:18:43 +0000 (16:18 +0200)]
Merge "docs(build): update GCC to version 11.2-2022.02" into integration

3 years agoMerge changes from topic "qemu-measured-boot" into integration
Manish Pandey [Thu, 28 Apr 2022 14:17:00 +0000 (16:17 +0200)]
Merge changes from topic "qemu-measured-boot" into integration

* changes:
  fix(arm): fix fvp and juno build with USE_ROMLIB option
  feat(fdt-wrappers): add function to find or add a sudnode

3 years agofeat(intel): add RSU 'Max Retry' SiP SMC services
Chee Hong Ang [Wed, 1 Jul 2020 06:22:25 +0000 (14:22 +0800)]
feat(intel): add RSU 'Max Retry' SiP SMC services

Add SiP SMC services to store/retrieve 'Max Retry' counter
for Remote System Update (RSU).

Signed-off-by: Chee Hong Ang <chee.hong.ang@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I17c1f0107ead64e6160954d26407f399003bcbd9

3 years agoMerge "fix(bl2): define RAM_NOLOAD for XIP" into integration
Madhukar Pappireddy [Thu, 28 Apr 2022 14:10:21 +0000 (16:10 +0200)]
Merge "fix(bl2): define RAM_NOLOAD for XIP" into integration

3 years agoMerge changes from topic "ti-k3-system-suspend-base-support" into integration
Madhukar Pappireddy [Thu, 28 Apr 2022 14:05:47 +0000 (16:05 +0200)]
Merge changes from topic "ti-k3-system-suspend-base-support" into integration

* changes:
  feat(ti): allow build config of low power mode support
  feat(ti): increase SEC_SRAM_SIZE to 128k
  feat(ti): add PSCI handlers for system suspend
  feat(ti): add gic save and restore calls
  feat(ti): add enter sleep method

3 years agofeat(qemu): add support for measured boot
Ruchika Gupta [Fri, 8 Apr 2022 07:44:44 +0000 (13:14 +0530)]
feat(qemu): add support for measured boot

Add helper functions to generate event log for qemu
when MEASURED_BOOT=1.

Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Change-Id: I17a098cb614a3a89fe0fe9577bed6edda8bfd070

3 years agofix(arm): fix fvp and juno build with USE_ROMLIB option
Manish V Badarkhe [Tue, 19 Apr 2022 08:40:15 +0000 (09:40 +0100)]
fix(arm): fix fvp and juno build with USE_ROMLIB option

Change-Id: I8a9b30a952be594435003f0d684e3faad484e8b8
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
3 years agofeat(fdt-wrappers): add function to find or add a sudnode
Ruchika Gupta [Fri, 8 Apr 2022 07:46:16 +0000 (13:16 +0530)]
feat(fdt-wrappers): add function to find or add a sudnode

This change adds a new utility function - `fdtw_find_or_add_subnode`
to find a subnode. If the subnode is not present, the function adds
it in the flattened device tree.

Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Change-Id: Idf3ceddc57761ac015763d4a8b004877bcad766a

3 years agofeat(intel): enable SMC SoC FPGA bridges enable/disable
Abdul Halim, Muhammad Hadi Asyrafi [Thu, 18 Jun 2020 08:21:29 +0000 (16:21 +0800)]
feat(intel): enable SMC SoC FPGA bridges enable/disable

Enable SoC FPGA bridges enable/disable from non-secure world
through secure monitor calls

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I4474abab9731923a61ff0e7eb2c2fa32048001cb
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
3 years agofeat(intel): add SMC/PSCI services for DCMF version support
Chee Hong Ang [Wed, 13 May 2020 03:44:04 +0000 (11:44 +0800)]
feat(intel): add SMC/PSCI services for DCMF version support

Support get/store RSU DCMF version:
INTEL_SIP_SMC_RSU_DCMF_VERSION - Get current DCMF version
INTEL_SIP_SMC_RSU_COPY_DCMF_VERSION - Store current DCMF version

Signed-off-by: Chee Hong Ang <chee.hong.ang@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I85ffbc0efc859736899d4812f040fd7be17c8d8d

3 years agofeat(intel): allow to access all register addresses if DEBUG=1
Siew Chin Lim [Tue, 11 May 2021 13:12:22 +0000 (21:12 +0800)]
feat(intel): allow to access all register addresses if DEBUG=1

Allow to access all register addresses from SMC call if compile the code
with DEBUG=1 for debugging purpose.

Signed-off-by: Siew Chin Lim <elly.siew.chin.lim@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: Idd31827fb71307efbdbcceeaa05f6cb072842e10

3 years agofix(intel): modify how configuration type is handled
Abdul Halim, Muhammad Hadi Asyrafi [Fri, 29 May 2020 04:13:17 +0000 (12:13 +0800)]
fix(intel): modify how configuration type is handled

This patch creates macros to handle different configuration
types. These changes will help in adding new configuration
types in the future.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I5826a8e5942228a9ed376212f0df43b1605c0199

3 years agofeat(intel): support SiP SVC version
Sieu Mun Tang [Wed, 27 Apr 2022 10:24:06 +0000 (18:24 +0800)]
feat(intel): support SiP SVC version

This command supports to return SiP SVC major and minor version.

Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: Ia8bf678b8de0278aeaae748f24bdd05f8c9f9b47

3 years agofeat(intel): enable firewall for OCRAM in BL31
Abdul Halim, Muhammad Hadi Asyrafi [Wed, 5 Aug 2020 14:40:46 +0000 (22:40 +0800)]
feat(intel): enable firewall for OCRAM in BL31

Set OCRAM as secure region and required privileged access in BL31 to
prevent software running in normal world (non-secure) accessing memory
region in OCRAM which may contain sensitive information (e.g. FSBL,
handoff data)

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ib6b24efd69f49cd3f9aa4ef2ea9f1af5ce582bd6
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
3 years agofeat(intel): create source file for firewall configuration
Abdul Halim, Muhammad Hadi Asyrafi [Thu, 6 Aug 2020 02:21:54 +0000 (10:21 +0800)]
feat(intel): create source file for firewall configuration

Move codes that previously were part of system_manager driver into
firewall driver which are more appropriate based on their functionalities.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I35e9d792f35ee7491c2f306781417a0c8faae3fd
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
3 years agofix(intel): refactor NOC header
Abdul Halim, Muhammad Hadi Asyrafi [Wed, 5 Aug 2020 14:12:23 +0000 (22:12 +0800)]
fix(intel): refactor NOC header

Refactor NOC header to be shareable across both Stratix 10 and Agilex
platforms. This patch also removes redundant NOC declarations in system
manager header file.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I6348b67a8b54c2ad19327d6b8c25ae37d25e4b4a
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
3 years agofeat(plat/mediatek/build_helpers): introduce mtk makefile
Leon Chen [Thu, 24 Mar 2022 02:55:08 +0000 (10:55 +0800)]
feat(plat/mediatek/build_helpers): introduce mtk makefile

In order to modularize software libraries and platform drivers,
we create makefile helpers to treat a folder as a basic compile
unit.

Each module has a build rule (rules.mk) to describe driver and software
library source codes to be built in.

Signed-off-by: Leon Chen <leon.chen@mediatek.com>
Change-Id: Ib2113b259dc97937b7295b265509025b43b14077

3 years agobuild(makefile): add extra makefile variable for extension
Leon Chen [Wed, 23 Mar 2022 10:51:48 +0000 (18:51 +0800)]
build(makefile): add extra makefile variable for extension

Introduce EXTRA_LINKERFILE for GCC linker options. GCC linker
can realize multiple linker scripts, and vendors can extend ro or
text sections by inserting sections among the original sections
specified by blx.ld.S.

Vendors can assign compiled object files by assigning MODULE_OBJS
with their own built path.

Signed-off-by: Leon Chen <leon.chen@mediatek.com>
Change-Id: I1bd2e0383a52204723816131da4b7948def4c4e9

3 years agodocs(fvp): update loading addresses of HW_CONFIG
Manish V Badarkhe [Tue, 12 Apr 2022 20:11:56 +0000 (21:11 +0100)]
docs(fvp): update loading addresses of HW_CONFIG

As per change [1], now HW_CONFIG gets loaded in secure and
non-secure memory. Hence updated the documentation to show
secure and non-secure load region of HW_CONFIG in FVP Arm
platform.

Additionally, added a note on how FW_CONFIG address gets
passed from BL2 to BL31/SP_MIN.

[1]: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/14620

Change-Id: I37e02ff4f433c87bccbe67c7df5ecde3017668b9
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
3 years agodocs(fconf): update device tree binding for FCONF
Manish V Badarkhe [Thu, 21 Apr 2022 22:10:25 +0000 (23:10 +0100)]
docs(fconf): update device tree binding for FCONF

Added a description for the newly introduced 'ns-load-address' property
in the dtb-registry node of FCONF.

Change-Id: Ief8e8a55a6363fd42b23491d000b097b0c48453b
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
3 years agofeat(fvp): update HW_CONFIG DT loading mechanism
Manish V Badarkhe [Tue, 15 Mar 2022 16:05:58 +0000 (16:05 +0000)]
feat(fvp): update HW_CONFIG DT loading mechanism

Currently, HW-config is loaded into non-secure memory, which mean
a malicious NS-agent could tamper with it. Ideally, this shouldn't
be an issue since no software runs in non-secure world at this time
(non-secure world has not been started yet).

It does not provide a guarantee though since malicious external
NS-agents can take control of this memory region for update/corruption
after BL2 loads it and before BL31/BL32/SP_MIN consumes it. The threat
is mapped to Threat ID#3 (Bypass authentication scenario) in threat
model [1].

Hence modified the code as below -
1. BL2 loads the HW_CONFIG into secure memory
2. BL2 makes a copy of the HW_CONFIG in the non-secure memory at an
   address provided by the newly added property(ns-load-address) in
   the 'hw-config' node of the FW_CONFIG
3. SP_MIN receives the FW_CONFIG address from BL2 via arg1 so that
   it can retrieve details (address and size) of HW_CONFIG from
   FW_CONFIG
4. A secure and non-secure HW_CONFIG address will eventually be used
   by BL31/SP_MIN/BL32 and BL33 components respectively
5. BL31/SP_MIN dynamically maps the Secure HW_CONFIG region and reads
   information from it to local variables (structures) and then
   unmaps it
6. Reduce HW_CONFIG maximum size from 16MB to 1MB; it appears
   sufficient, and it will also create a free space for any future
   components to be added to memory

[1]: https://trustedfirmware-a.readthedocs.io/en/latest/threat_model/threat_model.html

Change-Id: I1d431f3e640ded60616604b1c33aa638b9a1e55e
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
3 years agofeat(ti): allow build config of low power mode support
Dave Gerlach [Fri, 11 Feb 2022 19:57:19 +0000 (13:57 -0600)]
feat(ti): allow build config of low power mode support

Not all K3 platforms support low power mode, so to allow these
features to be included for platforms that do in build and
therefore reported in the PSCI caps, define K3_PM_SYSTEM_SUSPEND
flag that can be set during build that will cause appropriate
space and functionality to be included in build for system
suspend support.

Change-Id: I821fbbd5232d91de6c40f63254b855e285d9b3e8
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
3 years agofeat(ti): increase SEC_SRAM_SIZE to 128k
Dave Gerlach [Fri, 7 Jan 2022 14:11:10 +0000 (08:11 -0600)]
feat(ti): increase SEC_SRAM_SIZE to 128k

Increase the lite platform SEC_SRAM_SIZE to 128k to allow space
for GIC context.

Change-Id: I6414309757ce9a9b7b3a9233a401312bfc459a3b
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
3 years agofeat(ti): add PSCI handlers for system suspend
Dave Gerlach [Tue, 30 Nov 2021 21:45:34 +0000 (15:45 -0600)]
feat(ti): add PSCI handlers for system suspend

Add necessary K3 PSCI handlers to enable system suspend to be reported
in the PSCI capabilities when asked during OS boot.

Additionally, have the handlers provide information that all domains
should be off and also have the power domain suspend handler invoke the
TISCI_MSG_ENTER_SLEEP message to enter system suspend.

Change-Id: I351a16167770e9909e8ca525ee0d74fa93331194
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
3 years agofeat(ti): add gic save and restore calls
Dave Gerlach [Fri, 7 Jan 2022 14:12:39 +0000 (08:12 -0600)]
feat(ti): add gic save and restore calls

Add functions to save and restore GICv3 redist and dist contexts during
low power mode and then call these during the suspend entry and finish
psci handlers.

Change-Id: I26c2c0f3b7fc925de3b349499fa42d2405441577
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
3 years agofeat(ti): add enter sleep method
Dave Gerlach [Tue, 30 Nov 2021 21:35:08 +0000 (15:35 -0600)]
feat(ti): add enter sleep method

This TISCI API must be used to trigger entry into system suspend, and
this is done through the use of TI_SCI_MSG_ENTER_SLEEP. Introduce a
method to send this message.

Change-Id: Id7af5fb2a34623ad69e76764f389ff4d8d259fba
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
3 years agoMerge "docs(zynqmp): update the make command" into integration
Madhukar Pappireddy [Wed, 27 Apr 2022 14:41:21 +0000 (16:41 +0200)]
Merge "docs(zynqmp): update the make command" into integration

3 years agoMerge changes Ibe6fd206,Icdca3de6,I72016620,I57a2787c into integration
Madhukar Pappireddy [Wed, 27 Apr 2022 14:40:38 +0000 (16:40 +0200)]
Merge changes Ibe6fd206,Icdca3de6,I72016620,I57a2787c into integration

* changes:
  fix(versal): fix coverity scan warnings
  feat(versal): get version for ATF related EEMI APIs
  feat(versal): enhance PM_IOCTL EEMI API to support additional arg
  feat(versal): add common interfaces to handle EEMI commands

3 years agoMerge "refactor(twed): improve TWED enablement in EL-3" into integration
Manish Pandey [Wed, 27 Apr 2022 09:01:52 +0000 (11:01 +0200)]
Merge "refactor(twed): improve TWED enablement in EL-3" into integration

3 years agoMerge changes from topic "st_clk_fix" into integration
Manish Pandey [Wed, 27 Apr 2022 08:35:12 +0000 (10:35 +0200)]
Merge changes from topic "st_clk_fix" into integration

* changes:
  fix(st-clock): correct stm32_clk_parse_fdt_by_name
  fix(st-clock): check _clk_stm32_get_parent return

3 years agodocs(zynqmp): update the make command
Venkatesh Yadav Abbarapu [Mon, 11 Apr 2022 03:43:17 +0000 (09:13 +0530)]
docs(zynqmp): update the make command

Update the make command with the RESET_TO_BL31=1 addition.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: I46cc81abb539773706348464b3061d20d94522e9

3 years agofix(versal): fix coverity scan warnings
Tanmay Shah [Wed, 23 Mar 2022 19:43:45 +0000 (12:43 -0700)]
fix(versal): fix coverity scan warnings

- Fix memory overrun issue
- include header file to fix Unknown macro warning

Change-Id: Ibe6fd206f44fbc22de746d255ff17c2b2325cd7b
Signed-off-by: Tanmay Shah <tanmay.shah@xilinx.com>
3 years agofeat(versal): get version for ATF related EEMI APIs
Ronak Jain [Fri, 4 Feb 2022 08:42:55 +0000 (00:42 -0800)]
feat(versal): get version for ATF related EEMI APIs

The patch does below things.

1. As per current implementation, when Linux send a request to ATF to
 get the version of APIs which are implemented in ATF then ATF wasn't
 returning any version because there is a check for LIBPM module id.
 The ATF is used to return version for the APIs which are implemented
 in the firmware only.

 Hence moved this switch-case before checking module id to get ATF
 version.

 Also, no need to pass Linux request to the firmware for the APIs
 which are implemented in ATF instead return success after updating
 version.

2. As per current implementation, higher 16-bit is used for ATF
 version and lower 16-bit is used for firmware version. Now, removed
 16-bit shift operation and send complete word i.e. 32-bit to Linux
 user as there is no user who checks ATF version.

3. Add bit mask support in the feature check PM EEMI API for QUERY and
 IOCTL ids.

Change-Id: Icdca3de6659f3b673b81a423ed79a3c20b678768
Signed-off-by: Ronak Jain <ronak.jain@xilinx.com>
Signed-off-by: Tanmay Shah <tanmay.shah@xilinx.com>
3 years agofeat(versal): enhance PM_IOCTL EEMI API to support additional arg
Venkatesh Yadav Abbarapu [Thu, 21 Oct 2021 04:11:53 +0000 (22:11 -0600)]
feat(versal): enhance PM_IOCTL EEMI API to support additional arg

Currently, SMC handler is limited to parsing 5 arguments (1 API ID + 4
32-bit command args). Extend this handling to support one more 32-bit
command argument which is necessary to support new IOCTL IDs for
secure read/write interface.

Note that, this change is completely transparent and does not affect
existing functionality of any of the EEMI APIs.

Change-Id: I72016620eeeaf598f14853512120bfb30bb9a3e9
Signed-off-by: Izhar Ameer Shaikh <izhar.ameer.shaikh@xilinx.com>
Signed-off-by: Tanmay Shah <tanmay.shah@xilinx.com>
3 years agofeat(versal): add common interfaces to handle EEMI commands
Tanmay Shah [Mon, 9 Aug 2021 18:00:41 +0000 (11:00 -0700)]
feat(versal): add common interfaces to handle EEMI commands

This change adds common interfaces to handle commands from firmware driver
to power management controller. It removes big chunk of source line of code
that was handling each command separately and doing same repetitive work.

EEMI - Embedded Energy Management Interface is Xilinx proprietary
protocol to allow communication between power management controller
and different processing clusters.

As of now, Each EEMI command has its own implementation in TF-A.
This is redundant. Essentially most EEMI command implementation
in TF-A  does same work. It prepares payload received from kernel, sends
payload to firmware, receives response from firmware and send response
back to kernel.

The same functionality can be achieved if common interface is used among
multiple EEMI commands. This change divides platform management related
SMCCC requests into 4 categories.

1) EEMI commands required for backward compatibility.

Some EEMI commands are still required for backward compatibility
until removed completely or its use is changed to accommodate
common interface

2) EEMI commands that require for PSCI interface and accessed from debugfs

For example EEMI calls related to CPU suspend/resume

3) TF-A specific requests

Functionality such as getting TF-A version and getting callback
data for platform management is handled by this interface

4) Common interface for rest of EEMI commands

This handlers performs payload and firmware response transaction job for
rest of EEMI commands. Also it parses module ID from SMC payload and inserts
in IPI request. If not module ID is found, then default is LIBPM_MODULE_ID.
This helps in making common path in TF-A for all the modules in PLM firmware

Change-Id: I57a2787c7fff9f2e1d1f9003b3daab092632d57e
Signed-off-by: Tanmay Shah <tanmay.shah@xilinx.com>
3 years agoMerge "feat(tc): enable CI-700 PMU for profiling" into integration
Madhukar Pappireddy [Tue, 26 Apr 2022 21:16:53 +0000 (23:16 +0200)]
Merge "feat(tc): enable CI-700 PMU for profiling" into integration

3 years agofeat(tc): enable CI-700 PMU for profiling
Rupinderjit Singh [Tue, 22 Feb 2022 21:50:33 +0000 (21:50 +0000)]
feat(tc): enable CI-700 PMU for profiling

Change-Id: Iaafdfc440b362022e6103eabf3fb2ebed85b6575
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
3 years agofeat(allwinner): provide CPU idle states to the rich OS
Samuel Holland [Sun, 23 Jan 2022 05:37:12 +0000 (23:37 -0600)]
feat(allwinner): provide CPU idle states to the rich OS

When using SCPI as the PSCI backend, firmware can wake up the CPUs and
cluster from sleep, so CPU idle states are available for the rich OS to
use. In that case, advertise them to the rich OS via the DTB.

Change-Id: I718ef6ef41212fe5213b11b4799613adbbe6e0eb
Signed-off-by: Samuel Holland <samuel@sholland.org>
3 years agofeat(allwinner): simplify CPU_SUSPEND power state encoding
Samuel Holland [Fri, 19 Mar 2021 04:15:28 +0000 (23:15 -0500)]
feat(allwinner): simplify CPU_SUSPEND power state encoding

Use the encoding recommended by the PSCI specification: four bits for
the power state at each power level.

SCPI provides no way to handshake an exit from a standby state, so the
only possible standby state is the architectural WFI state. Since WFI
can be used outside of PSCI, we do not allow passing in standby states.

Change-Id: I4b3b84e5c255ee58a25255a0cab5d7623425086e
Signed-off-by: Samuel Holland <samuel@sholland.org>
3 years agofeat(allwinner): choose PSCI states to avoid translation
Samuel Holland [Fri, 19 Mar 2021 03:55:15 +0000 (22:55 -0500)]
feat(allwinner): choose PSCI states to avoid translation

Aligning the PSCI and SCPI power states avoids some code to translate
between the two. This also makes room for an intermediate power state,
for future firmware capability growth.

Change-Id: I26691085f277a96bd405e3305ab0fe390a92b418
Signed-off-by: Samuel Holland <samuel@sholland.org>
3 years agofeat(fdt): add the ability to supply idle state information
Samuel Holland [Sun, 23 Jan 2022 23:12:26 +0000 (17:12 -0600)]
feat(fdt): add the ability to supply idle state information

Some platforms require extra firmware to implement CPU_SUSPEND, or only
have working CPU_SUSPEND in certain configurations. On these platforms,
CPU idle states should only be listed in the devicetree when they are
actually available. Add a function BL31 can use to dynamically supply
this idle state information.

Change-Id: I64fcc288303faba8abec4f59efd13a04220d54dc
Signed-off-by: Samuel Holland <samuel@sholland.org>
3 years agofix(allwinner): improve DTB patching error handling
Samuel Holland [Sun, 23 Jan 2022 22:30:08 +0000 (16:30 -0600)]
fix(allwinner): improve DTB patching error handling

Currently, if any step of the DTB patching process fails, the whole
process is aborted. However, this causes some problems:
 - If any step modifies the DTB (including fdt_open_into), the dcache
   must still be cleaned, even if some later step fails.
 - The DTB may need changes in multiple places; if one patch fails (for
   example due to missing nodes), we should still apply other patches.
 - Similarly, if some patch fails, we should still run fdt_pack to
   clean up after ourselves.

Change-Id: If1af2e58e5a7edaf542354bb8a261dd1c3da1ad0
Signed-off-by: Samuel Holland <samuel@sholland.org>
3 years agorefactor(allwinner): patch the DTB after setting up PSCI
Samuel Holland [Sun, 23 Jan 2022 04:06:57 +0000 (22:06 -0600)]
refactor(allwinner): patch the DTB after setting up PSCI

Idle states are advertised to the rich OS by declaring them in the DTB.
Since the availability of idle states depends on which PSCI
implementation was chosen, the DTB must be updated after PSCI setup.

Move this operation to bl31_plat_runtime_setup, the platform hook
which happens at the right time. Defining this hook overrides the weak
definition from plat/common, so copy over the code from there, too.

Change-Id: I42a83edb9cb28e1803d17dc2d73dbc879d885222
Signed-off-by: Samuel Holland <samuel@sholland.org>
3 years agorefactor(allwinner): move DTB change code into allwinner/common
Andre Przywara [Sun, 19 Dec 2021 13:39:40 +0000 (13:39 +0000)]
refactor(allwinner): move DTB change code into allwinner/common

So far the H616 was the only Allwinner SoC needed to amend the DTB, to
reserve the DRAM portion that BL31 occupies.
To allow other SoCs to modify the DTB as well, without duplicating code,
move the DTB change routines into Allwinner common code, and generalise
the current code to allow other modifications.

No functional change intended.

Change-Id: I080ea07b6470367f3c2573a4368f8ef5196d411c
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
3 years agodocs(fvp): specify correct reference of the hw_config address
Manish V Badarkhe [Mon, 25 Apr 2022 19:21:28 +0000 (20:21 +0100)]
docs(fvp): specify correct reference of the hw_config address

TB_FW_CONFIG DT no longer contains the address of HW_CONFIG; it has
been moved to the FW_CONFIG DT since the introduction of FCONF.
Hence updated the documentation accordingly.

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

3 years agoMerge "docs(intel): add Sieu Mun and Benjamin Jit Loon as maintainers" into integration
Joanna Farley [Tue, 26 Apr 2022 10:18:18 +0000 (12:18 +0200)]
Merge "docs(intel): add Sieu Mun and Benjamin Jit Loon as maintainers" into integration

3 years agoMerge changes from topic "sb/mbedtls-2.28" into integration
Sandrine Bailleux [Tue, 26 Apr 2022 05:49:06 +0000 (07:49 +0200)]
Merge changes from topic "sb/mbedtls-2.28" into integration

* changes:
  docs(prerequisites): upgrade to mbed TLS 2.28.0
  build(deps): upgrade to mbed TLS 2.28.0

3 years agoMerge "fix(xilinx): fix mismatching function prototype" into integration
Madhukar Pappireddy [Tue, 26 Apr 2022 02:45:16 +0000 (04:45 +0200)]
Merge "fix(xilinx): fix mismatching function prototype" into integration

3 years agoMerge changes Iccfa7ec6,Ide9a7af4 into integration
Lauren Wehrmeister [Mon, 25 Apr 2022 21:02:07 +0000 (23:02 +0200)]
Merge changes Iccfa7ec6,Ide9a7af4 into integration

* changes:
  feat(intel): add macro to switch between different UART PORT
  feat(intel): add SMC support for ROM Patch SHA384 mailbox

3 years agoMerge "fix(bakery_lock): add __unused for clang" into integration
Lauren Wehrmeister [Mon, 25 Apr 2022 20:08:31 +0000 (22:08 +0200)]
Merge "fix(bakery_lock): add __unused for clang" into integration

3 years agoMerge "fix(ufs): fix cache maintenance issues" into integration
Madhukar Pappireddy [Mon, 25 Apr 2022 18:59:58 +0000 (20:59 +0200)]
Merge "fix(ufs): fix cache maintenance issues" into integration

3 years agoMerge changes from topic "st_fwu_bkp_reg" into integration
Madhukar Pappireddy [Mon, 25 Apr 2022 17:28:33 +0000 (19:28 +0200)]
Merge changes from topic "st_fwu_bkp_reg" into integration

* changes:
  feat(stm32mp1): retry 3 times FWU trial boot
  refactor(stm32mp1): update backup reg for FWU

3 years agodocs(prerequisites): upgrade to mbed TLS 2.28.0
Sandrine Bailleux [Fri, 22 Apr 2022 13:47:31 +0000 (15:47 +0200)]
docs(prerequisites): upgrade to mbed TLS 2.28.0

Upgrade to the latest and greatest 2.x release of Mbed TLS library
(i.e. v2.28.0) to take advantage of their bug fixes.

Note that the Mbed TLS project published version 3.x some time
ago. However, as this is a major release with API breakages, upgrading
to 3.x might require some more involved changes in TF-A, which we are
not ready to do. We shall upgrade to mbed TLS 3.x after the v2.7
release of TF-A.

Change-Id: I887dfd87893169c7be53b986e6c43338d15949d7
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agobuild(deps): upgrade to mbed TLS 2.28.0
Sandrine Bailleux [Thu, 21 Apr 2022 08:21:29 +0000 (10:21 +0200)]
build(deps): upgrade to mbed TLS 2.28.0

Upgrade to the latest and greatest 2.x release of Mbed TLS library
(i.e. v2.28.0) to take advantage of their bug fixes.

Note that the Mbed TLS project published version 3.x some time
ago. However, as this is a major release with API breakages, upgrading
to 3.x might require some more involved changes in TF-A, which we are
not ready to do. We shall upgrade to mbed TLS 3.x after the v2.7
release of TF-A.

Actually, the upgrade this time simply boils down to including the new
source code module 'constant_time.c' into the firmware.

To quote mbed TLS v2.28.0 release notes [1]:

  The mbedcrypto library includes a new source code module
  constant_time.c, containing various functions meant to resist timing
  side channel attacks. This module does not have a separate
  configuration option, and functions from this module will be
  included in the build as required.

As a matter of fact, if one is attempting to link TF-A against mbed
TLS v2.28.0 without the present patch, one gets some linker errors
due to missing symbols from this new module.

Apart from this, none of the items listed in mbed TLS release
notes [1] directly affect TF-A. Special note on the following one:

  Fix a bug in mbedtls_gcm_starts() when the bit length of the iv
  exceeds 2^32.

In TF-A, we do use mbedtls_gcm_starts() when the firmware decryption
feature is enabled with AES-GCM as the authenticated decryption
algorithm (DECRYPTION_SUPPORT=aes_gcm). However, the iv_len variable
which gets passed to mbedtls_gcm_starts() is an unsigned int, i.e. a
32-bit value which by definition is always less than 2**32. Therefore,
we are immune to this bug.

With this upgrade, the size of BL1 and BL2 binaries does not appear to
change on a standard sample test build (with trusted boot and measured
boot enabled).

[1] https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.0

Change-Id: Icd5dbf527395e9e22c8fd6b77427188bd7237fd6
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agoMerge "docs(prerequisites): update Arm compilers download link" into integration
Sandrine Bailleux [Mon, 25 Apr 2022 08:05:08 +0000 (10:05 +0200)]
Merge "docs(prerequisites): update Arm compilers download link" into integration

3 years agodocs(prerequisites): update Arm compilers download link
Sandrine Bailleux [Fri, 15 Apr 2022 09:17:40 +0000 (11:17 +0200)]
docs(prerequisites): update Arm compilers download link

Right now, TF-A documentation recommends downloading Arm compilers
from:

  https://developer.arm.com/open-source/gnu-toolchain/gnu-a/downloads

However, this page is now deprecated, as indicated by the banner at
the top of the page. When navigating to the new recommended page, one
can see the following note, which provides the rationale for the
deprecation:

  GNU Toolchain releases from Arm were published previously as two
  separate releases - one for A-profile and the other for R & M
  profiles (GNU Toolchain for A-profile processors and GNU Arm
  Embedded Toolchain).

  Arm GNU Toolchain releases unifies these two into a single release
  and the previous way of releases therefore have been
  discontinued. However, the previous releases will continue to be
  available for reference.

This patch updates the link to the new recommended place for compiler
downloads.

Change-Id: Iefdea3866a1af806a5db2d2288edbb63c543b8ee
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agoMerge "docs: fix mailing lists URLs" into integration
Sandrine Bailleux [Mon, 25 Apr 2022 05:58:46 +0000 (07:58 +0200)]
Merge "docs: fix mailing lists URLs" into integration

3 years agodocs(intel): add Sieu Mun and Benjamin Jit Loon as maintainers
Sieu Mun Tang [Sat, 19 Mar 2022 06:21:55 +0000 (14:21 +0800)]
docs(intel): add Sieu Mun and Benjamin Jit Loon as maintainers

Add Sieu Mun Tang and Benjamin Jit Loon Lim as new
Intel SocFPGA platform maintainers and remove the
rest of the Intel SocFPGA platform maintainers.

Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: Ieb9a35e278d70a12351aaccab90ddc7be09dc861

3 years agoMerge changes from topic "ffa_el3_spmc" into integration
Olivier Deprez [Fri, 22 Apr 2022 19:09:13 +0000 (21:09 +0200)]
Merge changes from topic "ffa_el3_spmc" into integration

* changes:
  feat(spmc): add support for direct req/resp
  feat(spmc): add support for handling FFA_ERROR ABI
  feat(spmc): add support for FFA_MSG_WAIT
  feat(spmc): add function to determine the return path from the SPMC
  feat(spmd): enable handling of FF-A SMCs with the SPMC at EL3
  feat(spmd): update SPMC init flow to use EL3 implementation
  feat(spmc): add FF-A secure partition manager core
  feat(spmc): prevent read only xlat tables with the EL3 SPMC
  feat(spmc): enable building of the SPMC at EL3
  refactor(spm_mm): reorganize secure partition manager code

3 years agoMerge "fix(stm32mp1): correct dtc version check" into integration
Manish Pandey [Fri, 22 Apr 2022 15:22:59 +0000 (17:22 +0200)]
Merge "fix(stm32mp1): correct dtc version check" into integration

3 years agofix(stm32mp1): correct dtc version check
Yann Gautier [Fri, 22 Apr 2022 11:12:37 +0000 (13:12 +0200)]
fix(stm32mp1): correct dtc version check

Depending on the shell used, the grep command can fail, leading to
a wrong dtc version detection. Correct that by adding quotes.

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

3 years agoMerge "feat(spm): add FFA_RX_ACQUIRE forwarding in SPMD" into integration
Olivier Deprez [Thu, 21 Apr 2022 09:35:42 +0000 (11:35 +0200)]
Merge "feat(spm): add FFA_RX_ACQUIRE forwarding in SPMD" into integration

3 years agodocs: fix mailing lists URLs
Sandrine Bailleux [Thu, 21 Apr 2022 08:17:22 +0000 (10:17 +0200)]
docs: fix mailing lists URLs

With the transition to mailman3, the URLs of TF-A and TF-A Tests
mailing lists have changed. However, we still refer to the old
location, which are now dead links.

Update all relevant links throughout the documentation.

There is one link referring to a specific thread on the TF-A mailing
list in the SPM documentation, for which I had to make a guess as to
what's the equivalent mailman3 URL. The old URL scheme indicates that
the thread dates from February 2020 but beyond that, I could not make
sense of the thread id within the old URL so I picked the most likely
match amongst the 3 emails posted on the subject in this time period.

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Reported-by: Kuohong Wang <kuohong.wang@mediatek.com>
Change-Id: I83f4843afd1dd46f885df225931d8458152dbb58

3 years agofeat(spmc): add support for direct req/resp
Marc Bonnici [Mon, 29 Nov 2021 17:05:57 +0000 (17:05 +0000)]
feat(spmc): add support for direct req/resp

Enable the SPMC to handle FFA_MSG_SEND_DIRECT_REQ and
FFA_MSG_SEND_DIRECT_RESP ABIs.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: Ia196c7405993f600e4fdbf467397ea3fb035a62a

3 years agofeat(spmc): add support for handling FFA_ERROR ABI
Marc Bonnici [Fri, 10 Dec 2021 09:21:56 +0000 (09:21 +0000)]
feat(spmc): add support for handling FFA_ERROR ABI

This ABI is only valid during SP initialisation to indicate
failure. If this occurs during SP initialisation signal a failure,
otherwise respond with a not supported error code.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I0182a1641c0f6850e82173af333be79b594f2318

3 years agofeat(spmc): add support for FFA_MSG_WAIT
Marc Bonnici [Mon, 29 Nov 2021 17:05:33 +0000 (17:05 +0000)]
feat(spmc): add support for FFA_MSG_WAIT

Handle an incoming call of FFA_MSG_WAIT from the secure world
and update the runtime state of the calling partition accordingly.

This ABI can be called in the following scenarios:
  - Used by an SP to signal it has finished initializing.
  - To resume the normal world after handling a secure interrupt
    that interrupted the normal world.
  - To relinquish control back to the normal world.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I929713a2280e8ec291b5b4e8f6d4b49df337228c

3 years agofeat(spmc): add function to determine the return path from the SPMC
Marc Bonnici [Mon, 29 Nov 2021 17:17:29 +0000 (17:17 +0000)]
feat(spmc): add function to determine the return path from the SPMC

Use knowledge of the target partition ID and source security state
to determine which route should be used to exit the SPMC.

There are 3 exit paths:
1) Return to the normal world via the SPMD, this will take care of
   switching contexts if required.
2) Return to the secure world when the call originated in the normal
   world and therefore switch contexts.
3) Return to the secure world when the call originated in the secure
   world, therefore we can return directly.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I4037f3a8a8519e2c9f1876be92806d2c41d0d154

3 years agofeat(spmd): enable handling of FF-A SMCs with the SPMC at EL3
Marc Bonnici [Mon, 29 Nov 2021 18:02:45 +0000 (18:02 +0000)]
feat(spmd): enable handling of FF-A SMCs with the SPMC at EL3

Any FF-A SMC that arrives from the normal world is handled by the
SPMD before being forwarded to the SPMC. Similarly any SMC
arriving from the secure world will hit the SPMC first and be
forwarded to the SPMD if required, otherwise the SPMC will
respond directly.

This allows for the existing flow of handling FF-A ABI's when
the SPMC resides at a lower EL to be preserved.

In order to facilitate this flow the spmd_smc_forward function
has been split and control is either passed to the SPMC or it is
forwarded as before. To allow this the flags and cookie parameters
must now also be passed into this method as the SPMC must be able to
provide these when calling back into the SPMD handler as appropriate.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I84fee8390023295b9689067e14cd25cba23ca39b