Commit Graph

5345 Commits

Author SHA1 Message Date
Manish V Badarkhe a42b426b85 fix(fvp): fix NULL pointer dereference issue
Fixed below NULL pointer dereference issue reported by coverity scan
by asserting the hw_config_info is not NULL.

*** CID 378361:  Null pointer dereferences  (NULL_RETURNS)
/plat/arm/board/fvp/fvp_bl2_setup.c: 84 in plat_get_next_bl_params()
78
79       /* To retrieve actual size of the HW_CONFIG */
80       param_node = get_bl_mem_params_node(HW_CONFIG_ID);
81       assert(param_node != NULL);
82
83       /* Copy HW config from Secure address to NS address */
>>>     CID 378361:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing "hw_config_info", which is known to be "NULL".
84       memcpy((void *)hw_config_info->ns_config_addr,
85              (void *)hw_config_info->config_addr,
86              (size_t)param_node->image_info.image_size);

Signed-off-by: Manish V Badarkhe <manish.badarkhe@arm.com>
Change-Id: Iaf584044cfc3b2583862bcc1be825966eaffd38e
2022-05-05 11:33:40 +01:00
Marc Bonnici 44639ab73e 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
2022-05-05 09:47:30 +01:00
Marc Bonnici a34ccd4c20 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>
2022-05-05 09:46:39 +01:00
Sandrine Bailleux d6fbcc57f9 Merge changes from topic "mp/delete_platforms" into integration
* changes:
  refactor(mt6795): remove mediatek's mt6795 platform
  refactor(sgm775): remove Arm sgm775 platform
2022-05-05 10:30:26 +02:00
J-Alves ca0fdbd8e0 fix(sptool): update Optee FF-A manifest
Change the OPTEE FF-A manifest to comply with changes to the sp pkg [1].
The sptool packs the image at the default offset of 0x4000, if it is not
provided in the arguments.

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

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: I647950410114f7fc24926696212bb7f8101390ac
2022-05-04 15:38:48 +01:00
Manish Pandey a150486c97 refactor(mt6795): remove mediatek's mt6795 platform
Mediatek's mt6795 platform was deprecated in 2.5 release and as per [1]
a platform which has been marked deprecated should be removed from repo
after 2 release cycle.

[1] https://trustedfirmware-a.readthedocs.io/en/latest/plat/deprecated.html?highlight=deprecated

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: Ic427a3071316a13f34a726a1eb086b679e1671a1
2022-05-04 12:23:29 +02:00
Manish Pandey 15e5414861 refactor(sgm775): remove Arm sgm775 platform
Arm's sgm775 platform was deprecated in 2.5 release and as per [1] a
platform which has been marked deprecated should be removed from repo
after 2 release cycle.

[1] https://trustedfirmware-a.readthedocs.io/en/latest/plat/deprecated.html?highlight=deprecated

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I3cce6f330a1def725188eefd558bd0e4ec559725
2022-05-04 11:15:29 +01:00
Andre Przywara 436cd754f2 feat(allwinner): add SMCCC SOCID support
The Allwinner SID device holds a 16-bit SoC identifier, which we already
use in our code.

Export this number through the generic SMCCC SOCID interface, to allow
an architectural identification of an Allwinner SoC. This enables access
to this information from non-secure world, simplifies generic drivers
(ACPI comes to mind), and gives easy and precise access to the SoC ID
from userland in OSes like Linux.

Change-Id: I91753046b2ae5408ca7bc0b864fcd97d24c8267c
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-05-04 02:30:08 +02:00
André Przywara 3e0a087f30 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
2022-05-04 02:10:02 +02:00
Lauren Wehrmeister 1ced6cad52 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
2022-05-03 17:06:49 +02:00
Venkatesh Yadav Abbarapu be73459a94 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
2022-05-02 22:49:24 +02:00
Sieu Mun Tang 52ed157fd6 fix(intel): reject non 4-byte align request size for FPGA Crypto Service (FCS)
This patch is to add size checking to make sure that
each certificate and encryption/decryption request
are 4-byte align as this driver is expecting. Unaligned
size may indicate invalid/corrupted request hence will
be rejected.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: Ib6f97849ec470e45679c5adc4fbfa3afd10eda90
2022-04-30 09:24:03 +08:00
Venkatesh Yadav Abbarapu 1277af9bac 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
2022-04-28 23:23:50 +02:00
Manish Pandey 06796a08d3 Merge "feat(smmu): configure SMMU Root interface" into integration 2022-04-28 23:20:16 +02:00
Manish Pandey 942b039221 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
2022-04-28 18:51:50 +02:00
Olivier Deprez 52a314af25 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
2022-04-28 18:50:24 +02:00
Manish Pandey 9b9a21f297 Merge "feat(qemu): add support for measured boot" into integration 2022-04-28 17:18:47 +02:00
Kris Chaplin 52cf9c2cd4 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
2022-04-28 22:46:56 +08:00
Sieu Mun Tang 93a5b97ec9 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
2022-04-28 22:45:26 +08:00
Sieu Mun Tang c026dfe38c 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
2022-04-28 22:44:27 +08:00
Abdul Halim, Muhammad Hadi Asyrafi c34b2a7a1a 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
2022-04-28 22:44:21 +08:00
Abdul Halim, Muhammad Hadi Asyrafi e40910e2dc 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>
2022-04-28 22:44:14 +08:00
Sieu Mun Tang 276a43663e 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
2022-04-28 22:40:58 +08:00
Abdul Halim, Muhammad Hadi Asyrafi 07915a4fd5 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>
2022-04-28 22:30:59 +08:00
Abdul Halim, Muhammad Hadi Asyrafi e0fc2d1907 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>
2022-04-28 22:29:23 +08:00
Manish Pandey 357dd7f69e 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
2022-04-28 16:25:34 +02:00
Abdul Halim, Muhammad Hadi Asyrafi ef51b097bf 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
2022-04-28 22:25:05 +08:00
Sieu Mun Tang 984e236e0d 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
2022-04-28 22:21:01 +08:00
Manish Pandey 23bf1adbf9 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
2022-04-28 16:17:00 +02:00
Chee Hong Ang 4c26957be2 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
2022-04-28 22:14:34 +08:00
Ruchika Gupta 5e690269d5 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
2022-04-28 14:55:36 +01:00
Manish V Badarkhe 861250c3b2 fix(arm): fix fvp and juno build with USE_ROMLIB option
Change-Id: I8a9b30a952be594435003f0d684e3faad484e8b8
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2022-04-28 14:55:25 +01:00
Abdul Halim, Muhammad Hadi Asyrafi b7f3044e87 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>
2022-04-28 19:50:01 +08:00
Chee Hong Ang 44eb782e15 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
2022-04-28 19:23:48 +08:00
Siew Chin Lim 7e954dfc2b 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
2022-04-28 19:22:06 +08:00
Abdul Halim, Muhammad Hadi Asyrafi ec4f28ecec 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
2022-04-28 19:08:41 +08:00
Sieu Mun Tang f0c40b897f 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
2022-04-28 19:08:38 +08:00
Abdul Halim, Muhammad Hadi Asyrafi ae19fef337 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>
2022-04-28 19:08:35 +08:00
Abdul Halim, Muhammad Hadi Asyrafi afa0b1a82a 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>
2022-04-28 19:08:32 +08:00
Abdul Halim, Muhammad Hadi Asyrafi bc1a573d55 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>
2022-04-28 19:07:55 +08:00
Leon Chen 500d40d877 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
2022-04-28 10:29:33 +02:00
Manish V Badarkhe 39f0b86a76 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>
2022-04-28 07:06:59 +01:00
Dave Gerlach a9f46fad82 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>
2022-04-27 12:06:53 -05:00
Dave Gerlach 38164e64bd 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>
2022-04-27 12:06:53 -05:00
Dave Gerlach 2393c27680 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>
2022-04-27 12:06:53 -05:00
Dave Gerlach b40a467783 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>
2022-04-27 12:06:53 -05:00
Dave Gerlach cf5868b8cd 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>
2022-04-27 12:06:53 -05:00
Madhukar Pappireddy 3dbbd41f39 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
2022-04-27 16:40:38 +02:00
Manish Pandey 9284d2129e Merge "refactor(twed): improve TWED enablement in EL-3" into integration 2022-04-27 11:01:52 +02:00
Tanmay Shah 0b15187225 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>
2022-04-27 01:44:20 +02:00
Ronak Jain da6e654bc8 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>
2022-04-27 01:44:11 +02:00
Venkatesh Yadav Abbarapu d34a5db8a7 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>
2022-04-27 01:44:02 +02:00
Tanmay Shah 1397967490 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>
2022-04-27 01:43:41 +02:00
Samuel Holland e2b18771fc 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>
2022-04-26 17:52:43 +02:00
Samuel Holland 52466ec38e 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>
2022-04-26 17:52:37 +02:00
Samuel Holland 159c36fd2f 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>
2022-04-26 17:52:31 +02:00
Samuel Holland 79808f10c3 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>
2022-04-26 17:52:20 +02:00
Samuel Holland 3ccccc6580 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>
2022-04-26 17:52:11 +02:00
Andre Przywara 6fa8e72e7b 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>
2022-04-26 15:43:46 +02:00
Madhukar Pappireddy b08a199b40 Merge "fix(xilinx): fix mismatching function prototype" into integration 2022-04-26 04:45:16 +02:00
Lauren Wehrmeister 394f2ea034 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
2022-04-25 23:02:07 +02:00
Madhukar Pappireddy 5b44657a97 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
2022-04-25 19:28:33 +02:00
Yann Gautier 429f10e336 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
2022-04-22 13:23:22 +02:00
Manish Pandey dfc59a7b82 Merge changes from topic "st_nvmem_layout" into integration
* changes:
  refactor(stm32mp1-fdts): remove nvmem_layout node
  refactor(stm32mp1): drop the "st,stm32-nvmem-layout" node
  refactor(st): remove useless includes
2022-04-19 16:11:24 +02:00
Jayanth Dodderi Chidanand 781d07a421 refactor(twed): improve TWED enablement in EL-3
The current implementation uses plat_arm API under generic code.
"plat_arm" API is a convention used with Arm common platform layer
and is reserved for that purpose. In addition, the function has a
weak definition which is not encouraged in TF-A.

Henceforth, removing the weak API with a configurable macro "TWED_DELAY"
of numeric data type in generic code and simplifying the implementation.
By default "TWED_DELAY" is defined to zero, and the delay value need to
be explicitly set by the platforms during buildtime.

Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Change-Id: I25cd6f628e863dc40415ced3a82d0662fdf2d75a
2022-04-17 23:48:10 +01:00
Zelalem Aweke 8b95e84870 refactor(context mgmt): add cm_prepare_el3_exit_ns function
As part of the RFC:
https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/13651,
this patch adds the 'cm_prepare_el3_exit_ns' function. The function is
a wrapper to 'cm_prepare_el3_exit' function for Non-secure state.

When EL2 sysregs context exists (CTX_INCLUDE_EL2_REGS is
enabled) EL1 and EL2 sysreg values are restored from the context
instead of directly updating the registers.

Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com>
Change-Id: I9b071030576bb05500d54090e2a03b3f125d1653
2022-04-12 17:42:11 +02:00
Sandrine Bailleux 2d1ba79cde Merge "style(plat/arm/corstone1000): resolve checkpatch warnings" into integration 2022-04-12 17:17:14 +02:00
Manish V Badarkhe def5571db2 refactor(arm): use MBEDTLS_CONFIG_FILE macro
Used MBEDTLS_CONFIG_FILE macro for including mbedTLS
configuration.

Signed-off-by: Manish V Badarkhe <manish.badarkhe@arm.com>
Change-Id: I374b59a31df3ab1e69481b2c37a6f7455a106b6e
2022-04-11 14:32:59 +02:00
Sandrine Bailleux a934332d98 Merge "refactor(corstone700): namespace MHU driver filenames" into integration 2022-04-11 12:47:08 +02:00
Venkatesh Yadav Abbarapu 81333eac71 fix(xilinx): fix mismatching function prototype
The reported function raises a error when compilers assert the flag
`-Warray-parameter=`, signaling that an array-type argument was promoted
to a pointer-type argument. We observed this behaviour with the gcc 11.2
version.

plat/xilinx/common/pm_service/pm_ipi.c:263:34: error: argument 1 of type 'uint32_t *'
{aka 'unsigned int *'} declared as a pointer [-Werror=array-parameter=]
263 | uint32_t calculate_crc(uint32_t *payload, uint32_t bufsize)
      |                        ~~~~~~~~~~^~~~~~~
In file included from plat/xilinx/common/pm_service/pm_ipi.c:16:
plat/xilinx/common/include/pm_ipi.h:30:33: note: previously declared as an array 'uint32_t[8]'
{aka 'unsigned int[8]'}
   30 | uint32_t calculate_crc(uint32_t payload[PAYLOAD_ARG_CNT], uint32_t buffersize);
      |                        ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
cc1.real: all warnings being treated as errors

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: I7329f2e76ee0ca5faba71eb50babd20a796fee64
2022-04-11 09:27:02 +05:30
Yann Gautier 03d20776ef fix(st): remove extra chars from dtc version
In some implementations of dtc tool (e.g. with yocto), there can be a 'v'
at the beginning of the version, and a '+' at the end. Just keep numbers
then, with a grep -o.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I180e97ab75ba3e5ceacb4b1961a1f22788b428a3
2022-04-05 08:58:16 +02:00
Boon Khai Ng 447e699f70 feat(intel): add macro to switch between different UART PORT
HSD #1509626040:
This patch is to add the flexibility for BL2 and BL31
to choose different UART output port at platform_def.h
using parameter PLAT_INTEL_UART_BASE

This patch also fixing the plat_helpers.S where the
UART BASE is hardcoded to PLAT_UART0_BASE. It is then
switched to CRASH_CONSOLE_BASE.

Signed-off-by: Boon Khai Ng <boon.khai.ng@intel.com>
Change-Id: Iccfa7ec64e4955b531905778be4da803045d3c8f
2022-04-05 14:25:30 +08:00
Sieu Mun Tang 77902fca8f feat(intel): add SMC support for ROM Patch SHA384 mailbox
HSD #16014059592:
Add support for ROM Patch SHA384 mailbox SMC call.

Signed-off-by: Kris Chaplin <kris.chaplin@linux.intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: Ide9a7af41a089980745cb7216a9bf85e7fbd84e3
2022-04-05 14:23:26 +08:00
Sandrine Bailleux 510dc79c85 refactor(corstone700): namespace MHU driver filenames
There are plans to contribute a generic MHU driver to the TF-A code
base in the short term.

In preparation for this, rename the Corstone-700 MHU driver source
files and prefix them with the name of the platform to avoid any
ambiguity or name clashes with the upcoming generic MHU driver. Also
rename the header guard accordingly.

This renaming is inline with other platform-specific MHU drivers, such
as the ones used on Broadcom [1], Socionext [2] or Amlogic [3] platforms.

[1] plat/brcm/common/brcm_mhu.h
[2] plat/socionext/synquacer/drivers/mhu/sq_mhu.h
[3] plat/amlogic/common/aml_mhu.c

Change-Id: I8a5e5b16e7c19bf931a90422dfca8f6a2a0663b4
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2022-04-01 10:16:01 +02:00
David Vincze 83b3ed260b style(plat/arm/corstone1000): resolve checkpatch warnings
Change-Id: Ic8cb9b0834806675c792018e809d7ba77fbe856f
Signed-off-by: David Vincze <david.vincze@arm.com>
2022-03-31 10:59:41 +02:00
Nicolas Toromanoff f87de907c8 feat(stm32mp1): retry 3 times FWU trial boot
If we reboot 3 times in trial mode, BL2 will select previous boot image.

Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@foss.st.com>
Change-Id: I82b423cc84f0471fdb6fa7c393fc5fe411d25c06
2022-03-30 15:44:40 +02:00
Yann Gautier e633f9c52f refactor(stm32mp1): update backup reg for FWU
Change the backup register used to store FWU parameters from 21 to 10.
This is chosen to have a Read/Write secure and Read non-secure register.
The mapping is also changed: only the first 4 bits will be used to store
the FWU index. The 4 next bits will be used to store count info. The
other bits are reserved.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@foss.st.com>
Change-Id: I9249768287ec5688ba2d8711ce04d429763543d7
2022-03-30 13:34:59 +02:00
Jiafei Pan 5161cfde9b fix(layerscape): fix coverity issue
Check return value of mmap_add_dynamic_region().

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I84e257b3052371e18af158c3254f42a1bae0da10
2022-03-30 10:38:22 +08:00
Soby Mathew ad88c37080 Merge changes from topic "rme-attest" into integration
* changes:
  feat(rme): add dummy realm attestation key to RMMD
  feat(rme): add dummy platform token to RMMD
2022-03-28 18:32:27 +02:00
Patrick Delaunay c5bf1b0971 refactor(stm32mp1): drop the "st,stm32-nvmem-layout" node
Simplify the DT parsing by removing the parsing of the nvmem layout node
with "st,stm32-nvmem-layout" compatible.

The expected OTP NAME can directly be found in a sub-node named
NAME@ADDRESS of the BSEC node, the NVMEM provider node.

This patch also removes this specific binding introduced for TF-A.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: Ic703385fad1bec5bef1cee583fbe9fbbf6aea216
2022-03-28 18:29:59 +02:00
Yann Gautier b9a6dbc1ba refactor(st): remove useless includes
The stm32mp_dt.c file does not need anything from DDR header files.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Ibfe23204d68ee2e863cd2eda3d725baa830b729a
2022-03-28 18:29:59 +02:00
Soby Mathew a0435105f2 feat(rme): add dummy realm attestation key to RMMD
Add a dummy realm attestation key to RMMD, and return it on request.
The realm attestation key is requested with an SMC with the following
parameters:
    * Fid (0xC400001B2).
    * Attestation key buffer PA (the realm attestation key is copied
      at this address by the monitor).
    * Attestation key buffer length as input and size of realm
      attesation key as output.
    * Type of elliptic curve.

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Signed-off-by: Subhasish Ghosh <subhasish.ghosh@arm.com>
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Change-Id: I12d8d98fd221f4638ef225c9383374ddf6e65eac
2022-03-28 15:02:01 +02:00
Jiafei Pan 0b0e676698 feat(ls1088aqds): add ls1088aqds board support
Add QDS support for ls1088a.

Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com>
Signed-off-by: York Sun <york.sun@nxp.com>
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I6c7a7a23fa6b9ba01c011a7e6237f8063d45e261
2022-03-27 23:24:24 +08:00
Jiafei Pan 2771dd0293 feat(ls1088ardb): add ls1088ardb board support
The LS1088A reference design board provides a comprehensive platform
that enables design and evaluation of the product (LS1088A processor).

Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com>
Signed-off-by: York Sun <york.sun@nxp.com>
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: If4ca24fcee7a4c2c514303853955f1b00298c0e5
2022-03-27 23:24:24 +08:00
Jiafei Pan 9df5ba05b4 feat(ls1088a): add new SoC platform ls1088a
LS1088A is a cost-effective, powerefficient, and highly integrated
SoC device featuring eight extremely power-efficient 64-bit ARM
Cortex-A53 cores with ECC-protected L1 and L2 cache memories for
high reliability, running up to 1.6 GHz.

This patch is to add ls1088a SoC support in TF-A.

Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com>
Signed-off-by: rocket <rod.dorris@nxp.com>
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: Id9ebcdad1beab07ea81a41955edd4f471d6cf090
2022-03-27 23:24:24 +08:00
Biwen Li ceae374357 refactor(layerscape): refine comparison of inerconnection
Refine the code to be compatible with new CCN504 which is used
by ls2088a.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I2e2b3bbb9392862b04bf8a89dfb9575bf4be974a
2022-03-27 23:24:24 +08:00
Jiafei Pan 602cf53b6f feat(layerscape): add soc helper macro definition for chassis 3
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I27b3a1f597de84dc2a007798e54eb919c877281a
2022-03-27 23:24:24 +08:00
Biwen Li 9550ce9ddd feat(layerscape): add CHASSIS 3 support for tbbr
Support CHASSIS 3.0(such as SoC LS1088A).

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I60843bc4d604f0de1d91c6d3ad5eb4921cdcc91a
2022-03-27 23:24:24 +08:00
Jiafei Pan 0d396d6455 feat(layerscape): define more chassis 3 hardware address
Add base address definiton for Chassis 3 platforms.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I6041b93c9e9bb49af60743bd277ac7cc6f1b9da8
2022-03-27 23:24:24 +08:00
Jiafei Pan cd960f5009 feat(lx2): enable DDR erratas for lx2 platforms
Enable DDR erratas for lx2 platforms.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: Ia2cf6ed077acf81882247153ec38bda708a6f007
2022-03-27 23:24:24 +08:00
Jiafei Pan 3412716b30 feat(layerscape): print DDR errata information
Print Errata information in debug mode.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I70d6baa4dc3ffd79fedbc827555268d8f06605c7
2022-03-27 23:24:24 +08:00
Pankit Garg 291adf521a feat(nxp-ddr): add workaround for errata A050958
Set the receiver gain to max value to recover
cold temp marginality issue for phy-gen2

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: If639fa3ed404cf6e1b8abcc2b7137db1fdd0b2c2
2022-03-27 23:24:24 +08:00
Jiafei Pan 85bd092943 feat(layerscape): add new soc errata a010539 support
Add new soc errata a010539 support.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: Idbd8caaac12da8ab4f39dc0019cb656bcf4f3401
2022-03-27 23:24:24 +08:00
Jiafei Pan 785ee93cc3 feat(layerscape): add new soc errata a009660 support
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: Ice37155d971dec5c610026043e34b64f761fc1b7
2022-03-27 23:24:24 +08:00
Biwen Li e2818d0afc fix(layerscape): fix build issue of mmap_add_ddr_region_dynamically
Fix build issue of mmap_add_ddr_region_dynamically():
ls_bl2_el3_setup.c:(.text.bl2_plat_preload_setup+0x28): undefined
reference to mmap_add_ddr_region_dynamically

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I74a8b4c2337fc0646d6acb16ce61755c5efbdf38
2022-03-27 23:24:24 +08:00
Soby Mathew 0f9159b7eb feat(rme): add dummy platform token to RMMD
Add a dummy platform token to RMMD and return it on request. The
platform token is requested with an SMC with the following parameters:
    * Fid (0xC40001B3).
    * Platform token PA (the platform token is copied at this address by
      the monitor). The challenge object needs to be passed by
      the caller in this buffer.
    * Platform token len.
    * Challenge object len.

When calling the SMC, the platform token buffer received by EL3 contains
the challenge object. It is not used on the FVP and is only printed to
the log.

Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
Signed-off-by: Subhasish Ghosh <subhasish.ghosh@arm.com>
Change-Id: I8b2f1d54426c04e76d7a3baa6b0fbc40b0116348
2022-03-25 17:12:26 +00:00
Manish Pandey 91e52cf0ca Merge "fix(tegra194/ras): remove incorrect erxctlr assert" into integration 2022-03-22 23:02:24 +01:00
Manish Pandey 2ff6a49ea6 Merge changes from topic "stm32mp13" into integration
* changes:
  feat(stm32mp1): select platform compilation either by flag or DT
  feat(stm32mp1-fdts): add support for STM32MP13 DK board
  feat(stm32mp1-fdts): add DDR support for STM32MP13
  feat(stm32mp1-fdts): add st-io_policies node for STM32MP13
  feat(stm32mp1): updates for STM32MP13 device tree compilation
  feat(stm32mp1-fdts): add DT files for STM32MP13
  feat(dt-bindings): add TZC400 bindings for STM32MP13
  feat(stm32mp1): add "Boot mode" management for STM32MP13
  feat(stm32mp1): manage HSLV on STM32MP13
  feat(stm32mp1): add sdmmc compatible in platform define
  feat(st-sdmmc2): allow compatible to be defined in platform code
  feat(stm32mp1): update IO compensation on STM32MP13
  feat(stm32mp1): call pmic_voltages_init() in platform init
  feat(st-pmic): add pmic_voltages_init() function
  feat(stm32mp1): update CFG0 OTP for STM32MP13
  feat(stm32mp1): usb descriptor update for STM32MP13
  feat(st-clock): add clock driver for STM32MP13
  feat(dt-bindings): add bindings for STM32MP13
  feat(stm32mp1): get CPU info from SYSCFG on STM32MP13
  feat(stm32mp1): use only one filter for TZC400 on STM32MP13
  feat(stm32mp1): add a second fixed regulator
  feat(stm32mp1): adaptations for STM32MP13 image header
  feat(stm32mp1): update boot API for header v2.0
  feat(stm32mp1): update IP addresses for STM32MP13
  feat(stm32mp1): add part numbers for STM32MP13
  feat(stm32mp1): chip rev. Z is 0x1001 on STM32MP13
  feat(stm32mp1): update BACKUP_BOOT_MODE for STM32MP13
  feat(stm32mp1): stm32mp_is_single_core() for STM32MP13
  feat(stm32mp1): remove unsupported features on STM32MP13
  feat(stm32mp1): update memory mapping for STM32MP13
  feat(stm32mp1): introduce new flag for STM32MP13
  feat(st): update stm32image tool for header v2
2022-03-22 16:42:16 +01:00
Manish Pandey c5edb59de9 Merge "fix(plat/arm): fix SP count limit without dual root CoT" into integration 2022-03-22 11:40:17 +01:00
Yann Gautier 99a5d8d01d feat(stm32mp1): select platform compilation either by flag or DT
To choose either STM32MP13 or STM32MP15, one of the two flags can be
set to 1 in the make command line. Or the platform selection can be
done with device tree name, if it begins with stm32mp13 or stm32mp15.

Change-Id: I72f42665c105b71a84b4952ef3fcd6c06ae4598c
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-03-22 09:09:23 +01:00
Nicolas Le Bayon e6fddbc995 feat(stm32mp1-fdts): add DDR support for STM32MP13
Add dedicated device tree files for STM32MP13.
Add new DDR compatible for STM32MP13x.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Change-Id: Ib1bb9ad8cb2ab9f5f81549635d6604093aeb99d3
2022-03-22 09:09:23 +01:00
Yann Gautier d38eaf99d3 feat(stm32mp1): updates for STM32MP13 device tree compilation
Add stm32mp13_bl2.dtsi files.
Update compilation variables for STM32MP13.

Change-Id: Ia3aa3abfe09c04c1a57541e565c212aa094e285c
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-03-22 09:09:23 +01:00
Nicolas Toromanoff 296ac8012b feat(stm32mp1): add "Boot mode" management for STM32MP13
Add new APIs to enter and exit "boot mode".

In this mode a potential tamper won't block access or reset
the secure IPs needed while boot, without this mode a dead
lock may occurs.

Change-Id: Iad60d4a0420ec125b842a285f73a20eb54cd1828
Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@st.com>
2022-03-22 09:09:23 +01:00
Yann Gautier fca10a8f1b feat(stm32mp1): manage HSLV on STM32MP13
On STM32MP13, the high speed mode for pads in low voltage is different
from STM32MP15. Each peripheral supporting the feature has its own
register.
Special care is taken for SDMMC peripherals. The HSLV mode is enabled
only if the max voltage for the pads is lower or equal to 1.8V.

Change-Id: Id94d2cca17dd4aca4d764230a643b2bb9a5f3342
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-03-22 09:09:23 +01:00
Yann Gautier 3331d3637c feat(stm32mp1): add sdmmc compatible in platform define
Add DT_SDMMC2_COMPAT define in stm32mp1_def.h file in platform.
It allows the use of the compatible in platform code.

Change-Id: I535ad67dd133bab59cf81881adaef42d8e88632c
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-03-22 09:09:23 +01:00
Yann Gautier 8e07ab5f70 feat(stm32mp1): update IO compensation on STM32MP13
On STM32MP13, two new SD1 and SD2 IO compensations cells are added,
for SDMMC1 and SDMMC2. They have to be managed the same way as the
main compensation cell.

Change-Id: Ib7aa648d65fc98e1613bfb46b0e7dd568fd21002
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-03-22 09:09:23 +01:00
Yann Gautier ffd1b88922 feat(stm32mp1): call pmic_voltages_init() in platform init
The nominal voltage for VDDCPU when Cortex-A7 runs at 650MHz is 1.25V
on STM32MP13. VDDCORE should be set at 1.25V as well.
This is necessary, as the PMIC values in its NVMEM are 1.2V.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I3c24fe4cd68c7bf143cf9318ab38a15d6d41b5d2
2022-03-22 09:09:23 +01:00
Nicolas Le Bayon 1c37d0c1d3 feat(stm32mp1): update CFG0 OTP for STM32MP13
This field is now declared on the 10 LSB bits on STM32MP13.
Several possible values are specified in the Reference Manual, and
indicate an open or closed device. Other values lead to a system panic.

Change-Id: I697124a21db66a56e7e223d601aa7cf44bb183c4
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
2022-03-22 09:09:23 +01:00
Patrick Delaunay d59b9d53b9 feat(stm32mp1): usb descriptor update for STM32MP13
Update USB and DFU descriptor used for STM32MP13x

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Change-Id: I6e8111d279f49400a72baa12ff39f140d97e1c70
2022-03-22 09:09:23 +01:00
Gabriel Fernandez 9be88e75c1 feat(st-clock): add clock driver for STM32MP13
Add new clock driver for STM32MP13. Split the include file to manage
either STM32MP13 or STM32MP15.

Change-Id: Ia568cd12b1d5538809204f0fd2224d51e5d1e985
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@st.com>
2022-03-22 09:09:23 +01:00
Yann Gautier 6512c3a62a feat(stm32mp1): get CPU info from SYSCFG on STM32MP13
The IDC register from DBGMCU is duplicated in SYSCFG. As SYSCFG is
always accessible, get chip ID and revision ID from there on STM32MP13.

Change-Id: Ib0b6e8f68a2934a45ec0012f69db6c12a60adb17
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-03-22 09:09:23 +01:00
Varun Wadekar e272c61ce8 fix(tegra194/ras): remove incorrect erxctlr assert
The ERXCTLR_EL1 register reads are RES0 for some error records
leading to a false assert on a read back.

This patch removes the assert on reading back the ERXCTLR_EL1
register to fix this issue.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I0cab30b12656a800ba87b8bb94b4c67a2331dee6
2022-03-21 23:18:27 +02:00
Madhukar Pappireddy c43641ebf0 Merge "fix(layerscape): update WA for Errata A-050426" into integration 2022-03-21 15:10:56 +01:00
Yann Gautier b7d0058a3a feat(stm32mp1): use only one filter for TZC400 on STM32MP13
On STM32MP13, there is only 1 DDR port, hence only 1 TZC400 filter.

Change-Id: I4f6750022cdaf658cd209a4bf48a6cdb0717020e
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-03-21 10:53:55 +01:00
Lionel Debieve 225ce4822c feat(stm32mp1): add a second fixed regulator
Increase the fixed regulator number that needs to be
2 for STM32MP13.

Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
Change-Id: Ica990fe9a6494b76aed763d2d353f5234fed7cea
2022-03-21 10:53:55 +01:00
Yann Gautier a5308745ee feat(stm32mp1): adaptations for STM32MP13 image header
The header must now include by default at least an extra padding
header, increasing the size of the header to 512 bytes (0x200).
This header will be placed at the end of SRAM3 by BootROM, letting
the whole SYSRAM to TF-A.
The boot context is now placed in SRAM2, hence this memory has to be
mapped in BL2 MMU. This mapping is done for all SRAMs in a 2MB area.

Change-Id: I50fcd43ecd0ba2076292b057566efe6809b9971a
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-03-21 10:53:55 +01:00
Lionel Debieve 5f52eb1597 feat(stm32mp1): update boot API for header v2.0
Add the new field for the new header v2.0.
Force MP13 platform to use v2.0.
Removing unused fields in boot_api_context_t for STM32MP13.

Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Change-Id: Iac81aad9a939c1f305184e335e0a907ac69071df
2022-03-21 10:53:55 +01:00
Yann Gautier 52ac9983d6 feat(stm32mp1): update IP addresses for STM32MP13
Add the IP addresses that are STM32MP13 and update the ones for
which the base address has changed.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Iea71a491da36f721bfd3fbfb010177e2a6a57281
2022-03-21 10:53:55 +01:00
Yann Gautier 30eea116cd feat(stm32mp1): add part numbers for STM32MP13
Add the new part numbers and adapt the functions that use them.
There is no package number in OTP as they all share the same GPIO
banks.
This part is then stubbed for STM32MP13.

Change-Id: I13414326b140119aece662bf8d82b387dece0dcc
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-03-21 10:53:55 +01:00
Yann Gautier ef0b8a6c1b feat(stm32mp1): chip rev. Z is 0x1001 on STM32MP13
On STM32MP13, the chip revision Z is 0x1001, contrary to STM32MP15,
for which it was 0x2001.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: If65482e824b169282abb5e26ca91e16ef7640b52
2022-03-21 10:53:55 +01:00
Yann Gautier 4b031ab4c5 feat(stm32mp1): update BACKUP_BOOT_MODE for STM32MP13
The backup register used on STM32MP15 to save the boot interface for
the next boot stage was 20. It is now saved in backup register 30
on STM32MP13.

Change-Id: Ibd051ff2eca7202184fa428ed57ecd4ae7388bd8
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-03-21 10:53:55 +01:00
Yann Gautier 7b48a9f328 feat(stm32mp1): stm32mp_is_single_core() for STM32MP13
STM32MP13 is a single Cortex-A7 CPU, always return true in
stm32mp_is_single_core() function.

Change-Id: Icf36eaa887bdf314137eda07c5751cea8c950143
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-03-21 10:53:55 +01:00
Yann Gautier 111a384c90 feat(stm32mp1): remove unsupported features on STM32MP13
* GPIO: On STM32MP13, there are no banks GPIOJ, GPIOK and GPIOZ.
* STM32MP13 is a single Cortex-A7 CPU: remove reset from MPU1
  and reset from MCU traces
* There is no MCU on STM32MP13. Put MCU security management
  under STM32MP15 flag.
* The authentication feature is not supported yet on STM32MP13,
  put the code under SPM32MP15 flag.
* On STM32MP13, the monotonic counter is managed in ROM code, keep
  the monotonic counter update just for STM32MP15.
* SYSCFG: put registers not present on STM32MP13 under STM32MP15
  flag, as the code that manages them.
* PMIC: use ldo3 during DDR configuration only for STM32MP15
* Reset UART pins on USB boot is no more required.

Change-Id: Iceba59484a9bb02828fe7e99f3ecafe69c837bc7
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@st.com>
2022-03-21 10:53:55 +01:00
Yann Gautier 48ede66151 feat(stm32mp1): update memory mapping for STM32MP13
SYSRAM is only 128KB and starts at 0x2FFE0000.
SRAMs are added.
BL2 code and DTB sizes are also reduced to fit in 128KB.

Change-Id: I25da99ef5c08f8008ff00d38248d61b6045adad4
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-03-21 10:53:55 +01:00
Sebastien Pasdeloup bdec516ee8 feat(stm32mp1): introduce new flag for STM32MP13
STM32MP13 is a variant of STM32MP1, with a single Cortex-A7, and no
Cortex-M4.
There is only one DDR port.
SP_min is not supported, only OP-TEE can be used as monitor.
STM32MP13 uses the header v2.0 format for stm32image generation
for BL2.

Change-Id: Ie5b0e3230c5e064fe96f3561fc5b3208914dea53
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-03-21 10:53:55 +01:00
Nicolas Le Bayon 2d8886acee feat(st): update stm32image tool for header v2
The stm32image tool is updated to manage new header v2.0 for BL2
images.
Add new structure for the header v2.0 management.
Adapt to keep compatibility with v1.0.
Add the header version major and minor in the command line
when executing the tool, as well as binary type (0x10 for BL2).

Change-Id: I70c187e8e7e95b57ab7cfad63df314307a78f1d6
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
2022-03-21 10:53:55 +01:00
Madhukar Pappireddy 815abebcc1 Merge changes from topic "spectre_bhb" into integration
* changes:
  fix(security): apply SMCCC_ARCH_WORKAROUND_3 to A73/A75/A72/A57
  fix(security): workaround for CVE-2022-23960 for Cortex-A57, Cortex-A72
  fix(fvp): disable reclaiming init code by default
2022-03-18 15:55:39 +01:00
Bipin Ravi 9b2510b69d fix(security): apply SMCCC_ARCH_WORKAROUND_3 to A73/A75/A72/A57
This patch applies CVE-2022-23960 workarounds for Cortex-A75,
Cortex-A73, Cortex-A72 & Cortex-A57. This patch also implements
the new SMCCC_ARCH_WORKAROUND_3 and enables necessary discovery
hooks for Coxtex-A72, Cortex-A57, Cortex-A73 and Cortex-A75 to
enable discovery of this SMC via SMC_FEATURES. SMCCC_ARCH_WORKAROUND_3
is implemented for A57/A72 because some revisions are affected by both
CVE-2022-23960 and CVE-2017-5715 and this allows callers to replace
SMCCC_ARCH_WORKAROUND_1 calls with SMCCC_ARCH_WORKAROUND_3. For details
of SMCCC_ARCH_WORKAROUND_3, please refer SMCCCv1.4 specification.

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Signed-off-by: John Powell <john.powell@arm.com>
Change-Id: Ifa6d9c7baa6764924638efe3c70468f98d60ed7c
2022-03-18 01:01:34 +02:00
Wasim Khan 72feaad980 fix(layerscape): update WA for Errata A-050426
Update WA for Errata A-050426 as Commands for
PEX (PEX1..PEX6) , lnx1_e1000#0, lnx1_xfi and
lnx2_xfi has been moved to PBI phase.

This patch requires RCW to include PBI commands
to write commands in BIST mode for PEX, lnx1_e1000,
lnx1_xfi and lnx2_xfi IP blocks.

Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
Change-Id: I27c2b055c82c0b58df83449f9082bfbfdeb65115
2022-03-17 07:08:42 +01:00
Madhukar Pappireddy fdb9166b94 fix(fvp): disable reclaiming init code by default
In anticipation of Spectre BHB workaround mitigation patches, we
disable the RECLAIM_INIT_CODE for FVP platform. Since the spectre
BHB mitigation workarounds inevitably increase the size of the various
segments due to additional instructions and/or macros, these segments
cannot be fit in the existing memory layout designated for BL31 image.
The issue is specifically seen in complex build configs for FVP
platform. One such config has TBB with Dual CoT and test secure
payload dispatcher(TSPD) enabled. Even a small increase in individual
segment size in order of few bytes might lead to build fails due to
alignment requirements(PAGE_ALIGN to 4KB).

This is needed to workaround the following build failures observed
across multiple build configs:

aarch64-none-elf-ld.bfd: BL31 init has exceeded progbits limit.

aarch64-none-elf-ld.bfd: /work/workspace/workspace/tf-worker_ws_2/trusted_firmware/build/fvp/debug/bl31/bl31.elf section coherent_ram will not fit in region RAM
aarch64-none-elf-ld.bfd: BL31 image has exceeded its limit.
aarch64-none-elf-ld.bfd: region RAM overflowed by 4096 bytes

Change-Id: Idfab539e9a40f4346ee11eea1e618c97e93e19a1
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2022-03-16 14:20:48 -05:00
Madhukar Pappireddy 38dd6b61ae Merge "fix(xilinx): fix coding style violations" into integration 2022-03-16 15:41:31 +01:00
Manish V Badarkhe 26850d71ec refactor(st): update set_config_info function call
Pass NS-load address as ~0UL to the 'set_config_info' function while
updating FW_CONFIG device tree information since it is always loaded
into secure memory.

Change-Id: Ieeaf9c97085128d7b7339d34495bdd58cd9fcf8a
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2022-03-16 13:51:26 +00:00
Manish V Badarkhe ddbf43b4a0 refactor(fvp_r): update set_config_info function call
Pass NS-load address as ~0UL to the 'set_config_info' function while
updating FW_CONFIG device tree information since it is always loaded
into secure memory.

Change-Id: I64e8531e0ad5cda63f14d838efb9da9cf20beea8
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2022-04-22 10:05:53 +01:00
Manish V Badarkhe 046cb19b49 refactor(arm): update set_config_info function call
Pass NS-load address as ~0UL to the 'set_config_info' function while
updating FW_CONFIG device tree information since it is always loaded
into secure memory.

Change-Id: Ia33adfa9e7b0392f62056053a2df7db321a74e22
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2022-04-21 22:53:43 +01:00
Manish Pandey e58eb9d103 Merge "feat(mt8186): add DFD control in SiP service" into integration 2022-03-16 12:55:03 +01:00
Manish Pandey 02c6f36695 Merge "fix(a3k): change fatal error to warning when CM3 reset is not implemented" into integration 2022-03-16 12:37:17 +01:00
Pali Rohár 30cdbe7043 fix(a3k): change fatal error to warning when CM3 reset is not implemented
This allows TF-A's a3700_system_reset() function to try Warm reset
method when CM3 reset method is not implemented by WTMI firmware.

Signed-off-by: Pali Rohár <pali@kernel.org>
Change-Id: I7303197373e1a8ca5a44ba0b1e90b48855d6c0c3
2022-03-16 11:42:47 +01:00
Madhukar Pappireddy fdbbd59e97 Merge changes from topic "revert-14286-uart_segregation-VURJFOWMTM" into integration
* changes:
  Revert "feat(sgi): deviate from arm css common uart related defi..."
  Revert "feat(sgi): route TF-A logs via secure uart"
  Revert "feat(sgi): add page table translation entry for secure uart"
2022-03-15 14:39:49 +01:00
Madhukar Pappireddy 64e04687d3 Revert "feat(sgi): deviate from arm css common uart related defi..."
Revert submission 14286-uart_segregation

Reason for revert: Need to wait for companion patches in CI and UEFI/Linux to be upstreamed.

Reverted Changes:
I8574b31d5:feat(sgi): add page table translation entry for se...
I8896ae05e:feat(sgi): route TF-A logs via secure uart
I39170848e:feat(sgi): deviate from arm css common uart relate...

Change-Id: I28a370dd8b3a37087da621460eccc1acd7a30287
2022-03-11 21:49:20 +02:00
Madhukar Pappireddy 162f7923f1 Revert "feat(sgi): route TF-A logs via secure uart"
Revert submission 14286-uart_segregation

Reason for revert: Need to wait for companion patches in CI and UEFI/Linux to be upstreamed.

Reverted Changes:
I8574b31d5:feat(sgi): add page table translation entry for se...
I8896ae05e:feat(sgi): route TF-A logs via secure uart
I39170848e:feat(sgi): deviate from arm css common uart relate...

Change-Id: I7c488aed9fcb70c55686d705431b3fe017b8927d
2022-03-11 21:49:20 +02:00
Madhukar Pappireddy 6127767ae5 Revert "feat(sgi): add page table translation entry for secure uart"
Revert submission 14286-uart_segregation

Reason for revert: Need to wait for companion patches in CI and UEFI/Linux to be upstreamed.

Reverted Changes:
I8574b31d5:feat(sgi): add page table translation entry for se...
I8896ae05e:feat(sgi): route TF-A logs via secure uart
I39170848e:feat(sgi): deviate from arm css common uart relate...

Change-Id: I9bec02496f826e184c6efa643f869b2eb3b52539
2022-03-11 20:49:20 +01:00
Madhukar Pappireddy c5f9d99a7e Merge "fix(st): don't try to read boot partition on SD cards" into integration 2022-03-11 18:00:38 +01:00
Rex-BC Chen e46e9df0d0 feat(mt8186): add DFD control in SiP service
DFD (Design for Debug) is a debugging tool, which scans flip-flops and
dumps to internal RAM on the WDT reset. After system reboots, those
values could be showed for debugging.

BUG=b:222217317
TEST=build pass

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I659ea1e0789cf135a71a13b752edaa35123e0941
2022-03-11 17:47:05 +08:00
Uwe Kleine-König 9492b391a3 fix(st): don't try to read boot partition on SD cards
When trying to boot from an SD card with STM32MP_EMMC_BOOT enabled,
booting fails with:

	ERROR:   Got unexpected value for active boot partition, 0
	ASSERT: plat/st/common/bl2_stm32_io_storage.c:285

because SD cards don't provide a boot partition. So only try reading
from such a partition when booting from eMMC.

Fixes: 214c8a8d08 ("feat(plat/st): add STM32MP_EMMC_BOOT option")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Change-Id: I354b737a3ae3ea577e83dfeb7096df22275d852d
2022-03-11 10:39:57 +01:00
Joanna Farley 7d00e72a39 Merge "fix(brcm): allow build to specify mbedTLS absolute path" into integration 2022-03-11 10:31:16 +01:00
Olivier Deprez 7c6d460eff Merge "fix(fvp): op-tee sp manifest doesn't map gicd" into integration 2022-03-10 18:47:09 +01:00
Madhukar Pappireddy 61fa552362 Merge "fix(fvp): FCONF Trace Not Shown" into integration 2022-03-10 18:24:14 +01:00
Madhukar Pappireddy 955be19907 Merge changes from topic "uart_segregation" into integration
* changes:
  feat(sgi): add page table translation entry for secure uart
  feat(sgi): route TF-A logs via secure uart
  feat(sgi): deviate from arm css common uart related definitions
2022-03-10 16:36:29 +01:00
Manish V Badarkhe 903d574295 fix(brcm): allow build to specify mbedTLS absolute path
Updated makefile so that build can accept absolute mbedTLS path.

Change-Id: Ife73266a01d7ed938aafc5e370240023237ebf61
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2022-03-10 15:24:52 +00:00
Juan Pablo Conde 0c55c10305 fix(fvp): FCONF Trace Not Shown
Updating call order for arm_console_boot_init() and arm_bl31_early_platform_setup().

Signed-off-by:  Juan Pablo Conde <juanpablo.conde@arm.com>
Change-Id: If932fff2ee4282a0aacf8751fa81e7665b886467
2022-03-10 16:03:41 +01:00